@loaders.gl/parquet 4.3.1 → 4.4.0-alpha.1
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/index.cjs +76 -286
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -4
- package/dist/lib/constants.js +1 -1
- package/dist/lib/encoders/encode-arrow-to-parquet.d.ts +7 -0
- package/dist/lib/encoders/encode-arrow-to-parquet.d.ts.map +1 -0
- package/dist/lib/encoders/{encode-parquet-wasm.js → encode-arrow-to-parquet.js} +1 -1
- package/dist/lib/parsers/get-parquet-schema.d.ts.map +1 -1
- package/dist/lib/parsers/get-parquet-schema.js +3 -3
- package/dist/lib/parsers/parse-geoparquet-to-geojson.d.ts +6 -0
- package/dist/lib/parsers/parse-geoparquet-to-geojson.d.ts.map +1 -0
- package/dist/lib/parsers/parse-geoparquet-to-geojson.js +15 -0
- package/dist/lib/parsers/{parse-parquet-wasm.d.ts → parse-parquet-to-arrow.d.ts} +3 -3
- package/dist/lib/parsers/parse-parquet-to-arrow.d.ts.map +1 -0
- package/dist/lib/parsers/{parse-parquet-wasm.js → parse-parquet-to-arrow.js} +8 -8
- package/dist/lib/parsers/parse-parquet-to-columns.d.ts +4 -4
- package/dist/lib/parsers/parse-parquet-to-columns.d.ts.map +1 -1
- package/dist/lib/parsers/parse-parquet-to-columns.js +1 -1
- package/dist/lib/parsers/{parse-parquet.d.ts → parse-parquet-to-json.d.ts} +4 -4
- package/dist/lib/parsers/parse-parquet-to-json.d.ts.map +1 -0
- package/dist/lib/parsers/{parse-parquet.js → parse-parquet-to-json.js} +2 -16
- package/dist/{parquet-wasm-loader.d.ts → parquet-arrow-loader.d.ts} +4 -6
- package/dist/parquet-arrow-loader.d.ts.map +1 -0
- package/dist/{parquet-wasm-loader.js → parquet-arrow-loader.js} +10 -11
- package/dist/parquet-arrow-writer.d.ts +9 -0
- package/dist/parquet-arrow-writer.d.ts.map +1 -0
- package/dist/{parquet-wasm-writer.js → parquet-arrow-writer.js} +6 -8
- package/dist/parquet-format.d.ts +9 -0
- package/dist/parquet-format.d.ts.map +1 -0
- package/dist/parquet-format.js +11 -0
- package/dist/{parquet-loader.d.ts → parquet-json-loader.d.ts} +57 -87
- package/dist/parquet-json-loader.d.ts.map +1 -0
- package/dist/{parquet-loader.js → parquet-json-loader.js} +42 -47
- package/dist/parquet-json-writer.d.ts +19 -0
- package/dist/parquet-json-writer.d.ts.map +1 -0
- package/dist/{parquet-writer.js → parquet-json-writer.js} +4 -6
- package/dist/parquetjs/codecs/declare.d.ts.map +1 -1
- package/dist/parquetjs/codecs/declare.js +5 -0
- package/dist/parquetjs/codecs/dictionary.d.ts.map +1 -1
- package/dist/parquetjs/codecs/dictionary.js +5 -0
- package/dist/parquetjs/codecs/index.d.ts.map +1 -1
- package/dist/parquetjs/codecs/index.js +5 -0
- package/dist/parquetjs/codecs/plain.d.ts.map +1 -1
- package/dist/parquetjs/codecs/plain.js +5 -0
- package/dist/parquetjs/codecs/rle.d.ts.map +1 -1
- package/dist/parquetjs/codecs/rle.js +5 -1
- package/dist/parquetjs/compression.d.ts.map +1 -1
- package/dist/parquetjs/compression.js +5 -2
- package/dist/parquetjs/encoder/parquet-encoder.d.ts.map +1 -1
- package/dist/parquetjs/encoder/parquet-encoder.js +5 -0
- package/dist/parquetjs/parquet-thrift/BoundaryOrder.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/BoundaryOrder.js +5 -0
- package/dist/parquetjs/parquet-thrift/BsonType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/BsonType.js +5 -0
- package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnChunk.js +5 -0
- package/dist/parquetjs/parquet-thrift/ColumnIndex.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnIndex.js +5 -0
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.js +5 -0
- package/dist/parquetjs/parquet-thrift/ColumnOrder.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnOrder.js +5 -0
- package/dist/parquetjs/parquet-thrift/CompressionCodec.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/CompressionCodec.js +5 -0
- package/dist/parquetjs/parquet-thrift/ConvertedType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ConvertedType.js +5 -0
- package/dist/parquetjs/parquet-thrift/DataPageHeader.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/DataPageHeader.js +5 -0
- package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js +5 -0
- package/dist/parquetjs/parquet-thrift/DateType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/DateType.js +5 -0
- package/dist/parquetjs/parquet-thrift/DecimalType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/DecimalType.js +5 -0
- package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js +5 -0
- package/dist/parquetjs/parquet-thrift/Encoding.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/Encoding.js +5 -0
- package/dist/parquetjs/parquet-thrift/EnumType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/EnumType.js +5 -0
- package/dist/parquetjs/parquet-thrift/FieldRepetitionType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/FieldRepetitionType.js +5 -0
- package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/FileMetaData.js +5 -0
- package/dist/parquetjs/parquet-thrift/IndexPageHeader.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/IndexPageHeader.js +5 -0
- package/dist/parquetjs/parquet-thrift/IntType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/IntType.js +5 -0
- package/dist/parquetjs/parquet-thrift/JsonType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/JsonType.js +5 -0
- package/dist/parquetjs/parquet-thrift/KeyValue.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/KeyValue.js +5 -0
- package/dist/parquetjs/parquet-thrift/ListType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ListType.js +5 -0
- package/dist/parquetjs/parquet-thrift/LogicalType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/LogicalType.js +5 -0
- package/dist/parquetjs/parquet-thrift/MapType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/MapType.js +5 -0
- package/dist/parquetjs/parquet-thrift/MicroSeconds.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/MicroSeconds.js +5 -0
- package/dist/parquetjs/parquet-thrift/MilliSeconds.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/MilliSeconds.js +5 -0
- package/dist/parquetjs/parquet-thrift/NullType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/NullType.js +5 -0
- package/dist/parquetjs/parquet-thrift/OffsetIndex.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/OffsetIndex.js +5 -0
- package/dist/parquetjs/parquet-thrift/PageEncodingStats.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/PageEncodingStats.js +5 -0
- package/dist/parquetjs/parquet-thrift/PageHeader.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/PageHeader.js +5 -0
- package/dist/parquetjs/parquet-thrift/PageLocation.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/PageLocation.js +5 -0
- package/dist/parquetjs/parquet-thrift/PageType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/PageType.js +5 -0
- package/dist/parquetjs/parquet-thrift/RowGroup.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/RowGroup.js +5 -0
- package/dist/parquetjs/parquet-thrift/SchemaElement.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/SchemaElement.js +5 -0
- package/dist/parquetjs/parquet-thrift/SortingColumn.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/SortingColumn.js +5 -0
- package/dist/parquetjs/parquet-thrift/Statistics.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/Statistics.js +5 -0
- package/dist/parquetjs/parquet-thrift/StringType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/StringType.js +5 -0
- package/dist/parquetjs/parquet-thrift/TimeType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/TimeType.js +5 -0
- package/dist/parquetjs/parquet-thrift/TimeUnit.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/TimeUnit.js +5 -0
- package/dist/parquetjs/parquet-thrift/TimestampType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/TimestampType.js +5 -0
- package/dist/parquetjs/parquet-thrift/Type.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/Type.js +5 -0
- package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.js +5 -0
- package/dist/parquetjs/parquet-thrift/UUIDType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/UUIDType.js +5 -0
- package/dist/parquetjs/parquet-thrift/index.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/index.js +5 -0
- package/dist/parquetjs/parser/decoders.d.ts.map +1 -1
- package/dist/parquetjs/parser/decoders.js +5 -0
- package/dist/parquetjs/parser/parquet-reader.d.ts.map +1 -1
- package/dist/parquetjs/parser/parquet-reader.js +5 -0
- package/dist/parquetjs/schema/declare.d.ts.map +1 -1
- package/dist/parquetjs/schema/declare.js +5 -0
- package/dist/parquetjs/schema/schema.d.ts.map +1 -1
- package/dist/parquetjs/schema/schema.js +5 -1
- package/dist/parquetjs/schema/shred.d.ts.map +1 -1
- package/dist/parquetjs/schema/shred.js +5 -1
- package/dist/parquetjs/schema/types.d.ts.map +1 -1
- package/dist/parquetjs/schema/types.js +5 -1
- package/dist/parquetjs/utils/file-utils.d.ts.map +1 -1
- package/dist/parquetjs/utils/file-utils.js +5 -0
- package/dist/parquetjs/utils/read-utils.d.ts.map +1 -1
- package/dist/parquetjs/utils/read-utils.js +5 -0
- package/dist/polyfills/buffer/buffer.d.ts.map +1 -1
- package/dist/polyfills/buffer/buffer.js +0 -1
- package/dist/polyfills/buffer/index.d.ts.map +1 -1
- package/dist/polyfills/buffer/install-buffer-polyfill.d.ts.map +1 -1
- package/dist/polyfills/buffer/install-buffer-polyfill.js +3 -0
- package/dist/workers/parquet-json-worker.d.ts +2 -0
- package/dist/workers/parquet-json-worker.d.ts.map +1 -0
- package/dist/workers/{parquet-worker.js → parquet-json-worker.js} +2 -2
- package/package.json +13 -13
- package/src/index.ts +16 -9
- package/src/lib/encoders/{encode-parquet-wasm.ts → encode-arrow-to-parquet.ts} +4 -4
- package/src/lib/parsers/get-parquet-schema.ts +3 -3
- package/src/lib/parsers/parse-geoparquet-to-geojson.ts +36 -0
- package/src/lib/parsers/{parse-parquet-wasm.ts → parse-parquet-to-arrow.ts} +9 -9
- package/src/lib/parsers/parse-parquet-to-columns.ts +4 -4
- package/src/lib/parsers/{parse-parquet.ts → parse-parquet-to-json.ts} +5 -25
- package/src/{parquet-wasm-loader.ts → parquet-arrow-loader.ts} +18 -20
- package/src/parquet-arrow-writer.ts +33 -0
- package/src/parquet-format.ts +14 -0
- package/src/{parquet-loader.ts → parquet-json-loader.ts} +42 -48
- package/src/{parquet-writer.ts → parquet-json-writer.ts} +6 -8
- package/src/parquetjs/codecs/declare.ts +6 -1
- package/src/parquetjs/codecs/dictionary.ts +6 -0
- package/src/parquetjs/codecs/index.ts +6 -1
- package/src/parquetjs/codecs/plain.ts +6 -1
- package/src/parquetjs/codecs/rle.ts +5 -1
- package/src/parquetjs/compression.ts +5 -2
- package/src/parquetjs/encoder/parquet-encoder.ts +6 -1
- package/src/parquetjs/modules.d.ts +5 -1
- package/src/parquetjs/parquet-thrift/BoundaryOrder.ts +6 -0
- package/src/parquetjs/parquet-thrift/BsonType.ts +6 -0
- package/src/parquetjs/parquet-thrift/ColumnChunk.ts +6 -0
- package/src/parquetjs/parquet-thrift/ColumnIndex.ts +6 -0
- package/src/parquetjs/parquet-thrift/ColumnMetaData.ts +6 -0
- package/src/parquetjs/parquet-thrift/ColumnOrder.ts +6 -0
- package/src/parquetjs/parquet-thrift/CompressionCodec.ts +6 -0
- package/src/parquetjs/parquet-thrift/ConvertedType.ts +6 -0
- package/src/parquetjs/parquet-thrift/DataPageHeader.ts +6 -0
- package/src/parquetjs/parquet-thrift/DataPageHeaderV2.ts +6 -0
- package/src/parquetjs/parquet-thrift/DateType.ts +6 -0
- package/src/parquetjs/parquet-thrift/DecimalType.ts +6 -0
- package/src/parquetjs/parquet-thrift/DictionaryPageHeader.ts +6 -0
- package/src/parquetjs/parquet-thrift/Encoding.ts +6 -0
- package/src/parquetjs/parquet-thrift/EnumType.ts +6 -0
- package/src/parquetjs/parquet-thrift/FieldRepetitionType.ts +6 -0
- package/src/parquetjs/parquet-thrift/FileMetaData.ts +6 -0
- package/src/parquetjs/parquet-thrift/IndexPageHeader.ts +6 -0
- package/src/parquetjs/parquet-thrift/IntType.ts +6 -0
- package/src/parquetjs/parquet-thrift/JsonType.ts +6 -0
- package/src/parquetjs/parquet-thrift/KeyValue.ts +6 -0
- package/src/parquetjs/parquet-thrift/ListType.ts +6 -0
- package/src/parquetjs/parquet-thrift/LogicalType.ts +6 -0
- package/src/parquetjs/parquet-thrift/MapType.ts +6 -0
- package/src/parquetjs/parquet-thrift/MicroSeconds.ts +6 -0
- package/src/parquetjs/parquet-thrift/MilliSeconds.ts +6 -0
- package/src/parquetjs/parquet-thrift/NullType.ts +6 -0
- package/src/parquetjs/parquet-thrift/OffsetIndex.ts +6 -0
- package/src/parquetjs/parquet-thrift/PageEncodingStats.ts +6 -0
- package/src/parquetjs/parquet-thrift/PageHeader.ts +6 -0
- package/src/parquetjs/parquet-thrift/PageLocation.ts +6 -0
- package/src/parquetjs/parquet-thrift/PageType.ts +6 -0
- package/src/parquetjs/parquet-thrift/RowGroup.ts +6 -0
- package/src/parquetjs/parquet-thrift/SchemaElement.ts +6 -0
- package/src/parquetjs/parquet-thrift/SortingColumn.ts +6 -0
- package/src/parquetjs/parquet-thrift/Statistics.ts +6 -0
- package/src/parquetjs/parquet-thrift/StringType.ts +6 -0
- package/src/parquetjs/parquet-thrift/TimeType.ts +6 -0
- package/src/parquetjs/parquet-thrift/TimeUnit.ts +6 -0
- package/src/parquetjs/parquet-thrift/TimestampType.ts +6 -0
- package/src/parquetjs/parquet-thrift/Type.ts +6 -0
- package/src/parquetjs/parquet-thrift/TypeDefinedOrder.ts +6 -0
- package/src/parquetjs/parquet-thrift/UUIDType.ts +6 -0
- package/src/parquetjs/parquet-thrift/index.ts +6 -0
- package/src/parquetjs/parser/decoders.ts +6 -1
- package/src/parquetjs/parser/parquet-reader.ts +6 -1
- package/src/parquetjs/schema/declare.ts +6 -1
- package/src/parquetjs/schema/schema.ts +5 -1
- package/src/parquetjs/schema/shred.ts +5 -1
- package/src/parquetjs/schema/types.ts +6 -1
- package/src/parquetjs/utils/file-utils.ts +6 -1
- package/src/parquetjs/utils/read-utils.ts +6 -0
- package/src/polyfills/buffer/buffer.ts +0 -1
- package/src/polyfills/buffer/index.ts +1 -0
- package/src/polyfills/buffer/install-buffer-polyfill.ts +4 -0
- package/src/workers/{parquet-worker.ts → parquet-json-worker.ts} +2 -2
- package/dist/lib/encoders/encode-parquet-wasm.d.ts +0 -7
- package/dist/lib/encoders/encode-parquet-wasm.d.ts.map +0 -1
- package/dist/lib/parsers/parse-geoparquet.d.ts +0 -6
- package/dist/lib/parsers/parse-geoparquet.d.ts.map +0 -1
- package/dist/lib/parsers/parse-geoparquet.js +0 -58
- package/dist/lib/parsers/parse-parquet-wasm.d.ts.map +0 -1
- package/dist/lib/parsers/parse-parquet.d.ts.map +0 -1
- package/dist/parquet-loader.d.ts.map +0 -1
- package/dist/parquet-wasm-loader.d.ts.map +0 -1
- package/dist/parquet-wasm-writer.d.ts +0 -9
- package/dist/parquet-wasm-writer.d.ts.map +0 -1
- package/dist/parquet-writer.d.ts +0 -17
- package/dist/parquet-writer.d.ts.map +0 -1
- package/dist/workers/parquet-worker.d.ts +0 -2
- package/dist/workers/parquet-worker.d.ts.map +0 -1
- package/src/lib/parsers/parse-geoparquet.ts +0 -88
- package/src/parquet-wasm-writer.ts +0 -35
package/dist/index.cjs
CHANGED
|
@@ -39,17 +39,19 @@ __export(dist_exports, {
|
|
|
39
39
|
BufferPolyfill: () => Buffer2,
|
|
40
40
|
GeoParquetLoader: () => GeoParquetLoader,
|
|
41
41
|
GeoParquetWorkerLoader: () => GeoParquetWorkerLoader,
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
ParquetArrowLoader: () => ParquetArrowLoader,
|
|
43
|
+
ParquetArrowWorkerLoader: () => ParquetArrowWorkerLoader,
|
|
44
|
+
ParquetArrowWriter: () => ParquetArrowWriter,
|
|
44
45
|
ParquetEncoder: () => ParquetEncoder,
|
|
45
|
-
|
|
46
|
+
ParquetFormat: () => ParquetFormat,
|
|
47
|
+
ParquetJSONLoader: () => ParquetJSONLoader,
|
|
48
|
+
ParquetJSONWorkerLoader: () => ParquetJSONWorkerLoader,
|
|
49
|
+
ParquetLoader: () => ParquetJSONLoader,
|
|
46
50
|
ParquetReader: () => ParquetReader,
|
|
47
51
|
ParquetSchema: () => ParquetSchema,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
ParquetWorkerLoader: () => ParquetWorkerLoader,
|
|
52
|
-
_ParquetWriter: () => ParquetWriter,
|
|
52
|
+
ParquetWorkerLoader: () => ParquetJSONWorkerLoader,
|
|
53
|
+
ParquetWriter: () => ParquetJSONWriter,
|
|
54
|
+
_ParquetJSONWriter: () => ParquetJSONWriter,
|
|
53
55
|
convertParquetSchema: () => convertParquetSchema,
|
|
54
56
|
convertParquetToArrowSchema: () => convertParquetSchema,
|
|
55
57
|
installBufferPolyfill: () => installBufferPolyfill,
|
|
@@ -1742,10 +1744,20 @@ globalThis.process = globalThis.process || {};
|
|
|
1742
1744
|
globalThis.process.env = globalThis.process.env || {};
|
|
1743
1745
|
var Buffer3 = installBufferPolyfill();
|
|
1744
1746
|
|
|
1745
|
-
// dist/parquet-
|
|
1747
|
+
// dist/parquet-format.js
|
|
1748
|
+
var ParquetFormat = {
|
|
1749
|
+
name: "Apache Parquet",
|
|
1750
|
+
category: "table",
|
|
1751
|
+
extensions: ["parquet"],
|
|
1752
|
+
mimeTypes: ["application/octet-stream"],
|
|
1753
|
+
binary: true,
|
|
1754
|
+
tests: ["PAR1", "PARE"]
|
|
1755
|
+
};
|
|
1756
|
+
|
|
1757
|
+
// dist/parquet-json-loader.js
|
|
1746
1758
|
var import_loader_utils2 = require("@loaders.gl/loader-utils");
|
|
1747
1759
|
|
|
1748
|
-
// dist/lib/parsers/parse-parquet.js
|
|
1760
|
+
// dist/lib/parsers/parse-parquet-to-json.js
|
|
1749
1761
|
var import_log = __toESM(require("@probe.gl/log"), 1);
|
|
1750
1762
|
|
|
1751
1763
|
// dist/parquetjs/codecs/plain.js
|
|
@@ -2703,96 +2715,6 @@ function materializeColumnAsRows(schema, columnData, key, rows) {
|
|
|
2703
2715
|
}
|
|
2704
2716
|
}
|
|
2705
2717
|
}
|
|
2706
|
-
function materializeColumns(schema, rowGroup) {
|
|
2707
|
-
const columns = {};
|
|
2708
|
-
for (const key in rowGroup.columnData) {
|
|
2709
|
-
const columnData = rowGroup.columnData[key];
|
|
2710
|
-
if (columnData.count) {
|
|
2711
|
-
materializeColumnAsColumnarArray(schema, columnData, rowGroup.rowCount, key, columns);
|
|
2712
|
-
}
|
|
2713
|
-
}
|
|
2714
|
-
return columns;
|
|
2715
|
-
}
|
|
2716
|
-
function materializeColumnAsColumnarArray(schema, columnData, rowCount, key, columns) {
|
|
2717
|
-
if (columnData.count <= 0) {
|
|
2718
|
-
return;
|
|
2719
|
-
}
|
|
2720
|
-
const field = schema.findField(key);
|
|
2721
|
-
const branch = schema.findFieldBranch(key);
|
|
2722
|
-
const columnName = branch[0].name;
|
|
2723
|
-
let column;
|
|
2724
|
-
const { values } = columnData;
|
|
2725
|
-
if (values.length === rowCount && branch[0].primitiveType) {
|
|
2726
|
-
column = values;
|
|
2727
|
-
}
|
|
2728
|
-
if (column) {
|
|
2729
|
-
columns[columnName] = column;
|
|
2730
|
-
return;
|
|
2731
|
-
}
|
|
2732
|
-
column = new Array(rowCount);
|
|
2733
|
-
for (let i = 0; i < rowCount; i++) {
|
|
2734
|
-
column[i] = {};
|
|
2735
|
-
}
|
|
2736
|
-
columns[columnName] = column;
|
|
2737
|
-
const rLevels = new Array(field.rLevelMax + 1).fill(0);
|
|
2738
|
-
let vIndex = 0;
|
|
2739
|
-
for (let i = 0; i < columnData.count; i++) {
|
|
2740
|
-
const dLevel = columnData.dlevels[i];
|
|
2741
|
-
const rLevel = columnData.rlevels[i];
|
|
2742
|
-
rLevels[rLevel]++;
|
|
2743
|
-
rLevels.fill(0, rLevel + 1);
|
|
2744
|
-
let rIndex = 0;
|
|
2745
|
-
let record = column[rLevels[rIndex++] - 1];
|
|
2746
|
-
for (const step of branch) {
|
|
2747
|
-
if (step === field || dLevel < step.dLevelMax) {
|
|
2748
|
-
break;
|
|
2749
|
-
}
|
|
2750
|
-
switch (step.repetitionType) {
|
|
2751
|
-
case "REPEATED":
|
|
2752
|
-
if (!(step.name in record)) {
|
|
2753
|
-
record[step.name] = [];
|
|
2754
|
-
}
|
|
2755
|
-
const ix = rLevels[rIndex++];
|
|
2756
|
-
while (record[step.name].length <= ix) {
|
|
2757
|
-
record[step.name].push({});
|
|
2758
|
-
}
|
|
2759
|
-
record = record[step.name][ix];
|
|
2760
|
-
break;
|
|
2761
|
-
default:
|
|
2762
|
-
record[step.name] = record[step.name] || {};
|
|
2763
|
-
record = record[step.name];
|
|
2764
|
-
}
|
|
2765
|
-
}
|
|
2766
|
-
if (dLevel === field.dLevelMax) {
|
|
2767
|
-
const value = fromPrimitive(
|
|
2768
|
-
// @ts-ignore
|
|
2769
|
-
field.originalType || field.primitiveType,
|
|
2770
|
-
columnData.values[vIndex],
|
|
2771
|
-
field
|
|
2772
|
-
);
|
|
2773
|
-
vIndex++;
|
|
2774
|
-
switch (field.repetitionType) {
|
|
2775
|
-
case "REPEATED":
|
|
2776
|
-
if (!(field.name in record)) {
|
|
2777
|
-
record[field.name] = [];
|
|
2778
|
-
}
|
|
2779
|
-
const ix = rLevels[rIndex];
|
|
2780
|
-
while (record[field.name].length <= ix) {
|
|
2781
|
-
record[field.name].push(null);
|
|
2782
|
-
}
|
|
2783
|
-
record[field.name][ix] = value;
|
|
2784
|
-
break;
|
|
2785
|
-
default:
|
|
2786
|
-
record[field.name] = value;
|
|
2787
|
-
}
|
|
2788
|
-
}
|
|
2789
|
-
}
|
|
2790
|
-
for (let i = 0; i < rowCount; ++i) {
|
|
2791
|
-
if (columnName in column[i]) {
|
|
2792
|
-
column[i] = column[i][columnName];
|
|
2793
|
-
}
|
|
2794
|
-
}
|
|
2795
|
-
}
|
|
2796
2718
|
|
|
2797
2719
|
// dist/parquetjs/schema/schema.js
|
|
2798
2720
|
var ParquetSchema = class {
|
|
@@ -6323,7 +6245,7 @@ var FileMetaData = class {
|
|
|
6323
6245
|
};
|
|
6324
6246
|
|
|
6325
6247
|
// dist/lib/constants.js
|
|
6326
|
-
var VERSION = true ? "4.
|
|
6248
|
+
var VERSION = true ? "4.4.0-alpha.0" : "latest";
|
|
6327
6249
|
var PARQUET_WASM_URL = "https://unpkg.com/parquet-wasm@0.6.1/esm/parquet_wasm_bg.wasm";
|
|
6328
6250
|
var PARQUET_MAGIC = "PAR1";
|
|
6329
6251
|
var PARQUET_MAGIC_ENCRYPTED = "PARE";
|
|
@@ -6859,6 +6781,9 @@ __publicField(ParquetReader, "defaultProps", {
|
|
|
6859
6781
|
preserveBinary: false
|
|
6860
6782
|
});
|
|
6861
6783
|
|
|
6784
|
+
// dist/lib/parsers/get-parquet-schema.js
|
|
6785
|
+
var import_geoarrow = require("@loaders.gl/geoarrow");
|
|
6786
|
+
|
|
6862
6787
|
// dist/lib/arrow/convert-schema-from-parquet.js
|
|
6863
6788
|
var PARQUET_TYPE_MAPPING = {
|
|
6864
6789
|
BOOLEAN: "bool",
|
|
@@ -6942,19 +6867,18 @@ function getSchemaMetadata(parquetMetadata) {
|
|
|
6942
6867
|
}
|
|
6943
6868
|
|
|
6944
6869
|
// dist/lib/parsers/get-parquet-schema.js
|
|
6945
|
-
var import_gis = require("@loaders.gl/gis");
|
|
6946
6870
|
async function getSchemaFromParquetReader(reader) {
|
|
6947
6871
|
const parquetSchema = await reader.getSchema();
|
|
6948
6872
|
const parquetMetadata = await reader.getFileMetadata();
|
|
6949
6873
|
const schema = convertParquetSchema(parquetSchema, parquetMetadata);
|
|
6950
|
-
(0,
|
|
6951
|
-
(0,
|
|
6874
|
+
(0, import_geoarrow.unpackGeoMetadata)(schema.metadata);
|
|
6875
|
+
(0, import_geoarrow.unpackJSONStringMetadata)(schema.metadata, "pandas");
|
|
6952
6876
|
return schema;
|
|
6953
6877
|
}
|
|
6954
6878
|
|
|
6955
|
-
// dist/lib/parsers/parse-parquet.js
|
|
6879
|
+
// dist/lib/parsers/parse-parquet-to-json.js
|
|
6956
6880
|
async function parseParquetFile(file, options) {
|
|
6957
|
-
var _a
|
|
6881
|
+
var _a;
|
|
6958
6882
|
installBufferPolyfill();
|
|
6959
6883
|
await preloadCompressions(options);
|
|
6960
6884
|
const reader = new ParquetReader(file, {
|
|
@@ -6982,11 +6906,10 @@ async function parseParquetFile(file, options) {
|
|
|
6982
6906
|
schema,
|
|
6983
6907
|
data: rows
|
|
6984
6908
|
};
|
|
6985
|
-
|
|
6986
|
-
return convertTable(objectRowTable, shape);
|
|
6909
|
+
return objectRowTable;
|
|
6987
6910
|
}
|
|
6988
6911
|
async function* parseParquetFileInBatches(file, options) {
|
|
6989
|
-
var _a
|
|
6912
|
+
var _a;
|
|
6990
6913
|
installBufferPolyfill();
|
|
6991
6914
|
await preloadCompressions(options);
|
|
6992
6915
|
const reader = new ParquetReader(file, {
|
|
@@ -7000,136 +6923,39 @@ async function* parseParquetFileInBatches(file, options) {
|
|
|
7000
6923
|
schema,
|
|
7001
6924
|
data: rows
|
|
7002
6925
|
};
|
|
7003
|
-
const shape = (_b = options == null ? void 0 : options.parquet) == null ? void 0 : _b.shape;
|
|
7004
|
-
const table = convertTable(objectRowTable, shape);
|
|
7005
6926
|
yield {
|
|
7006
6927
|
batchType: "data",
|
|
7007
6928
|
schema,
|
|
7008
|
-
...
|
|
6929
|
+
...objectRowTable,
|
|
7009
6930
|
length: rows.length
|
|
7010
6931
|
};
|
|
7011
6932
|
}
|
|
7012
6933
|
}
|
|
7013
|
-
function convertTable(objectRowTable, shape) {
|
|
7014
|
-
switch (shape) {
|
|
7015
|
-
case "object-row-table":
|
|
7016
|
-
return objectRowTable;
|
|
7017
|
-
case "geojson-table":
|
|
7018
|
-
return objectRowTable;
|
|
7019
|
-
default:
|
|
7020
|
-
throw new Error(shape);
|
|
7021
|
-
}
|
|
7022
|
-
}
|
|
7023
6934
|
|
|
7024
|
-
// dist/lib/parsers/parse-geoparquet.js
|
|
7025
|
-
var import_gis2 = require("@loaders.gl/gis");
|
|
7026
|
-
var import_wkt = require("@loaders.gl/wkt");
|
|
6935
|
+
// dist/lib/parsers/parse-geoparquet-to-geojson.js
|
|
7027
6936
|
async function parseGeoParquetFile(file, options) {
|
|
7028
|
-
var _a;
|
|
7029
6937
|
const table = await parseParquetFile(file, { ...options, shape: "object-row-table" });
|
|
7030
|
-
|
|
7031
|
-
return convertTable2(table, shape);
|
|
6938
|
+
return table;
|
|
7032
6939
|
}
|
|
7033
6940
|
async function* parseGeoParquetFileInBatches(file, options) {
|
|
7034
|
-
var _a;
|
|
7035
6941
|
const tableBatches = parseParquetFileInBatches(file, { ...options, shape: "object-row-table" });
|
|
7036
6942
|
for await (const batch of tableBatches) {
|
|
7037
|
-
|
|
7038
|
-
yield convertBatch(batch, shape);
|
|
7039
|
-
}
|
|
7040
|
-
}
|
|
7041
|
-
function convertTable2(objectRowTable, shape) {
|
|
7042
|
-
switch (shape) {
|
|
7043
|
-
case "object-row-table":
|
|
7044
|
-
return objectRowTable;
|
|
7045
|
-
case "geojson-table":
|
|
7046
|
-
try {
|
|
7047
|
-
return (0, import_gis2.convertWKBTableToGeoJSON)(objectRowTable, objectRowTable.schema, [
|
|
7048
|
-
import_wkt.WKTLoader,
|
|
7049
|
-
import_wkt.WKBLoader
|
|
7050
|
-
]);
|
|
7051
|
-
} catch (error) {
|
|
7052
|
-
return objectRowTable;
|
|
7053
|
-
}
|
|
7054
|
-
default:
|
|
7055
|
-
throw new Error(shape);
|
|
7056
|
-
}
|
|
7057
|
-
}
|
|
7058
|
-
function convertBatch(objectRowBatch, shape) {
|
|
7059
|
-
switch (shape) {
|
|
7060
|
-
case "object-row-table":
|
|
7061
|
-
return objectRowBatch;
|
|
7062
|
-
case "geojson-table":
|
|
7063
|
-
try {
|
|
7064
|
-
const geojsonTable = (0, import_gis2.convertWKBTableToGeoJSON)(objectRowBatch, objectRowBatch.schema, [
|
|
7065
|
-
import_wkt.WKTLoader,
|
|
7066
|
-
import_wkt.WKBLoader
|
|
7067
|
-
]);
|
|
7068
|
-
return {
|
|
7069
|
-
...objectRowBatch,
|
|
7070
|
-
...geojsonTable
|
|
7071
|
-
};
|
|
7072
|
-
} catch (error) {
|
|
7073
|
-
return objectRowBatch;
|
|
7074
|
-
}
|
|
7075
|
-
default:
|
|
7076
|
-
throw new Error(shape);
|
|
6943
|
+
yield batch;
|
|
7077
6944
|
}
|
|
7078
6945
|
}
|
|
7079
6946
|
|
|
7080
|
-
// dist/
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
for await (const batch of parseParquetFileInColumnarBatches(file, options)) {
|
|
7085
|
-
return {
|
|
7086
|
-
shape: "columnar-table",
|
|
7087
|
-
schema: batch.schema,
|
|
7088
|
-
data: batch.data
|
|
7089
|
-
};
|
|
7090
|
-
}
|
|
7091
|
-
throw new Error("empty table");
|
|
7092
|
-
}
|
|
7093
|
-
async function* parseParquetFileInColumnarBatches(file, options) {
|
|
7094
|
-
installBufferPolyfill();
|
|
7095
|
-
await preloadCompressions(options);
|
|
7096
|
-
const reader = new ParquetReader(file);
|
|
7097
|
-
const schema = await getSchemaFromParquetReader(reader);
|
|
7098
|
-
const parquetSchema = await reader.getSchema();
|
|
7099
|
-
const rowGroups = reader.rowGroupIterator(options == null ? void 0 : options.parquet);
|
|
7100
|
-
for await (const rowGroup of rowGroups) {
|
|
7101
|
-
yield convertRowGroupToTableBatch(rowGroup, parquetSchema, schema);
|
|
7102
|
-
}
|
|
7103
|
-
}
|
|
7104
|
-
function convertRowGroupToTableBatch(rowGroup, parquetSchema, schema) {
|
|
7105
|
-
const data = materializeColumns(parquetSchema, rowGroup);
|
|
7106
|
-
return {
|
|
7107
|
-
shape: "columnar-table",
|
|
7108
|
-
batchType: "data",
|
|
7109
|
-
schema,
|
|
7110
|
-
data,
|
|
7111
|
-
length: rowGroup.rowCount
|
|
7112
|
-
};
|
|
7113
|
-
}
|
|
7114
|
-
|
|
7115
|
-
// dist/parquet-loader.js
|
|
7116
|
-
var VERSION2 = true ? "4.3.0" : "latest";
|
|
7117
|
-
var ParquetWorkerLoader = {
|
|
6947
|
+
// dist/parquet-json-loader.js
|
|
6948
|
+
var VERSION2 = true ? "4.4.0-alpha.0" : "latest";
|
|
6949
|
+
var ParquetJSONWorkerLoader = {
|
|
6950
|
+
...ParquetFormat,
|
|
7118
6951
|
dataType: null,
|
|
7119
6952
|
batchType: null,
|
|
7120
|
-
name: "Apache Parquet",
|
|
7121
6953
|
id: "parquet",
|
|
7122
6954
|
module: "parquet",
|
|
7123
6955
|
version: VERSION2,
|
|
7124
6956
|
worker: false,
|
|
7125
|
-
category: "table",
|
|
7126
|
-
extensions: ["parquet"],
|
|
7127
|
-
mimeTypes: ["application/octet-stream"],
|
|
7128
|
-
binary: true,
|
|
7129
|
-
tests: ["PAR1", "PARE"],
|
|
7130
6957
|
options: {
|
|
7131
6958
|
parquet: {
|
|
7132
|
-
shape: "object-row-table",
|
|
7133
6959
|
columnList: [],
|
|
7134
6960
|
geoparquet: true,
|
|
7135
6961
|
url: void 0,
|
|
@@ -7137,31 +6963,25 @@ var ParquetWorkerLoader = {
|
|
|
7137
6963
|
}
|
|
7138
6964
|
}
|
|
7139
6965
|
};
|
|
7140
|
-
var
|
|
7141
|
-
...
|
|
6966
|
+
var ParquetJSONLoader = {
|
|
6967
|
+
...ParquetJSONWorkerLoader,
|
|
7142
6968
|
dataType: null,
|
|
7143
6969
|
batchType: null,
|
|
7144
6970
|
parse: (arrayBuffer, options) => parseParquetFile(new import_loader_utils2.BlobFile(arrayBuffer), options),
|
|
7145
6971
|
parseFile: parseParquetFile,
|
|
7146
6972
|
parseFileInBatches: parseParquetFileInBatches
|
|
7147
6973
|
};
|
|
7148
|
-
|
|
6974
|
+
ParquetJSONLoader.Buffer = Buffer3;
|
|
7149
6975
|
var GeoParquetWorkerLoader = {
|
|
6976
|
+
...ParquetFormat,
|
|
7150
6977
|
dataType: null,
|
|
7151
6978
|
batchType: null,
|
|
7152
|
-
name: "Apache Parquet",
|
|
7153
6979
|
id: "parquet",
|
|
7154
6980
|
module: "parquet",
|
|
7155
6981
|
version: VERSION2,
|
|
7156
6982
|
worker: true,
|
|
7157
|
-
category: "table",
|
|
7158
|
-
extensions: ["parquet"],
|
|
7159
|
-
mimeTypes: ["application/octet-stream"],
|
|
7160
|
-
binary: true,
|
|
7161
|
-
tests: ["PAR1", "PARE"],
|
|
7162
6983
|
options: {
|
|
7163
6984
|
parquet: {
|
|
7164
|
-
shape: "geojson-table",
|
|
7165
6985
|
columnList: [],
|
|
7166
6986
|
geoparquet: true,
|
|
7167
6987
|
url: void 0,
|
|
@@ -7177,40 +6997,14 @@ var GeoParquetLoader = {
|
|
|
7177
6997
|
parseFile: parseGeoParquetFile,
|
|
7178
6998
|
parseFileInBatches: parseGeoParquetFileInBatches
|
|
7179
6999
|
};
|
|
7180
|
-
var ParquetColumnarWorkerLoader = {
|
|
7181
|
-
dataType: null,
|
|
7182
|
-
batchType: null,
|
|
7183
|
-
name: "Apache Parquet",
|
|
7184
|
-
id: "parquet",
|
|
7185
|
-
module: "parquet",
|
|
7186
|
-
version: VERSION2,
|
|
7187
|
-
worker: true,
|
|
7188
|
-
category: "table",
|
|
7189
|
-
extensions: ["parquet"],
|
|
7190
|
-
mimeTypes: ["application/octet-stream"],
|
|
7191
|
-
binary: true,
|
|
7192
|
-
tests: ["PAR1", "PARE"],
|
|
7193
|
-
options: ParquetLoader.options
|
|
7194
|
-
};
|
|
7195
|
-
var ParquetColumnarLoader = {
|
|
7196
|
-
...ParquetColumnarWorkerLoader,
|
|
7197
|
-
parse(arrayBuffer, options) {
|
|
7198
|
-
return parseParquetFileInColumns(new import_loader_utils2.BlobFile(arrayBuffer), options);
|
|
7199
|
-
},
|
|
7200
|
-
parseFile: parseParquetFileInColumns,
|
|
7201
|
-
parseFileInBatches: parseParquetFileInColumnarBatches
|
|
7202
|
-
};
|
|
7203
7000
|
|
|
7204
|
-
// dist/parquet-writer.js
|
|
7205
|
-
var VERSION3 = true ? "4.
|
|
7206
|
-
var
|
|
7207
|
-
|
|
7001
|
+
// dist/parquet-json-writer.js
|
|
7002
|
+
var VERSION3 = true ? "4.4.0-alpha.0" : "latest";
|
|
7003
|
+
var ParquetJSONWriter = {
|
|
7004
|
+
...ParquetFormat,
|
|
7208
7005
|
id: "parquet",
|
|
7209
7006
|
module: "parquet",
|
|
7210
7007
|
version: VERSION3,
|
|
7211
|
-
extensions: ["parquet"],
|
|
7212
|
-
mimeTypes: ["application/octet-stream"],
|
|
7213
|
-
binary: true,
|
|
7214
7008
|
options: {},
|
|
7215
7009
|
encode: async (data, options) => encodeSync(data, options),
|
|
7216
7010
|
encodeSync
|
|
@@ -7219,11 +7013,11 @@ function encodeSync(data, options) {
|
|
|
7219
7013
|
return new ArrayBuffer(0);
|
|
7220
7014
|
}
|
|
7221
7015
|
|
|
7222
|
-
// dist/parquet-
|
|
7016
|
+
// dist/parquet-arrow-loader.js
|
|
7223
7017
|
var import_loader_utils4 = require("@loaders.gl/loader-utils");
|
|
7224
7018
|
|
|
7225
|
-
// dist/lib/parsers/parse-parquet-
|
|
7226
|
-
var
|
|
7019
|
+
// dist/lib/parsers/parse-parquet-to-arrow.js
|
|
7020
|
+
var import_schema_utils = require("@loaders.gl/schema-utils");
|
|
7227
7021
|
var arrow = __toESM(require("apache-arrow"), 1);
|
|
7228
7022
|
|
|
7229
7023
|
// dist/lib/utils/load-wasm.js
|
|
@@ -7271,8 +7065,8 @@ async function* makeNodeStreamIterator(stream, options) {
|
|
|
7271
7065
|
yield* stream;
|
|
7272
7066
|
}
|
|
7273
7067
|
|
|
7274
|
-
// dist/lib/parsers/parse-parquet-
|
|
7275
|
-
async function
|
|
7068
|
+
// dist/lib/parsers/parse-parquet-to-arrow.js
|
|
7069
|
+
async function parseParquetFileToArrow(file, options) {
|
|
7276
7070
|
const wasmUrl = options == null ? void 0 : options.wasmUrl;
|
|
7277
7071
|
const wasm = await loadWasm(wasmUrl);
|
|
7278
7072
|
let parquetFile;
|
|
@@ -7286,11 +7080,11 @@ async function parseParquetFileWasm(file, options) {
|
|
|
7286
7080
|
const arrowTable = arrow.tableFromIPC(ipcStream);
|
|
7287
7081
|
return {
|
|
7288
7082
|
shape: "arrow-table",
|
|
7289
|
-
schema: (0,
|
|
7083
|
+
schema: (0, import_schema_utils.convertArrowToSchema)(arrowTable.schema),
|
|
7290
7084
|
data: arrowTable
|
|
7291
7085
|
};
|
|
7292
7086
|
}
|
|
7293
|
-
async function*
|
|
7087
|
+
async function* parseParquetFileToArrowInBatches(file, options) {
|
|
7294
7088
|
const wasmUrl = options == null ? void 0 : options.wasmUrl;
|
|
7295
7089
|
const wasm = await loadWasm(wasmUrl);
|
|
7296
7090
|
let parquetFile;
|
|
@@ -7301,20 +7095,20 @@ async function* parseParquetFileInBatchesWasm(file, options) {
|
|
|
7301
7095
|
}
|
|
7302
7096
|
const stream = await parquetFile.stream(options);
|
|
7303
7097
|
let schema;
|
|
7304
|
-
for await (const
|
|
7305
|
-
schema ||= (0,
|
|
7098
|
+
for await (const recordBatch of makeStreamIterator(stream)) {
|
|
7099
|
+
schema ||= (0, import_schema_utils.convertArrowToSchema)(recordBatch.schema);
|
|
7306
7100
|
yield {
|
|
7307
7101
|
batchType: "data",
|
|
7308
7102
|
shape: "arrow-table",
|
|
7309
7103
|
schema,
|
|
7310
|
-
data:
|
|
7311
|
-
length:
|
|
7104
|
+
data: new arrow.Table(recordBatch),
|
|
7105
|
+
length: recordBatch.numRows
|
|
7312
7106
|
};
|
|
7313
7107
|
}
|
|
7314
7108
|
}
|
|
7315
7109
|
|
|
7316
|
-
// dist/parquet-
|
|
7317
|
-
var
|
|
7110
|
+
// dist/parquet-arrow-loader.js
|
|
7111
|
+
var ParquetArrowWorkerLoader = {
|
|
7318
7112
|
dataType: null,
|
|
7319
7113
|
batchType: null,
|
|
7320
7114
|
name: "Apache Parquet",
|
|
@@ -7329,7 +7123,6 @@ var ParquetWasmWorkerLoader = {
|
|
|
7329
7123
|
tests: ["PAR1", "PARE"],
|
|
7330
7124
|
options: {
|
|
7331
7125
|
parquet: {
|
|
7332
|
-
shape: "arrow-table",
|
|
7333
7126
|
limit: void 0,
|
|
7334
7127
|
// Provide a limit to the number of rows to be read.
|
|
7335
7128
|
offset: 0,
|
|
@@ -7346,25 +7139,25 @@ var ParquetWasmWorkerLoader = {
|
|
|
7346
7139
|
}
|
|
7347
7140
|
}
|
|
7348
7141
|
};
|
|
7349
|
-
var
|
|
7350
|
-
...
|
|
7142
|
+
var ParquetArrowLoader = {
|
|
7143
|
+
...ParquetArrowWorkerLoader,
|
|
7351
7144
|
parse(arrayBuffer, options) {
|
|
7352
|
-
const wasmOptions = { ...
|
|
7353
|
-
return
|
|
7145
|
+
const wasmOptions = { ...ParquetArrowLoader.options.parquet, ...options == null ? void 0 : options.parquet };
|
|
7146
|
+
return parseParquetFileToArrow(new import_loader_utils4.BlobFile(arrayBuffer), wasmOptions);
|
|
7354
7147
|
},
|
|
7355
7148
|
parseFile(file, options) {
|
|
7356
|
-
const wasmOptions = { ...
|
|
7357
|
-
return
|
|
7149
|
+
const wasmOptions = { ...ParquetArrowLoader.options.parquet, ...options == null ? void 0 : options.parquet };
|
|
7150
|
+
return parseParquetFileToArrow(file, wasmOptions);
|
|
7358
7151
|
},
|
|
7359
7152
|
parseFileInBatches(file, options) {
|
|
7360
|
-
const wasmOptions = { ...
|
|
7361
|
-
return
|
|
7153
|
+
const wasmOptions = { ...ParquetArrowLoader.options.parquet, ...options == null ? void 0 : options.parquet };
|
|
7154
|
+
return parseParquetFileToArrowInBatches(file, wasmOptions);
|
|
7362
7155
|
}
|
|
7363
7156
|
};
|
|
7364
7157
|
|
|
7365
|
-
// dist/lib/encoders/encode-parquet
|
|
7158
|
+
// dist/lib/encoders/encode-arrow-to-parquet.js
|
|
7366
7159
|
var arrow2 = __toESM(require("apache-arrow"), 1);
|
|
7367
|
-
async function
|
|
7160
|
+
async function encodeArrowToParquet(table, options) {
|
|
7368
7161
|
var _a;
|
|
7369
7162
|
const wasmUrl = (_a = options.parquet) == null ? void 0 : _a.wasmUrl;
|
|
7370
7163
|
const wasm = await loadWasm(wasmUrl);
|
|
@@ -7379,23 +7172,20 @@ async function encode(table, options) {
|
|
|
7379
7172
|
}
|
|
7380
7173
|
}
|
|
7381
7174
|
|
|
7382
|
-
// dist/parquet-
|
|
7383
|
-
var
|
|
7384
|
-
|
|
7175
|
+
// dist/parquet-arrow-writer.js
|
|
7176
|
+
var ParquetArrowWriter = {
|
|
7177
|
+
...ParquetFormat,
|
|
7385
7178
|
id: "parquet-wasm",
|
|
7386
7179
|
module: "parquet",
|
|
7387
7180
|
version: VERSION,
|
|
7388
|
-
extensions: ["parquet"],
|
|
7389
|
-
mimeTypes: ["application/octet-stream"],
|
|
7390
|
-
binary: true,
|
|
7391
7181
|
options: {
|
|
7392
7182
|
parquet: {
|
|
7393
7183
|
wasmUrl: PARQUET_WASM_URL
|
|
7394
7184
|
}
|
|
7395
7185
|
},
|
|
7396
7186
|
encode(arrowTable, options) {
|
|
7397
|
-
options = { parquet: { ...
|
|
7398
|
-
return
|
|
7187
|
+
options = { parquet: { ...ParquetArrowWriter.options.parquet, ...options == null ? void 0 : options.parquet }, ...options };
|
|
7188
|
+
return encodeArrowToParquet(arrowTable, options);
|
|
7399
7189
|
}
|
|
7400
7190
|
};
|
|
7401
7191
|
|