@loaders.gl/parquet 5.0.0-alpha.2 → 5.0.0-alpha.3
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/LICENSE +1 -1
- package/dist/bundled.d.ts +1 -1
- package/dist/bundled.d.ts.map +1 -1
- package/dist/bundled.js.map +1 -1
- package/dist/delta-format.d.ts +9 -0
- package/dist/delta-format.d.ts.map +1 -0
- package/dist/delta-format.js +12 -0
- package/dist/delta-format.js.map +1 -0
- package/dist/delta-source-loader-types.d.ts +27 -0
- package/dist/delta-source-loader-types.d.ts.map +1 -0
- package/dist/delta-source-loader-types.js +28 -0
- package/dist/delta-source-loader-types.js.map +1 -0
- package/dist/delta-source.d.ts +48 -0
- package/dist/delta-source.d.ts.map +1 -0
- package/dist/delta-source.js +222 -0
- package/dist/delta-source.js.map +1 -0
- package/dist/delta-types.d.ts +38 -0
- package/dist/delta-types.d.ts.map +1 -0
- package/dist/delta-types.js +5 -0
- package/dist/delta-types.js.map +1 -0
- package/dist/geoparquet-loader.js +1 -1
- package/dist/iceberg-rest-catalog.d.ts +49 -0
- package/dist/iceberg-rest-catalog.d.ts.map +1 -0
- package/dist/iceberg-rest-catalog.js +78 -0
- package/dist/iceberg-rest-catalog.js.map +1 -0
- package/dist/iceberg-table-source.d.ts +63 -0
- package/dist/iceberg-table-source.d.ts.map +1 -0
- package/dist/iceberg-table-source.js +797 -0
- package/dist/iceberg-table-source.js.map +1 -0
- package/dist/iceberg-types.d.ts +150 -0
- package/dist/iceberg-types.d.ts.map +1 -0
- package/dist/iceberg-types.js +5 -0
- package/dist/iceberg-types.js.map +1 -0
- package/dist/index.cjs +15005 -3143
- package/dist/index.cjs.map +3 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/arrow/convert-schema-from-parquet.d.ts +3 -1
- package/dist/lib/arrow/convert-schema-from-parquet.d.ts.map +1 -1
- package/dist/lib/arrow/convert-schema-from-parquet.js +94 -19
- package/dist/lib/arrow/convert-schema-from-parquet.js.map +1 -1
- package/dist/lib/arrow/create-nested-arrow-vector.js +89 -0
- package/dist/lib/arrow/create-nested-arrow-vector.js.map +1 -1
- package/dist/lib/constants.js +1 -1
- package/dist/lib/encoders/encode-table-to-parquet-js.d.ts.map +1 -1
- package/dist/lib/encoders/encode-table-to-parquet-js.js +202 -7
- package/dist/lib/encoders/encode-table-to-parquet-js.js.map +1 -1
- package/dist/lib/geo/geoparquet-covering.d.ts +19 -0
- package/dist/lib/geo/geoparquet-covering.d.ts.map +1 -0
- package/dist/lib/geo/geoparquet-covering.js +137 -0
- package/dist/lib/geo/geoparquet-covering.js.map +1 -0
- package/dist/lib/geo/geospatial-metadata.d.ts.map +1 -1
- package/dist/lib/geo/geospatial-metadata.js +39 -13
- package/dist/lib/geo/geospatial-metadata.js.map +1 -1
- package/dist/lib/parquet-bloom-filter-planner.d.ts +16 -0
- package/dist/lib/parquet-bloom-filter-planner.d.ts.map +1 -0
- package/dist/lib/parquet-bloom-filter-planner.js +57 -0
- package/dist/lib/parquet-bloom-filter-planner.js.map +1 -0
- package/dist/lib/parquet-bloom-filter.d.ts +30 -0
- package/dist/lib/parquet-bloom-filter.d.ts.map +1 -0
- package/dist/lib/parquet-bloom-filter.js +289 -0
- package/dist/lib/parquet-bloom-filter.js.map +1 -0
- package/dist/lib/parquet-encryption.d.ts +80 -0
- package/dist/lib/parquet-encryption.d.ts.map +1 -0
- package/dist/lib/parquet-encryption.js +190 -0
- package/dist/lib/parquet-encryption.js.map +1 -0
- package/dist/lib/parquet-page-index.d.ts +34 -5
- package/dist/lib/parquet-page-index.d.ts.map +1 -1
- package/dist/lib/parquet-page-index.js +114 -28
- package/dist/lib/parquet-page-index.js.map +1 -1
- package/dist/lib/parquet-predicate.d.ts +5 -1
- package/dist/lib/parquet-predicate.d.ts.map +1 -1
- package/dist/lib/parquet-predicate.js +42 -14
- package/dist/lib/parquet-predicate.js.map +1 -1
- package/dist/lib/parquet-source-worker-decoder.d.ts +4 -1
- package/dist/lib/parquet-source-worker-decoder.d.ts.map +1 -1
- package/dist/lib/parquet-source-worker-decoder.js +83 -17
- package/dist/lib/parquet-source-worker-decoder.js.map +1 -1
- package/dist/lib/parquet-source-worker-types.d.ts +24 -0
- package/dist/lib/parquet-source-worker-types.d.ts.map +1 -1
- package/dist/lib/parsers/get-parquet-schema.d.ts.map +1 -1
- package/dist/lib/parsers/get-parquet-schema.js +3 -1
- package/dist/lib/parsers/get-parquet-schema.js.map +1 -1
- package/dist/lib/parsers/parse-parquet-to-arrow-js.d.ts.map +1 -1
- package/dist/lib/parsers/parse-parquet-to-arrow-js.js +327 -18
- package/dist/lib/parsers/parse-parquet-to-arrow-js.js.map +1 -1
- package/dist/lib/parsers/parse-parquet-to-arrow.d.ts.map +1 -1
- package/dist/lib/parsers/parse-parquet-to-arrow.js +5 -5
- package/dist/lib/parsers/parse-parquet-to-arrow.js.map +1 -1
- package/dist/lib/parsers/parse-parquet-to-columns.d.ts.map +1 -1
- package/dist/lib/parsers/parse-parquet-to-columns.js +3 -1
- package/dist/lib/parsers/parse-parquet-to-columns.js.map +1 -1
- package/dist/lib/parsers/parse-parquet-to-json.d.ts.map +1 -1
- package/dist/lib/parsers/parse-parquet-to-json.js +18 -2
- package/dist/lib/parsers/parse-parquet-to-json.js.map +1 -1
- package/dist/lib/slice-parquet-batch.d.ts +9 -0
- package/dist/lib/slice-parquet-batch.d.ts.map +1 -0
- package/dist/lib/slice-parquet-batch.js +28 -0
- package/dist/lib/slice-parquet-batch.js.map +1 -0
- package/dist/lib/sources/parquet-range-file.d.ts +1 -1
- package/dist/lib/sources/parquet-range-file.d.ts.map +1 -1
- package/dist/lib/sources/parquet-range-file.js +28 -22
- package/dist/lib/sources/parquet-range-file.js.map +1 -1
- package/dist/lib/utils/normalize-parquet-options.d.ts.map +1 -1
- package/dist/lib/utils/normalize-parquet-options.js +15 -1
- package/dist/lib/utils/normalize-parquet-options.js.map +1 -1
- package/dist/parquet-dataset-source.cjs +15766 -4896
- package/dist/parquet-dataset-source.cjs.map +3 -3
- package/dist/parquet-dataset-source.d.ts +31 -4
- package/dist/parquet-dataset-source.d.ts.map +1 -1
- package/dist/parquet-dataset-source.js +296 -74
- package/dist/parquet-dataset-source.js.map +1 -1
- package/dist/parquet-js-loader-types.d.ts +2 -0
- package/dist/parquet-js-loader-types.d.ts.map +1 -1
- package/dist/parquet-js-loader-types.js +2 -1
- package/dist/parquet-js-loader-types.js.map +1 -1
- package/dist/parquet-js-loader.d.ts +1 -0
- package/dist/parquet-js-loader.d.ts.map +1 -1
- package/dist/parquet-js-loader.js +2 -1
- package/dist/parquet-js-loader.js.map +1 -1
- package/dist/parquet-js-writer.d.ts +23 -2
- package/dist/parquet-js-writer.d.ts.map +1 -1
- package/dist/parquet-js-writer.js +1 -1
- package/dist/parquet-js-writer.js.map +1 -1
- package/dist/parquet-loader-base.js +1 -1
- package/dist/parquet-loader-options.d.ts +11 -0
- package/dist/parquet-loader-options.d.ts.map +1 -1
- package/dist/parquet-loader-options.js.map +1 -1
- package/dist/parquet-source-capabilities.d.ts +8 -1
- package/dist/parquet-source-capabilities.d.ts.map +1 -1
- package/dist/parquet-source-capabilities.js +10 -0
- package/dist/parquet-source-capabilities.js.map +1 -1
- package/dist/parquet-source-loader-types.d.ts +10 -0
- package/dist/parquet-source-loader-types.d.ts.map +1 -1
- package/dist/parquet-source-loader-types.js +11 -1
- package/dist/parquet-source-loader-types.js.map +1 -1
- package/dist/parquet-source-loader.cjs +14911 -4316
- package/dist/parquet-source-loader.cjs.map +3 -3
- package/dist/parquet-source-loader.d.ts +42 -4
- package/dist/parquet-source-loader.d.ts.map +1 -1
- package/dist/parquet-source-loader.js +585 -38
- package/dist/parquet-source-loader.js.map +1 -1
- package/dist/parquet-source-types.d.ts +180 -30
- package/dist/parquet-source-types.d.ts.map +1 -1
- package/dist/parquet-source-worker.js +7055 -6989
- package/dist/parquet-source-worker.js.map +4 -4
- package/dist/parquet-worker-node.cjs +8505 -1041
- package/dist/parquet-worker-node.cjs.map +4 -4
- package/dist/parquet-worker-url.js +5 -1
- package/dist/parquet-worker-url.js.map +1 -1
- package/dist/parquet-worker.js +289 -218
- package/dist/parquet-worker.js.map +4 -4
- package/dist/parquetjs/codecs/declare.d.ts +15 -0
- package/dist/parquetjs/codecs/declare.d.ts.map +1 -1
- package/dist/parquetjs/codecs/declare.js +10 -0
- package/dist/parquetjs/codecs/declare.js.map +1 -1
- package/dist/parquetjs/codecs/delta.d.ts.map +1 -1
- package/dist/parquetjs/codecs/delta.js +356 -7
- package/dist/parquetjs/codecs/delta.js.map +1 -1
- package/dist/parquetjs/codecs/index.d.ts.map +1 -1
- package/dist/parquetjs/codecs/index.js +4 -0
- package/dist/parquetjs/codecs/index.js.map +1 -1
- package/dist/parquetjs/codecs/plain.d.ts +1 -1
- package/dist/parquetjs/codecs/plain.d.ts.map +1 -1
- package/dist/parquetjs/codecs/plain.js +153 -12
- package/dist/parquetjs/codecs/plain.js.map +1 -1
- package/dist/parquetjs/codecs/rle.d.ts +4 -0
- package/dist/parquetjs/codecs/rle.d.ts.map +1 -1
- package/dist/parquetjs/codecs/rle.js +406 -3
- package/dist/parquetjs/codecs/rle.js.map +1 -1
- package/dist/parquetjs/compression.d.ts +9 -0
- package/dist/parquetjs/compression.d.ts.map +1 -1
- package/dist/parquetjs/compression.js +86 -67
- package/dist/parquetjs/compression.js.map +1 -1
- package/dist/parquetjs/encoder/dictionary-planner.d.ts.map +1 -1
- package/dist/parquetjs/encoder/dictionary-planner.js +5 -2
- package/dist/parquetjs/encoder/dictionary-planner.js.map +1 -1
- package/dist/parquetjs/encoder/parquet-encoder.d.ts +43 -1
- package/dist/parquetjs/encoder/parquet-encoder.d.ts.map +1 -1
- package/dist/parquetjs/encoder/parquet-encoder.js +691 -34
- package/dist/parquetjs/encoder/parquet-encoder.js.map +1 -1
- package/dist/parquetjs/parquet-thrift/BoundingBox.d.ts +29 -0
- package/dist/parquetjs/parquet-thrift/BoundingBox.d.ts.map +1 -0
- package/dist/parquetjs/parquet-thrift/BoundingBox.js +85 -0
- package/dist/parquetjs/parquet-thrift/BoundingBox.js.map +1 -0
- package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts +5 -0
- package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnChunk.js +35 -0
- package/dist/parquetjs/parquet-thrift/ColumnChunk.js.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnCryptoMetaData.d.ts +35 -0
- package/dist/parquetjs/parquet-thrift/ColumnCryptoMetaData.d.ts.map +1 -0
- package/dist/parquetjs/parquet-thrift/ColumnCryptoMetaData.js +135 -0
- package/dist/parquetjs/parquet-thrift/ColumnCryptoMetaData.js.map +1 -0
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts +10 -0
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.js +73 -0
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.js.map +1 -1
- package/dist/parquetjs/parquet-thrift/EncryptionAlgorithm.d.ts +22 -0
- package/dist/parquetjs/parquet-thrift/EncryptionAlgorithm.d.ts.map +1 -0
- package/dist/parquetjs/parquet-thrift/EncryptionAlgorithm.js +111 -0
- package/dist/parquetjs/parquet-thrift/EncryptionAlgorithm.js.map +1 -0
- package/dist/parquetjs/parquet-thrift/FileCryptoMetaData.d.ts +16 -0
- package/dist/parquetjs/parquet-thrift/FileCryptoMetaData.d.ts.map +1 -0
- package/dist/parquetjs/parquet-thrift/FileCryptoMetaData.js +57 -0
- package/dist/parquetjs/parquet-thrift/FileCryptoMetaData.js.map +1 -0
- package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts +5 -0
- package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/FileMetaData.js +35 -0
- package/dist/parquetjs/parquet-thrift/FileMetaData.js.map +1 -1
- package/dist/parquetjs/parquet-thrift/GeospatialStatistics.d.ts +18 -0
- package/dist/parquetjs/parquet-thrift/GeospatialStatistics.d.ts.map +1 -0
- package/dist/parquetjs/parquet-thrift/GeospatialStatistics.js +62 -0
- package/dist/parquetjs/parquet-thrift/GeospatialStatistics.js.map +1 -0
- package/dist/parquetjs/parquet-thrift/SizeStatistics.d.ts +26 -0
- package/dist/parquetjs/parquet-thrift/SizeStatistics.d.ts.map +1 -0
- package/dist/parquetjs/parquet-thrift/SizeStatistics.js +85 -0
- package/dist/parquetjs/parquet-thrift/SizeStatistics.js.map +1 -0
- package/dist/parquetjs/parquet-thrift/index.d.ts +6 -0
- package/dist/parquetjs/parquet-thrift/index.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/index.js +6 -0
- package/dist/parquetjs/parquet-thrift/index.js.map +1 -1
- package/dist/parquetjs/parser/decoders.d.ts +10 -1
- package/dist/parquetjs/parser/decoders.d.ts.map +1 -1
- package/dist/parquetjs/parser/decoders.js +318 -14
- package/dist/parquetjs/parser/decoders.js.map +1 -1
- package/dist/parquetjs/parser/parquet-reader.d.ts +78 -12
- package/dist/parquetjs/parser/parquet-reader.d.ts.map +1 -1
- package/dist/parquetjs/parser/parquet-reader.js +605 -66
- package/dist/parquetjs/parser/parquet-reader.js.map +1 -1
- package/dist/parquetjs/schema/declare.d.ts +22 -3
- package/dist/parquetjs/schema/declare.d.ts.map +1 -1
- package/dist/parquetjs/schema/declare.js.map +1 -1
- package/dist/parquetjs/schema/schema.d.ts.map +1 -1
- package/dist/parquetjs/schema/schema.js +10 -0
- package/dist/parquetjs/schema/schema.js.map +1 -1
- package/dist/parquetjs/schema/shred.d.ts.map +1 -1
- package/dist/parquetjs/schema/shred.js +219 -11
- package/dist/parquetjs/schema/shred.js.map +1 -1
- package/dist/parquetjs/schema/types.js +19 -21
- package/dist/parquetjs/schema/types.js.map +1 -1
- package/dist/parquetjs/schema/variant.d.ts +3 -0
- package/dist/parquetjs/schema/variant.d.ts.map +1 -0
- package/dist/parquetjs/schema/variant.js +248 -0
- package/dist/parquetjs/schema/variant.js.map +1 -0
- package/dist/parquetjs/utils/crc32.d.ts +3 -0
- package/dist/parquetjs/utils/crc32.d.ts.map +1 -0
- package/dist/parquetjs/utils/crc32.js +15 -0
- package/dist/parquetjs/utils/crc32.js.map +1 -0
- package/dist/parquetjs/utils/read-utils.d.ts +11 -1
- package/dist/parquetjs/utils/read-utils.d.ts.map +1 -1
- package/dist/parquetjs/utils/read-utils.js +21 -1
- package/dist/parquetjs/utils/read-utils.js.map +1 -1
- package/dist/unbundled.d.ts +2 -1
- package/dist/unbundled.d.ts.map +1 -1
- package/dist/unbundled.js +1 -0
- package/dist/unbundled.js.map +1 -1
- package/package.json +36 -11
- package/src/bundled.ts +3 -0
- package/src/delta-format.ts +12 -0
- package/src/delta-source-loader-types.ts +40 -0
- package/src/delta-source.ts +305 -0
- package/src/delta-types.ts +40 -0
- package/src/iceberg-rest-catalog.ts +122 -0
- package/src/iceberg-table-source.ts +1037 -0
- package/src/iceberg-types.ts +165 -0
- package/src/index.ts +50 -1
- package/src/lib/arrow/convert-schema-from-parquet.ts +113 -19
- package/src/lib/arrow/create-nested-arrow-vector.ts +116 -0
- package/src/lib/encoders/encode-table-to-parquet-js.ts +268 -7
- package/src/lib/geo/geoparquet-covering.ts +201 -0
- package/src/lib/geo/geospatial-metadata.ts +42 -15
- package/src/lib/parquet-bloom-filter-planner.ts +86 -0
- package/src/lib/parquet-bloom-filter.ts +345 -0
- package/src/lib/parquet-encryption.ts +344 -0
- package/src/lib/parquet-page-index.ts +180 -34
- package/src/lib/parquet-predicate.ts +52 -16
- package/src/lib/parquet-source-worker-decoder.ts +116 -20
- package/src/lib/parquet-source-worker-types.ts +25 -0
- package/src/lib/parsers/get-parquet-schema.ts +3 -1
- package/src/lib/parsers/parse-parquet-to-arrow-js.ts +397 -17
- package/src/lib/parsers/parse-parquet-to-arrow.ts +4 -5
- package/src/lib/parsers/parse-parquet-to-columns.ts +3 -1
- package/src/lib/parsers/parse-parquet-to-json.ts +18 -2
- package/src/lib/slice-parquet-batch.ts +32 -0
- package/src/lib/sources/parquet-range-file.ts +35 -29
- package/src/lib/utils/normalize-parquet-options.ts +17 -1
- package/src/parquet-dataset-source.ts +397 -85
- package/src/parquet-js-loader-types.ts +1 -0
- package/src/parquet-js-loader.ts +2 -1
- package/src/parquet-js-writer.ts +30 -0
- package/src/parquet-loader-options.ts +11 -0
- package/src/parquet-source-capabilities.ts +18 -1
- package/src/parquet-source-loader-types.ts +10 -0
- package/src/parquet-source-loader.ts +929 -52
- package/src/parquet-source-types.ts +197 -28
- package/src/parquet-worker-url.ts +6 -1
- package/src/parquetjs/codecs/declare.ts +27 -0
- package/src/parquetjs/codecs/delta.ts +466 -6
- package/src/parquetjs/codecs/index.ts +4 -0
- package/src/parquetjs/codecs/plain.ts +177 -11
- package/src/parquetjs/codecs/rle.ts +573 -3
- package/src/parquetjs/compression.ts +102 -76
- package/src/parquetjs/encoder/dictionary-planner.ts +7 -2
- package/src/parquetjs/encoder/parquet-encoder.ts +1016 -38
- package/src/parquetjs/parquet-thrift/BoundingBox.ts +108 -0
- package/src/parquetjs/parquet-thrift/ColumnChunk.ts +35 -0
- package/src/parquetjs/parquet-thrift/ColumnCryptoMetaData.ts +139 -0
- package/src/parquetjs/parquet-thrift/ColumnMetaData.ts +73 -0
- package/src/parquetjs/parquet-thrift/EncryptionAlgorithm.ts +127 -0
- package/src/parquetjs/parquet-thrift/FileCryptoMetaData.ts +60 -0
- package/src/parquetjs/parquet-thrift/FileMetaData.ts +35 -0
- package/src/parquetjs/parquet-thrift/GeospatialStatistics.ts +68 -0
- package/src/parquetjs/parquet-thrift/SizeStatistics.ts +98 -0
- package/src/parquetjs/parquet-thrift/index.ts +6 -0
- package/src/parquetjs/parser/decoders.ts +451 -26
- package/src/parquetjs/parser/parquet-reader.ts +935 -87
- package/src/parquetjs/schema/declare.ts +22 -2
- package/src/parquetjs/schema/schema.ts +10 -0
- package/src/parquetjs/schema/shred.ts +238 -11
- package/src/parquetjs/schema/types.ts +16 -25
- package/src/parquetjs/schema/variant.ts +313 -0
- package/src/parquetjs/utils/crc32.ts +15 -0
- package/src/parquetjs/utils/read-utils.ts +26 -1
- package/src/unbundled.ts +14 -0
|
@@ -8,10 +8,22 @@ import type {
|
|
|
8
8
|
DataSourceOptions,
|
|
9
9
|
RangeRequestScheduler,
|
|
10
10
|
RangeRequestSchedulerProps,
|
|
11
|
+
ScanExecutionTelemetryCallback,
|
|
11
12
|
StrictLoaderOptions
|
|
12
13
|
} from '@loaders.gl/loader-utils';
|
|
13
14
|
import type {ArrowTableBatch, Schema} from '@loaders.gl/schema';
|
|
15
|
+
import type {
|
|
16
|
+
ColumnarComparisonPredicate,
|
|
17
|
+
ColumnarInPredicate,
|
|
18
|
+
ColumnarLogicalPredicate,
|
|
19
|
+
ColumnarNotPredicate,
|
|
20
|
+
ColumnarNullPredicate,
|
|
21
|
+
ColumnarPredicateProperty,
|
|
22
|
+
ColumnarPredicateValue
|
|
23
|
+
} from '@loaders.gl/loader-utils';
|
|
24
|
+
import type {TableQueryExplain} from '@loaders.gl/loader-utils';
|
|
14
25
|
import type {FileMetaData} from './parquetjs/parquet-thrift/index';
|
|
26
|
+
import type {ParquetKeyRetriever} from './lib/parquet-encryption';
|
|
15
27
|
|
|
16
28
|
/** Version validators captured from an HTTP Parquet object. */
|
|
17
29
|
export type ParquetObjectVersion = {
|
|
@@ -37,6 +49,44 @@ export type ParquetColumnChunkStatistics = {
|
|
|
37
49
|
maxIsExact?: boolean;
|
|
38
50
|
};
|
|
39
51
|
|
|
52
|
+
/** Size statistics reported by a Parquet writer for one column chunk. */
|
|
53
|
+
export type ParquetColumnChunkSizeStatistics = {
|
|
54
|
+
/** Unencoded bytes for BYTE_ARRAY values, excluding four-byte lengths. */
|
|
55
|
+
readonly unencodedByteArrayDataBytes?: number;
|
|
56
|
+
/** Counts observed at each repetition level, when supplied. */
|
|
57
|
+
readonly repetitionLevelHistogram?: readonly number[];
|
|
58
|
+
/** Counts observed at each definition level, when supplied. */
|
|
59
|
+
readonly definitionLevelHistogram?: readonly number[];
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** Native Parquet geospatial bounding-box statistics for a geometry column chunk. */
|
|
63
|
+
export type ParquetGeospatialBoundingBox = {
|
|
64
|
+
/** Minimum x coordinate. For GEOGRAPHY this may exceed `xmax` across the antimeridian. */
|
|
65
|
+
readonly xmin: number;
|
|
66
|
+
/** Maximum x coordinate. */
|
|
67
|
+
readonly xmax: number;
|
|
68
|
+
/** Minimum y coordinate. */
|
|
69
|
+
readonly ymin: number;
|
|
70
|
+
/** Maximum y coordinate. */
|
|
71
|
+
readonly ymax: number;
|
|
72
|
+
/** Minimum z coordinate when at least one finite z value is present. */
|
|
73
|
+
readonly zmin?: number;
|
|
74
|
+
/** Maximum z coordinate when at least one finite z value is present. */
|
|
75
|
+
readonly zmax?: number;
|
|
76
|
+
/** Minimum measure when at least one finite m value is present. */
|
|
77
|
+
readonly mmin?: number;
|
|
78
|
+
/** Maximum measure when at least one finite m value is present. */
|
|
79
|
+
readonly mmax?: number;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** Native Parquet geospatial statistics for one geometry column chunk. */
|
|
83
|
+
export type ParquetGeospatialStatistics = {
|
|
84
|
+
/** Coordinate bounds aggregated across non-null geometry values. */
|
|
85
|
+
readonly bbox?: ParquetGeospatialBoundingBox;
|
|
86
|
+
/** Distinct ISO WKB geometry type codes present in the column chunk. */
|
|
87
|
+
readonly geometryTypes?: readonly number[];
|
|
88
|
+
};
|
|
89
|
+
|
|
40
90
|
/** Normalized metadata for one Parquet column chunk. */
|
|
41
91
|
export type ParquetColumnChunkMetadata = {
|
|
42
92
|
/** Nested column path in the Parquet schema. */
|
|
@@ -71,8 +121,26 @@ export type ParquetColumnChunkMetadata = {
|
|
|
71
121
|
readonly offsetIndexOffset?: number;
|
|
72
122
|
/** Serialized byte length of the optional data-page location index. */
|
|
73
123
|
readonly offsetIndexByteLength?: number;
|
|
124
|
+
/** Absolute file offset of the optional split-block Bloom filter. */
|
|
125
|
+
readonly bloomFilterOffset?: number;
|
|
126
|
+
/** Serialized byte length of the optional split-block Bloom filter. */
|
|
127
|
+
readonly bloomFilterByteLength?: number;
|
|
74
128
|
/** Optional min/max and count statistics decoded from the footer. */
|
|
75
129
|
readonly statistics?: ParquetColumnChunkStatistics;
|
|
130
|
+
/** Optional decoded size statistics for memory and nested-value planning. */
|
|
131
|
+
readonly sizeStatistics?: ParquetColumnChunkSizeStatistics;
|
|
132
|
+
/** Native geospatial statistics decoded from a Parquet 2.11+ footer. */
|
|
133
|
+
readonly geospatialStatistics?: ParquetGeospatialStatistics;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/** Sort-order declaration attached to one Parquet row group. */
|
|
137
|
+
export type ParquetSortingColumn = {
|
|
138
|
+
/** Leaf-column index in the file schema. */
|
|
139
|
+
readonly columnIndex: number;
|
|
140
|
+
/** Whether values are sorted in descending order. */
|
|
141
|
+
readonly descending: boolean;
|
|
142
|
+
/** Whether nulls sort before non-null values. */
|
|
143
|
+
readonly nullsFirst: boolean;
|
|
76
144
|
};
|
|
77
145
|
|
|
78
146
|
/** Normalized metadata for one Parquet row group. */
|
|
@@ -93,6 +161,8 @@ export type ParquetRowGroupMetadata = {
|
|
|
93
161
|
readonly compressedSize: number;
|
|
94
162
|
/** Column chunks contained in the row group. */
|
|
95
163
|
readonly columns: readonly ParquetColumnChunkMetadata[];
|
|
164
|
+
/** Optional sort order declared by the writer. */
|
|
165
|
+
readonly sortingColumns?: readonly ParquetSortingColumn[];
|
|
96
166
|
};
|
|
97
167
|
|
|
98
168
|
/** Dataset-level metadata returned by `ParquetSource.getMetadata()`. */
|
|
@@ -134,51 +204,39 @@ export type ParquetMetadataRequestOptions = {
|
|
|
134
204
|
};
|
|
135
205
|
|
|
136
206
|
/** Scalar values supported by exact Parquet source predicates. */
|
|
137
|
-
export type ParquetPredicateValue =
|
|
207
|
+
export type ParquetPredicateValue = ColumnarPredicateValue;
|
|
138
208
|
|
|
139
|
-
/**
|
|
140
|
-
export type
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
209
|
+
/** Four-, six-, or eight-dimensional extent used for conservative Parquet spatial pruning. */
|
|
210
|
+
export type ParquetBoundingBox =
|
|
211
|
+
| readonly [number, number, number, number]
|
|
212
|
+
| readonly [number, number, number, number, number, number]
|
|
213
|
+
| readonly [number, number, number, number, number, number, number, number];
|
|
214
|
+
|
|
215
|
+
/** Reference to one Parquet column in a predicate expression. */
|
|
216
|
+
export type ParquetPredicateProperty = ColumnarPredicateProperty;
|
|
144
217
|
|
|
145
218
|
/** Comparison predicate applied to one top-level Parquet column. */
|
|
146
|
-
export type ParquetComparisonPredicate = {
|
|
147
|
-
/** CQL2-shaped exact comparison operator. */
|
|
148
|
-
op: '=' | '<>' | '<' | '<=' | '>' | '>=';
|
|
149
|
-
/** Column reference followed by the scalar value to compare. */
|
|
219
|
+
export type ParquetComparisonPredicate = Omit<ColumnarComparisonPredicate, 'args'> & {
|
|
150
220
|
args: readonly [ParquetPredicateProperty, ParquetPredicateValue];
|
|
151
221
|
};
|
|
152
222
|
|
|
153
223
|
/** Membership predicate applied to one top-level Parquet column. */
|
|
154
|
-
export type ParquetInPredicate = {
|
|
155
|
-
/** CQL2-shaped membership operator. */
|
|
156
|
-
op: 'in';
|
|
157
|
-
/** Column reference followed by the candidate scalar values. */
|
|
224
|
+
export type ParquetInPredicate = Omit<ColumnarInPredicate, 'args'> & {
|
|
158
225
|
args: readonly [ParquetPredicateProperty, readonly ParquetPredicateValue[]];
|
|
159
226
|
};
|
|
160
227
|
|
|
161
228
|
/** Null predicate applied to one top-level Parquet column. */
|
|
162
|
-
export type ParquetNullPredicate = {
|
|
163
|
-
/** CQL2-shaped null test operator. */
|
|
164
|
-
op: 'isNull';
|
|
165
|
-
/** Column reference to test. */
|
|
229
|
+
export type ParquetNullPredicate = Omit<ColumnarNullPredicate, 'args'> & {
|
|
166
230
|
args: readonly [ParquetPredicateProperty];
|
|
167
231
|
};
|
|
168
232
|
|
|
169
233
|
/** Logical composition of serializable Parquet predicates. */
|
|
170
|
-
export type ParquetLogicalPredicate = {
|
|
171
|
-
/** CQL2-shaped logical operator applied to the child predicates. */
|
|
172
|
-
op: 'and' | 'or';
|
|
173
|
-
/** At least two child predicates. */
|
|
234
|
+
export type ParquetLogicalPredicate = Omit<ColumnarLogicalPredicate, 'args'> & {
|
|
174
235
|
args: readonly ParquetPredicate[];
|
|
175
236
|
};
|
|
176
237
|
|
|
177
238
|
/** Negation of one serializable Parquet predicate. */
|
|
178
|
-
export type ParquetNotPredicate = {
|
|
179
|
-
/** CQL2-shaped logical negation operator. */
|
|
180
|
-
op: 'not';
|
|
181
|
-
/** Single child predicate. */
|
|
239
|
+
export type ParquetNotPredicate = Omit<ColumnarNotPredicate, 'args'> & {
|
|
182
240
|
args: readonly [ParquetPredicate];
|
|
183
241
|
};
|
|
184
242
|
|
|
@@ -201,6 +259,8 @@ export type ParquetSourceReadOptions = {
|
|
|
201
259
|
rowGroups?: readonly number[];
|
|
202
260
|
/** Top-level columns to fetch and decode. Defaults to all columns. */
|
|
203
261
|
columns?: readonly string[];
|
|
262
|
+
/** Maximum number of rows retained after filtering across all emitted batches. */
|
|
263
|
+
limit?: number;
|
|
204
264
|
/** Maximum number of rows in each emitted Arrow batch. Defaults to one row group per batch. */
|
|
205
265
|
batchSize?: number;
|
|
206
266
|
/** Maximum number of row groups decoded concurrently. */
|
|
@@ -209,10 +269,73 @@ export type ParquetSourceReadOptions = {
|
|
|
209
269
|
rowGroupFilter?: (rowGroup: ParquetRowGroupMetadata) => boolean;
|
|
210
270
|
/** Serializable exact row predicate, conservatively pushed into row-group statistics. */
|
|
211
271
|
predicate?: ParquetPredicate;
|
|
272
|
+
/** Spatial extent pruned with native statistics or a GeoParquet 1.1 bbox covering when present. */
|
|
273
|
+
bbox?: ParquetBoundingBox;
|
|
274
|
+
/** Geometry column whose GeoParquet covering should serve `bbox`; defaults to `primary_column`. */
|
|
275
|
+
geometryColumn?: string;
|
|
212
276
|
/** Abort this read and all of its outstanding range requests. */
|
|
213
277
|
signal?: AbortSignal;
|
|
278
|
+
/** Receives one portable terminal execution snapshot for this read. */
|
|
279
|
+
onTelemetry?: ScanExecutionTelemetryCallback;
|
|
214
280
|
};
|
|
215
281
|
|
|
282
|
+
/** Explain result for a Parquet table query, including footer-level row-group pruning. */
|
|
283
|
+
export type ParquetSourceExplain = TableQueryExplain<ParquetPredicate> &
|
|
284
|
+
Readonly<{
|
|
285
|
+
/** Physical source kind. */
|
|
286
|
+
source: 'parquet';
|
|
287
|
+
/** Row groups selected by the request and conservative footer statistics. */
|
|
288
|
+
rowGroups: Readonly<{
|
|
289
|
+
/** Zero-based row-group indexes retained by every physical pruning stage. */
|
|
290
|
+
indices: readonly number[];
|
|
291
|
+
requested: number;
|
|
292
|
+
selected: number;
|
|
293
|
+
/** Row groups rejected by the caller-supplied metadata callback. */
|
|
294
|
+
prunedByCallback: number;
|
|
295
|
+
/** Row groups rejected by file-native geospatial statistics. */
|
|
296
|
+
prunedBySpatial: number;
|
|
297
|
+
prunedByStatistics: number;
|
|
298
|
+
/** Row groups proven absent by split-block Bloom filters. */
|
|
299
|
+
prunedByBloomFilter: number;
|
|
300
|
+
}>;
|
|
301
|
+
/** Bloom-filter ranges inspected while producing the physical plan. */
|
|
302
|
+
bloomFilters: Readonly<{
|
|
303
|
+
read: number;
|
|
304
|
+
bytesRead: number;
|
|
305
|
+
}>;
|
|
306
|
+
/** Selective page-index plans available for retained row groups. */
|
|
307
|
+
pages: Readonly<{
|
|
308
|
+
rowGroupsPlanned: number;
|
|
309
|
+
indexesRead: number;
|
|
310
|
+
total: number;
|
|
311
|
+
selected: number;
|
|
312
|
+
rowsPruned: number;
|
|
313
|
+
plans: readonly ParquetPageScanPlan[];
|
|
314
|
+
}>;
|
|
315
|
+
}>;
|
|
316
|
+
|
|
317
|
+
/** Explainable page-index and data-range plan for one Parquet row group. */
|
|
318
|
+
export type ParquetPageScanPlan = Readonly<{
|
|
319
|
+
/** Zero-based row-group index. */
|
|
320
|
+
rowGroupIndex: number;
|
|
321
|
+
/** Physical phase represented by this plan. */
|
|
322
|
+
phase: 'combined' | 'predicate' | 'projection';
|
|
323
|
+
/** Nested column paths fetched during this physical phase. */
|
|
324
|
+
columns: readonly (readonly string[])[];
|
|
325
|
+
/** Candidate half-open row ranges retained by page statistics. */
|
|
326
|
+
rowRanges: readonly Readonly<{start: number; end: number}>[];
|
|
327
|
+
/** Column-index and offset-index payloads decoded. */
|
|
328
|
+
indexesRead: number;
|
|
329
|
+
/** Data pages represented by the selected columns. */
|
|
330
|
+
totalPages: number;
|
|
331
|
+
/** Data pages intersecting retained row ranges. */
|
|
332
|
+
selectedPages: number;
|
|
333
|
+
/** Logical rows excluded before data-page decoding. */
|
|
334
|
+
rowsPruned: number;
|
|
335
|
+
/** Absolute file ranges required for the retained data pages. */
|
|
336
|
+
ranges: readonly Readonly<{offset: number; length: number}>[];
|
|
337
|
+
}>;
|
|
338
|
+
|
|
216
339
|
/** Compatibility alias for selective source read options. */
|
|
217
340
|
export type ParquetReadOptions = ParquetSourceReadOptions;
|
|
218
341
|
|
|
@@ -244,6 +367,12 @@ export type ParquetTelemetry = {
|
|
|
244
367
|
rowGroupsPruned: number;
|
|
245
368
|
/** Candidate row groups proven impossible using footer statistics. */
|
|
246
369
|
rowGroupsPrunedByStatistics: number;
|
|
370
|
+
/** Candidate row groups proven impossible using split-block Bloom filters. */
|
|
371
|
+
rowGroupsPrunedByBloomFilter: number;
|
|
372
|
+
/** Bloom-filter payloads fetched for selective reads. */
|
|
373
|
+
bloomFiltersRead: number;
|
|
374
|
+
/** Bytes fetched for Bloom-filter payloads. */
|
|
375
|
+
bloomFilterBytesRead: number;
|
|
247
376
|
/** Row groups proven impossible using page-level column indexes. */
|
|
248
377
|
rowGroupsPrunedByPageIndex: number;
|
|
249
378
|
/** Column-index and offset-index blobs decoded for selective reads. */
|
|
@@ -277,6 +406,7 @@ export type ParquetTelemetryEvent = {
|
|
|
277
406
|
| 'range-request'
|
|
278
407
|
| 'cache-hit'
|
|
279
408
|
| 'row-group-prune'
|
|
409
|
+
| 'bloom-filter'
|
|
280
410
|
| 'page-index-prune'
|
|
281
411
|
| 'predicate-filter'
|
|
282
412
|
| 'decode'
|
|
@@ -346,6 +476,16 @@ export type ParquetSourceLoaderOptions = DataSourceOptions & {
|
|
|
346
476
|
headers?: HeadersInit;
|
|
347
477
|
/** Preserve binary values when the TypeScript decoder is used for later reads. */
|
|
348
478
|
preserveBinary?: boolean;
|
|
479
|
+
/** Decode legacy INT96 values as epoch-nanosecond timestamps. */
|
|
480
|
+
int96AsTimestamp?: boolean;
|
|
481
|
+
/** Verify page-header CRC values in TypeScript reads. */
|
|
482
|
+
verifyPageChecksums?: boolean;
|
|
483
|
+
/** Resolves modular-encryption keys from file and column key metadata. */
|
|
484
|
+
keyRetriever?: ParquetKeyRetriever;
|
|
485
|
+
/** AAD prefix for encrypted files that intentionally omit it from metadata. */
|
|
486
|
+
aadPrefix?: Uint8Array;
|
|
487
|
+
/** Verify plaintext-footer signatures when present. Enabled by default. */
|
|
488
|
+
verifyFooterSignature?: boolean;
|
|
349
489
|
/** Receives cumulative transport, pruning, decode, and batch telemetry events. */
|
|
350
490
|
onTelemetry?: (event: ParquetTelemetryEvent) => void;
|
|
351
491
|
/** Overrides the package-local worker used for selective source decoding. */
|
|
@@ -357,10 +497,11 @@ export type ParquetSourceLoaderOptions = DataSourceOptions & {
|
|
|
357
497
|
rangeRequests?: ParquetRangeRequestOptions;
|
|
358
498
|
};
|
|
359
499
|
|
|
360
|
-
/** Four
|
|
500
|
+
/** Four-, six-, or eight-dimensional extent used for conservative Parquet dataset file pruning. */
|
|
361
501
|
export type ParquetDatasetBoundingBox =
|
|
362
502
|
| readonly [number, number, number, number]
|
|
363
|
-
| readonly [number, number, number, number, number, number]
|
|
503
|
+
| readonly [number, number, number, number, number, number]
|
|
504
|
+
| readonly [number, number, number, number, number, number, number, number];
|
|
364
505
|
|
|
365
506
|
/** Scalar value carried by a partitioned Parquet dataset file descriptor. */
|
|
366
507
|
export type ParquetDatasetPartitionValue = string | number | boolean | null;
|
|
@@ -421,6 +562,34 @@ export type ParquetDatasetReadOptions = Omit<ParquetSourceReadOptions, 'rowGroup
|
|
|
421
562
|
fileConcurrency?: number;
|
|
422
563
|
};
|
|
423
564
|
|
|
565
|
+
/** One retained file and its child Parquet physical scan plan. */
|
|
566
|
+
export type ParquetDatasetFileScanPlan = Readonly<{
|
|
567
|
+
/** Position in provider output before descriptor pruning. */
|
|
568
|
+
fileIndex: number;
|
|
569
|
+
/** Stable descriptor or source identifier. */
|
|
570
|
+
fileId: string;
|
|
571
|
+
/** Descriptor partition values used during file pruning. */
|
|
572
|
+
partitions?: Readonly<Record<string, ParquetDatasetPartitionValue>>;
|
|
573
|
+
/** Physical row-group and Bloom-filter plan for this file. */
|
|
574
|
+
parquet: ParquetSourceExplain;
|
|
575
|
+
}>;
|
|
576
|
+
|
|
577
|
+
/** Common logical query explanation plus physical multi-file Parquet planning. */
|
|
578
|
+
export type ParquetDatasetExplain = TableQueryExplain<ParquetPredicate> &
|
|
579
|
+
Readonly<{
|
|
580
|
+
/** Physical source kind. */
|
|
581
|
+
source: 'parquet-dataset';
|
|
582
|
+
/** Descriptor discovery and file-pruning summary. */
|
|
583
|
+
files: Readonly<{
|
|
584
|
+
discovered: number;
|
|
585
|
+
selected: number;
|
|
586
|
+
prunedByBoundingBox: number;
|
|
587
|
+
prunedByPartitions: number;
|
|
588
|
+
}>;
|
|
589
|
+
/** Ordered physical plans for retained files. */
|
|
590
|
+
filePlans: readonly ParquetDatasetFileScanPlan[];
|
|
591
|
+
}>;
|
|
592
|
+
|
|
424
593
|
/** Dataset and file provenance attached to an emitted Arrow batch. */
|
|
425
594
|
export type ParquetDatasetBatchProvenance = ParquetBatchProvenance & {
|
|
426
595
|
/** Zero-based descriptor position in provider output, before local pruning. */
|
|
@@ -4,11 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
/** Module-relative worker asset for browser ESM and Node.js CommonJS distributions. */
|
|
6
6
|
export const PARQUET_WORKER_URL = import.meta.url
|
|
7
|
-
?
|
|
7
|
+
? getParquetWorkerUrl(import.meta.url)
|
|
8
8
|
: typeof __dirname === 'string'
|
|
9
9
|
? `${__dirname}/parquet-worker-node.cjs`
|
|
10
10
|
: true;
|
|
11
11
|
|
|
12
|
+
/** Builds a package-relative worker URL without making the development bundler resolve the asset. */
|
|
13
|
+
function getParquetWorkerUrl(moduleUrl: string): string {
|
|
14
|
+
return `${moduleUrl.slice(0, moduleUrl.lastIndexOf('/') + 1)}${getParquetWorkerFile()}`;
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
/** Selects the worker bundle for the current JavaScript runtime. */
|
|
13
18
|
function getParquetWorkerFile(): string {
|
|
14
19
|
const isNode = Boolean(
|
|
@@ -17,6 +17,29 @@ export type ParquetValueBuffer =
|
|
|
17
17
|
| Float32Array
|
|
18
18
|
| Float64Array;
|
|
19
19
|
|
|
20
|
+
/** Mutable Arrow-compatible destination for compact physical BYTE_ARRAY values. */
|
|
21
|
+
export type ParquetByteArrayOutput = {
|
|
22
|
+
/** Contiguous bytes copied from decoded physical values. */
|
|
23
|
+
data: Uint8Array;
|
|
24
|
+
/** Arrow-compatible offsets for compact non-null physical values. */
|
|
25
|
+
valueOffsets: Int32Array;
|
|
26
|
+
/** Number of bytes written to `data`. */
|
|
27
|
+
byteLength: number;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** Ensures a compact byte destination can accept an additional physical value. */
|
|
31
|
+
export function reserveParquetByteArrayOutput(
|
|
32
|
+
output: ParquetByteArrayOutput,
|
|
33
|
+
additionalByteLength: number
|
|
34
|
+
): void {
|
|
35
|
+
const requiredByteLength = output.byteLength + additionalByteLength;
|
|
36
|
+
if (requiredByteLength <= output.data.byteLength) return;
|
|
37
|
+
const nextByteLength = Math.max(requiredByteLength, output.data.byteLength * 2, 1024);
|
|
38
|
+
const data = new Uint8Array(nextByteLength);
|
|
39
|
+
data.set(output.data.subarray(0, output.byteLength));
|
|
40
|
+
output.data = data;
|
|
41
|
+
}
|
|
42
|
+
|
|
20
43
|
export interface CursorBuffer {
|
|
21
44
|
buffer: Uint8Array;
|
|
22
45
|
offset: number;
|
|
@@ -35,8 +58,12 @@ export interface ParquetCodecOptions {
|
|
|
35
58
|
outputOffset?: number;
|
|
36
59
|
/** Optional dictionary resolved while decoding dictionary indices. */
|
|
37
60
|
dictionary?: readonly unknown[];
|
|
61
|
+
/** Optional compact destination used by PLAIN BYTE_ARRAY decoding. */
|
|
62
|
+
byteArrayOutput?: ParquetByteArrayOutput;
|
|
38
63
|
/** Preserve decoded INT64 values as bigint instead of converting them to number. */
|
|
39
64
|
int64AsBigInt?: boolean;
|
|
65
|
+
/** Decode legacy INT96 physical values as epoch nanoseconds instead of raw numbers. */
|
|
66
|
+
int96AsTimestamp?: boolean;
|
|
40
67
|
}
|
|
41
68
|
|
|
42
69
|
export interface ParquetCodecKit {
|