@loaders.gl/parquet 5.0.0-alpha.7 → 5.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/delta-source-loader-types.js +1 -1
- package/dist/delta-source.js +1 -1
- package/dist/geoparquet-loader.js +1 -1
- package/dist/iceberg-rest-catalog.js +1 -1
- package/dist/iceberg-rest-catalog.js.map +1 -1
- package/dist/index.cjs +261 -81
- package/dist/index.cjs.map +3 -3
- package/dist/lib/constants.js +1 -1
- package/dist/parquet-dataset-source.cjs +257 -77
- package/dist/parquet-dataset-source.cjs.map +3 -3
- package/dist/parquet-js-loader-types.js +1 -1
- package/dist/parquet-js-writer.js +1 -1
- package/dist/parquet-loader-base.js +1 -1
- package/dist/parquet-source-loader-types.js +1 -1
- package/dist/parquet-source-loader.cjs +257 -77
- package/dist/parquet-source-loader.cjs.map +3 -3
- package/dist/parquet-source-worker.js +20 -95
- package/dist/parquet-source-worker.js.map +4 -4
- package/dist/parquet-worker-node.cjs +24373 -17868
- package/dist/parquet-worker-node.cjs.map +4 -4
- package/dist/parquet-worker.js +5 -1
- package/dist/parquet-worker.js.map +2 -2
- package/dist/parquetjs/codecs/rle.d.ts.map +1 -1
- package/dist/parquetjs/codecs/rle.js +15 -6
- package/dist/parquetjs/codecs/rle.js.map +1 -1
- package/package.json +13 -18
- package/src/iceberg-rest-catalog.ts +1 -1
- package/src/parquetjs/codecs/rle.ts +17 -6
|
@@ -5933,93 +5933,6 @@ var global=globalThis;
|
|
|
5933
5933
|
}
|
|
5934
5934
|
});
|
|
5935
5935
|
|
|
5936
|
-
// ../../node_modules/varint/encode.js
|
|
5937
|
-
var require_encode = __commonJS({
|
|
5938
|
-
"../../node_modules/varint/encode.js"(exports, module) {
|
|
5939
|
-
init_process();
|
|
5940
|
-
module.exports = encode;
|
|
5941
|
-
var MSB = 128;
|
|
5942
|
-
var REST = 127;
|
|
5943
|
-
var MSBALL = ~REST;
|
|
5944
|
-
var INT = Math.pow(2, 31);
|
|
5945
|
-
function encode(num, out, offset) {
|
|
5946
|
-
if (Number.MAX_SAFE_INTEGER && num > Number.MAX_SAFE_INTEGER) {
|
|
5947
|
-
encode.bytes = 0;
|
|
5948
|
-
throw new RangeError("Could not encode varint");
|
|
5949
|
-
}
|
|
5950
|
-
out = out || [];
|
|
5951
|
-
offset = offset || 0;
|
|
5952
|
-
var oldOffset = offset;
|
|
5953
|
-
while (num >= INT) {
|
|
5954
|
-
out[offset++] = num & 255 | MSB;
|
|
5955
|
-
num /= 128;
|
|
5956
|
-
}
|
|
5957
|
-
while (num & MSBALL) {
|
|
5958
|
-
out[offset++] = num & 255 | MSB;
|
|
5959
|
-
num >>>= 7;
|
|
5960
|
-
}
|
|
5961
|
-
out[offset] = num | 0;
|
|
5962
|
-
encode.bytes = offset - oldOffset + 1;
|
|
5963
|
-
return out;
|
|
5964
|
-
}
|
|
5965
|
-
}
|
|
5966
|
-
});
|
|
5967
|
-
|
|
5968
|
-
// ../../node_modules/varint/decode.js
|
|
5969
|
-
var require_decode = __commonJS({
|
|
5970
|
-
"../../node_modules/varint/decode.js"(exports, module) {
|
|
5971
|
-
init_process();
|
|
5972
|
-
module.exports = read3;
|
|
5973
|
-
var MSB = 128;
|
|
5974
|
-
var REST = 127;
|
|
5975
|
-
function read3(buf, offset) {
|
|
5976
|
-
var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length;
|
|
5977
|
-
do {
|
|
5978
|
-
if (counter >= l || shift > 49) {
|
|
5979
|
-
read3.bytes = 0;
|
|
5980
|
-
throw new RangeError("Could not decode varint");
|
|
5981
|
-
}
|
|
5982
|
-
b = buf[counter++];
|
|
5983
|
-
res += shift < 28 ? (b & REST) << shift : (b & REST) * Math.pow(2, shift);
|
|
5984
|
-
shift += 7;
|
|
5985
|
-
} while (b >= MSB);
|
|
5986
|
-
read3.bytes = counter - offset;
|
|
5987
|
-
return res;
|
|
5988
|
-
}
|
|
5989
|
-
}
|
|
5990
|
-
});
|
|
5991
|
-
|
|
5992
|
-
// ../../node_modules/varint/length.js
|
|
5993
|
-
var require_length = __commonJS({
|
|
5994
|
-
"../../node_modules/varint/length.js"(exports, module) {
|
|
5995
|
-
init_process();
|
|
5996
|
-
var N1 = Math.pow(2, 7);
|
|
5997
|
-
var N2 = Math.pow(2, 14);
|
|
5998
|
-
var N3 = Math.pow(2, 21);
|
|
5999
|
-
var N4 = Math.pow(2, 28);
|
|
6000
|
-
var N5 = Math.pow(2, 35);
|
|
6001
|
-
var N6 = Math.pow(2, 42);
|
|
6002
|
-
var N7 = Math.pow(2, 49);
|
|
6003
|
-
var N8 = Math.pow(2, 56);
|
|
6004
|
-
var N9 = Math.pow(2, 63);
|
|
6005
|
-
module.exports = function(value) {
|
|
6006
|
-
return value < N1 ? 1 : value < N2 ? 2 : value < N3 ? 3 : value < N4 ? 4 : value < N5 ? 5 : value < N6 ? 6 : value < N7 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10;
|
|
6007
|
-
};
|
|
6008
|
-
}
|
|
6009
|
-
});
|
|
6010
|
-
|
|
6011
|
-
// ../../node_modules/varint/index.js
|
|
6012
|
-
var require_varint = __commonJS({
|
|
6013
|
-
"../../node_modules/varint/index.js"(exports, module) {
|
|
6014
|
-
init_process();
|
|
6015
|
-
module.exports = {
|
|
6016
|
-
encode: require_encode(),
|
|
6017
|
-
decode: require_decode(),
|
|
6018
|
-
encodingLength: require_length()
|
|
6019
|
-
};
|
|
6020
|
-
}
|
|
6021
|
-
});
|
|
6022
|
-
|
|
6023
5936
|
// ../bson/src/bson-format.ts
|
|
6024
5937
|
var BSONFormat;
|
|
6025
5938
|
var init_bson_format = __esm({
|
|
@@ -26088,6 +26001,10 @@ return true;`);
|
|
|
26088
26001
|
return "int32";
|
|
26089
26002
|
case Uint32Array:
|
|
26090
26003
|
return "uint32";
|
|
26004
|
+
case BigInt64Array:
|
|
26005
|
+
return "int64";
|
|
26006
|
+
case BigUint64Array:
|
|
26007
|
+
return "uint64";
|
|
26091
26008
|
case Float32Array:
|
|
26092
26009
|
return "float32";
|
|
26093
26010
|
case Float64Array:
|
|
@@ -27943,7 +27860,6 @@ return true;`);
|
|
|
27943
27860
|
|
|
27944
27861
|
// src/parquetjs/codecs/rle.ts
|
|
27945
27862
|
init_process();
|
|
27946
|
-
var import_varint = __toESM(require_varint(), 1);
|
|
27947
27863
|
function encodeValues2(type, values, opts) {
|
|
27948
27864
|
if (!("bitWidth" in opts)) {
|
|
27949
27865
|
throw new Error("bitWidth is required");
|
|
@@ -28609,6 +28525,18 @@ return true;`);
|
|
|
28609
28525
|
}
|
|
28610
28526
|
throw new Error("invalid RLE run header");
|
|
28611
28527
|
}
|
|
28528
|
+
function encodeUnsignedVarIntNumber(value) {
|
|
28529
|
+
if (!Number.isSafeInteger(value) || value < 0) {
|
|
28530
|
+
throw new Error("RLE run header must be a non-negative safe integer");
|
|
28531
|
+
}
|
|
28532
|
+
const bytes = [];
|
|
28533
|
+
while (value >= 128) {
|
|
28534
|
+
bytes.push(value % 128 | 128);
|
|
28535
|
+
value = Math.floor(value / 128);
|
|
28536
|
+
}
|
|
28537
|
+
bytes.push(value);
|
|
28538
|
+
return Uint8Array.from(bytes);
|
|
28539
|
+
}
|
|
28612
28540
|
function assertReadable(cursor, byteLength2) {
|
|
28613
28541
|
const size = cursor.size ?? cursor.buffer.length;
|
|
28614
28542
|
if (byteLength2 < 0 || cursor.offset + byteLength2 > size) {
|
|
@@ -28630,10 +28558,7 @@ return true;`);
|
|
|
28630
28558
|
buf[Math.floor(b / 8)] |= 1 << b % 8;
|
|
28631
28559
|
}
|
|
28632
28560
|
}
|
|
28633
|
-
return concatUint8Arrays([
|
|
28634
|
-
Uint8Array.from(import_varint.default.encode(paddedValues.length / 8 << 1 | 1)),
|
|
28635
|
-
buf
|
|
28636
|
-
]);
|
|
28561
|
+
return concatUint8Arrays([encodeUnsignedVarIntNumber(paddedValues.length / 8 << 1 | 1), buf]);
|
|
28637
28562
|
}
|
|
28638
28563
|
function encodeRunRepeated(value, count, opts) {
|
|
28639
28564
|
const bitWidth = opts.bitWidth;
|
|
@@ -28642,7 +28567,7 @@ return true;`);
|
|
|
28642
28567
|
buf[i3] = value & 255;
|
|
28643
28568
|
value = Math.floor(value / 256);
|
|
28644
28569
|
}
|
|
28645
|
-
return concatUint8Arrays([
|
|
28570
|
+
return concatUint8Arrays([encodeUnsignedVarIntNumber(count << 1), buf]);
|
|
28646
28571
|
}
|
|
28647
28572
|
|
|
28648
28573
|
// src/parquetjs/codecs/dictionary.ts
|
|
@@ -29700,7 +29625,7 @@ return true;`);
|
|
|
29700
29625
|
|
|
29701
29626
|
// ../bson/src/bson-writer.ts
|
|
29702
29627
|
init_bson_format();
|
|
29703
|
-
var VERSION = true ? "5.0.0-alpha.
|
|
29628
|
+
var VERSION = true ? "5.0.0-alpha.8" : "latest";
|
|
29704
29629
|
var BSONWriter = {
|
|
29705
29630
|
...BSONFormat,
|
|
29706
29631
|
name: "BSON",
|
|
@@ -38931,7 +38856,7 @@ return true;`);
|
|
|
38931
38856
|
};
|
|
38932
38857
|
|
|
38933
38858
|
// src/parquet-loader-base.ts
|
|
38934
|
-
var VERSION2 = true ? "5.0.0-alpha.
|
|
38859
|
+
var VERSION2 = true ? "5.0.0-alpha.8" : "latest";
|
|
38935
38860
|
var PARQUET_LOADER_BASE = {
|
|
38936
38861
|
...ParquetFormat,
|
|
38937
38862
|
dataType: null,
|