@gscdump/engine 3.5.0 → 3.6.0
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/README.md +28 -18
- package/dist/THIRD-PARTY-LICENSES.md +2 -2
- package/dist/adapters/duckdb-node.d.mts +4 -4
- package/dist/adapters/duckdb-node.mjs +103 -77
- package/dist/adapters/filesystem.d.mts +6 -7
- package/dist/adapters/filesystem.mjs +11 -6
- package/dist/adapters/hyparquet.d.mts +9 -10
- package/dist/adapters/hyparquet.mjs +84 -44
- package/dist/adapters/node-harness.d.mts +3 -4
- package/dist/adapters/parquet-attach.d.mts +4 -5
- package/dist/adapters/parquet-attach.mjs +7 -2
- package/dist/adapters/r2-manifest.d.mts +4 -5
- package/dist/adapters/r2.d.mts +2 -3
- package/dist/adapters/snapshot-attach.d.mts +7 -8
- package/dist/adapters/snapshot-attach.mjs +7 -2
- package/dist/analysis-range.d.mts +2 -3
- package/dist/analysis-types.d.mts +4 -5
- package/dist/analyzer/define.d.mts +6 -7
- package/dist/analyzer/dispatch.d.mts +2 -3
- package/dist/analyzer/registry.d.mts +4 -5
- package/dist/analyzer/types.d.mts +11 -12
- package/dist/arrow-utils.d.mts +4 -5
- package/dist/arrow-utils.mjs +10 -0
- package/dist/coerce.d.mts +1 -2
- package/dist/compaction.d.mts +2 -3
- package/dist/drizzle-schema.d.mts +14 -15
- package/dist/duckdb.d.mts +5 -6
- package/dist/duckdb.mjs +9 -5
- package/dist/engine.d.mts +1 -2
- package/dist/entities/empty-types.d.mts +4 -5
- package/dist/entities/indexing-metadata.d.mts +5 -6
- package/dist/entities/inspection.d.mts +9 -10
- package/dist/entities/query-dim.d.mts +7 -7
- package/dist/entities/sitemap-shared.d.mts +26 -27
- package/dist/entities/sitemap-write.d.mts +1 -2
- package/dist/entities/sitemap.d.mts +1 -2
- package/dist/entity-keys.d.mts +28 -29
- package/dist/errors.d.mts +5 -6
- package/dist/iceberg/append-sink.d.mts +2 -3
- package/dist/iceberg/catalog.d.mts +10 -10
- package/dist/iceberg/catalog.mjs +2 -2
- package/dist/iceberg/overwrite-writer.d.mts +17 -18
- package/dist/iceberg/schema.d.mts +16 -16
- package/dist/ingest-accumulator.d.mts +8 -9
- package/dist/ingest.d.mts +15 -12
- package/dist/ingest.mjs +22 -6
- package/dist/layout.d.mts +4 -5
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/datapage.mjs +1 -1
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/indexes.mjs +1 -1
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/metadata.mjs +1 -1
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/types.d.mts +2 -3
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/types/index.d.mts +2 -3
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/assemble.mjs +3 -144
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/bloom.mjs +3 -58
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/column.mjs +8 -129
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/convert.mjs +3 -118
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/datapage.mjs +6 -144
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/delta.mjs +2 -65
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/encoding.mjs +2 -76
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/filter.mjs +4 -212
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/geoparquet.mjs +1 -24
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/index.mjs +3 -3
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/indexes.mjs +5 -32
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/metadata.mjs +7 -241
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/node.mjs +1 -5
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/plain.mjs +1 -79
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/plan.mjs +6 -375
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/read.mjs +6 -77
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/rowgroup.mjs +7 -175
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/scan.mjs +5 -73
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/schema.mjs +1 -22
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/snappy.mjs +1 -68
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/thrift.mjs +1 -86
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/types.d.mts +2 -28
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/utils.mjs +1 -31
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/variant.mjs +3 -228
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/wkb.mjs +1 -94
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/types/index.d.mts +2 -52
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/types/node.d.mts +2 -2
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/assemble.mjs +144 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/bloom.mjs +124 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/column.mjs +129 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/constants.mjs +80 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/convert.mjs +118 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/datapage.mjs +144 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/delta.mjs +65 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/encoding.mjs +76 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/filter.mjs +212 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/geoparquet.mjs +24 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/index.mjs +8 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/indexes.mjs +32 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/metadata.mjs +241 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/node.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/plain.mjs +79 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/plan.mjs +375 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/query.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/read.mjs +81 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/rowgroup.mjs +175 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/scan.mjs +74 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/schema.mjs +75 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/snappy.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/thrift.mjs +86 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/types.d.mts +25 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/utils.mjs +32 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/variant.mjs +228 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/wkb.mjs +94 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/xxhash.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/index.d.mts +58 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/node.d.mts +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/scan.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/utils.d.mts +1 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/index.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/read.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/icebergDataSource.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/icebergQuery.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/types.d.mts +17 -18
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/create.d.mts +1 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/index.d.mts +1 -1
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/manifest.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/metadata.d.mts +1 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/read.d.mts +1 -1
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/s3.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergDataSource.d.mts +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergQuery.d.mts +2 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/write/write.d.mts +2 -3
- package/dist/node_modules/.pnpm/squirreling@0.16.4/node_modules/squirreling/src/ast.d.mts +1 -0
- package/dist/parquet-plan.d.mts +5 -6
- package/dist/period/index.d.mts +8 -8
- package/dist/profile.d.mts +3 -3
- package/dist/report/define.d.mts +1 -2
- package/dist/report/hash.d.mts +3 -4
- package/dist/report/registry.d.mts +3 -4
- package/dist/report/types.d.mts +22 -23
- package/dist/resolver/adapter.d.mts +2 -3
- package/dist/resolver/canonical-source.d.mts +1 -2
- package/dist/resolver/compile.d.mts +12 -8
- package/dist/resolver/compile.mjs +7 -3
- package/dist/resolver/datasets.d.mts +9 -9
- package/dist/resolver/extras-overlay.d.mts +2 -3
- package/dist/resolver/filter-utils.d.mts +7 -7
- package/dist/resolver/fragments.d.mts +3 -4
- package/dist/resolver/pg-adapter.d.mts +7 -8
- package/dist/resolver/run-query.d.mts +16 -17
- package/dist/resolver/run-query.mjs +16 -15
- package/dist/resolver/schema-drift.d.mts +2 -3
- package/dist/resolver/types.d.mts +8 -9
- package/dist/rollups/canonical.d.mts +4 -5
- package/dist/rollups/core.d.mts +12 -13
- package/dist/rollups/defaults.d.mts +2 -3
- package/dist/rollups/hourly.d.mts +3 -4
- package/dist/rollups/indexing.d.mts +5 -6
- package/dist/rollups/traffic.d.mts +5 -6
- package/dist/rollups/windows.d.mts +7 -8
- package/dist/schedule.d.mts +6 -7
- package/dist/schema.d.mts +9 -9
- package/dist/scope.d.mts +6 -7
- package/dist/sink.d.mts +9 -10
- package/dist/sinks/in-memory-sink.d.mts +3 -4
- package/dist/snapshot.d.mts +2 -3
- package/dist/source/attached-table.d.mts +4 -5
- package/dist/source/create-sql-query-source.d.mts +2 -3
- package/dist/source/index.d.mts +6 -6
- package/dist/source/source-types.d.mts +7 -8
- package/dist/sql-bind.d.mts +3 -4
- package/dist/sql-fragments.d.mts +5 -6
- package/dist/storage.d.mts +37 -37
- package/dist/sync-config.d.mts +20 -21
- package/dist/vendor/hysnappy-purejs.d.mts +2 -3
- package/dist/vendor/hysnappy-purejs.mjs +1 -1
- package/package.json +12 -10
- package/dist/node_modules/.pnpm/icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergDataSource.d.mts +0 -2
- package/dist/node_modules/.pnpm/icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergQuery.d.mts +0 -2
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/create.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/indexes.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird → hyparquet@1.30.0/node_modules/hyparquet}/types/metadata.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/manifest.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/query.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/s3.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/read.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3/node_modules/squirreling/src/ast.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/snappy.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.metadata.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.read.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.write.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/file.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/loadTable.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/rest.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/create.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/delete.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/fetch.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/json.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/manifest.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/metadata.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/prune.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/deletion-vector.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/puffin.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/roaring.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/s3.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/schema.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sigv4.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/whereFilter.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/utils.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/commit.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/conversions.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/delete-file.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/geospatial.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/manifest-list.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/manifest.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/parquet.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/partition.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/rewrite.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/serde.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/snapshot.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/sort.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage-deletion-vector.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage-position-delete.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stats.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/transform.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/write.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/catalog/file.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/catalog/rest.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/fetch.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/batch.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/batchAdapters.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/dataSource.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/accumulator.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/aggregates.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/batchResults.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/batches.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/execute.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/fold.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/join.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/rowScope.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/scanColumn.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/sort.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/streamingAggregate.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/utils.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/window.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/yield.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/alias.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/batch.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/binary.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/date.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/evaluate.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/math.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/regexp.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/scalar.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/strings.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/index.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/index.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/expression.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/extractTables.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/functions.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/joins.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/parse.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/primary.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/state.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/tokenize.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/types.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/columns.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/plan.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/types.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/bbox.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/equality.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/operations.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/pointRelations.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/primitives.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/segments.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/spatial.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/wkt.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/types.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/aggregates.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/executionErrors.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/functions.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/keywords.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/parseErrors.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/tables.mjs +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AsyncBuffer as AsyncBuffer$1
|
|
1
|
+
import { AsyncBuffer as AsyncBuffer$1 } from "../src/types.mjs";
|
|
2
2
|
import "./indexes.mjs";
|
|
3
3
|
import "./metadata.mjs";
|
|
4
4
|
import "./read.mjs";
|
|
@@ -6,54 +6,4 @@ import "./scan.mjs";
|
|
|
6
6
|
import "./query.mjs";
|
|
7
7
|
import "./snappy.mjs";
|
|
8
8
|
import "./utils.mjs";
|
|
9
|
-
type AsyncBuffer = AsyncBuffer$1;
|
|
10
|
-
type ParquetQueryFilter = ParquetQueryFilter$1;
|
|
11
|
-
/**
|
|
12
|
-
* Explicitly export types for use in downstream typescript projects through
|
|
13
|
-
* `import { ParquetReadOptions } from 'hyparquet'` for example.
|
|
14
|
-
*
|
|
15
|
-
* @template {any} T
|
|
16
|
-
* @typedef {import('../src/types.d.ts').Awaitable<T>} Awaitable<T>
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* @typedef {import('../src/types.d.ts').AsyncBuffer} AsyncBuffer
|
|
20
|
-
* @typedef {import('../src/types.d.ts').AsyncRowGroup} AsyncRowGroup
|
|
21
|
-
* @typedef {import('../src/types.d.ts').DataReader} DataReader
|
|
22
|
-
* @typedef {import('../src/types.d.ts').FileMetaData} FileMetaData
|
|
23
|
-
* @typedef {import('../src/types.d.ts').SchemaTree} SchemaTree
|
|
24
|
-
* @typedef {import('../src/types.d.ts').SchemaElement} SchemaElement
|
|
25
|
-
* @typedef {import('../src/types.d.ts').ParquetType} ParquetType
|
|
26
|
-
* @typedef {import('../src/types.d.ts').FieldRepetitionType} FieldRepetitionType
|
|
27
|
-
* @typedef {import('../src/types.d.ts').ConvertedType} ConvertedType
|
|
28
|
-
* @typedef {import('../src/types.d.ts').TimeUnit} TimeUnit
|
|
29
|
-
* @typedef {import('../src/types.d.ts').LogicalType} LogicalType
|
|
30
|
-
* @typedef {import('../src/types.d.ts').RowGroup} RowGroup
|
|
31
|
-
* @typedef {import('../src/types.d.ts').ColumnChunk} ColumnChunk
|
|
32
|
-
* @typedef {import('../src/types.d.ts').ColumnMetaData} ColumnMetaData
|
|
33
|
-
* @typedef {import('../src/types.d.ts').Encoding} Encoding
|
|
34
|
-
* @typedef {import('../src/types.d.ts').CompressionCodec} CompressionCodec
|
|
35
|
-
* @typedef {import('../src/types.d.ts').Compressors} Compressors
|
|
36
|
-
* @typedef {import('../src/types.d.ts').KeyValue} KeyValue
|
|
37
|
-
* @typedef {import('../src/types.d.ts').Statistics} Statistics
|
|
38
|
-
* @typedef {import('../src/types.d.ts').GeospatialStatistics} GeospatialStatistics
|
|
39
|
-
* @typedef {import('../src/types.d.ts').BoundingBox} BoundingBox
|
|
40
|
-
* @typedef {import('../src/types.d.ts').PageType} PageType
|
|
41
|
-
* @typedef {import('../src/types.d.ts').PageHeader} PageHeader
|
|
42
|
-
* @typedef {import('../src/types.d.ts').DataPageHeader} DataPageHeader
|
|
43
|
-
* @typedef {import('../src/types.d.ts').DictionaryPageHeader} DictionaryPageHeader
|
|
44
|
-
* @typedef {import('../src/types.d.ts').DecodedArray} DecodedArray
|
|
45
|
-
* @typedef {import('../src/types.d.ts').OffsetIndex} OffsetIndex
|
|
46
|
-
* @typedef {import('../src/types.d.ts').ColumnIndex} ColumnIndex
|
|
47
|
-
* @typedef {import('../src/types.d.ts').BoundaryOrder} BoundaryOrder
|
|
48
|
-
* @typedef {import('../src/types.d.ts').ColumnData} ColumnData
|
|
49
|
-
* @typedef {import('../src/types.d.ts').SubColumnData} SubColumnData
|
|
50
|
-
* @typedef {import('../src/types.d.ts').ParquetReadOptions} ParquetReadOptions
|
|
51
|
-
* @typedef {import('../src/types.d.ts').ParquetRowRange} ParquetRowRange
|
|
52
|
-
* @typedef {import('../src/types.d.ts').ParquetScan} ParquetScan
|
|
53
|
-
* @typedef {import('../src/types.d.ts').ParquetScanColumnOptions} ParquetScanColumnOptions
|
|
54
|
-
* @typedef {import('../src/types.d.ts').ParquetScanOptions} ParquetScanOptions
|
|
55
|
-
* @typedef {import('../src/types.d.ts').MetadataOptions} MetadataOptions
|
|
56
|
-
* @typedef {import('../src/types.d.ts').ParquetParsers} ParquetParsers
|
|
57
|
-
* @typedef {import('../src/types.d.ts').ParquetQueryFilter} ParquetQueryFilter
|
|
58
|
-
*/
|
|
59
|
-
export { AsyncBuffer, ParquetQueryFilter };
|
|
9
|
+
export type AsyncBuffer = AsyncBuffer$1;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../src/types.mjs";
|
|
2
|
-
import { AsyncBuffer
|
|
3
|
-
export { AsyncBuffer
|
|
2
|
+
import { AsyncBuffer } from "./index.mjs";
|
|
3
|
+
export { AsyncBuffer };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { getMaxDefinitionLevel, isListLike, isMapLike } from "./schema.mjs";
|
|
2
|
+
import { decodeVariantColumn } from "./variant.mjs";
|
|
3
|
+
function assembleLists(output, definitionLevels, repetitionLevels, values, schemaPath) {
|
|
4
|
+
const maxDefinitionLevel = getMaxDefinitionLevel(schemaPath);
|
|
5
|
+
if (!definitionLevels?.length && !repetitionLevels.length) {
|
|
6
|
+
if (!maxDefinitionLevel || !values.length) return values;
|
|
7
|
+
definitionLevels = new Array(values.length).fill(maxDefinitionLevel);
|
|
8
|
+
}
|
|
9
|
+
const n = definitionLevels?.length || repetitionLevels.length;
|
|
10
|
+
const repetitionPath = schemaPath.map(({ element }) => element.repetition_type);
|
|
11
|
+
let valueIndex = 0;
|
|
12
|
+
const containerStack = [output];
|
|
13
|
+
let currentContainer = output;
|
|
14
|
+
let currentDepth = 0;
|
|
15
|
+
let currentDefLevel = 0;
|
|
16
|
+
let currentRepLevel = 0;
|
|
17
|
+
if (repetitionLevels[0]) while (currentDepth < repetitionPath.length - 2 && currentRepLevel < repetitionLevels[0]) {
|
|
18
|
+
currentDepth++;
|
|
19
|
+
if (repetitionPath[currentDepth] !== "REQUIRED") {
|
|
20
|
+
currentContainer = currentContainer.at(-1);
|
|
21
|
+
containerStack.push(currentContainer);
|
|
22
|
+
currentDefLevel++;
|
|
23
|
+
}
|
|
24
|
+
if (repetitionPath[currentDepth] === "REPEATED") currentRepLevel++;
|
|
25
|
+
}
|
|
26
|
+
for (let i = 0; i < n; i++) {
|
|
27
|
+
const def = definitionLevels?.length ? definitionLevels[i] : maxDefinitionLevel;
|
|
28
|
+
const rep = repetitionLevels[i];
|
|
29
|
+
while (currentDepth && (rep < currentRepLevel || repetitionPath[currentDepth] !== "REPEATED")) {
|
|
30
|
+
if (repetitionPath[currentDepth] !== "REQUIRED") {
|
|
31
|
+
containerStack.pop();
|
|
32
|
+
currentDefLevel--;
|
|
33
|
+
}
|
|
34
|
+
if (repetitionPath[currentDepth] === "REPEATED") currentRepLevel--;
|
|
35
|
+
currentDepth--;
|
|
36
|
+
}
|
|
37
|
+
currentContainer = containerStack.at(-1);
|
|
38
|
+
while ((currentDepth < repetitionPath.length - 2 || repetitionPath[currentDepth + 1] === "REPEATED") && (currentDefLevel < def || repetitionPath[currentDepth + 1] === "REQUIRED")) {
|
|
39
|
+
currentDepth++;
|
|
40
|
+
if (repetitionPath[currentDepth] !== "REQUIRED") {
|
|
41
|
+
const newList = [];
|
|
42
|
+
currentContainer.push(newList);
|
|
43
|
+
currentContainer = newList;
|
|
44
|
+
containerStack.push(newList);
|
|
45
|
+
currentDefLevel++;
|
|
46
|
+
}
|
|
47
|
+
if (repetitionPath[currentDepth] === "REPEATED") currentRepLevel++;
|
|
48
|
+
}
|
|
49
|
+
if (def === maxDefinitionLevel) currentContainer.push(values[valueIndex++]);
|
|
50
|
+
else if (currentDepth === repetitionPath.length - 2) currentContainer.push(null);
|
|
51
|
+
else currentContainer.push([]);
|
|
52
|
+
}
|
|
53
|
+
if (!output.length) for (let i = 0; i < maxDefinitionLevel; i++) {
|
|
54
|
+
const newList = [];
|
|
55
|
+
currentContainer.push(newList);
|
|
56
|
+
currentContainer = newList;
|
|
57
|
+
}
|
|
58
|
+
return output;
|
|
59
|
+
}
|
|
60
|
+
function assembleNested(subcolumnData, schema, parsers, depth = 0) {
|
|
61
|
+
const path = schema.path.join(".");
|
|
62
|
+
const optional = schema.element.repetition_type === "OPTIONAL";
|
|
63
|
+
const nextDepth = optional ? depth + 1 : depth;
|
|
64
|
+
if (isListLike(schema)) {
|
|
65
|
+
let sublist = schema.children[0];
|
|
66
|
+
let subDepth = nextDepth;
|
|
67
|
+
if (sublist.children.length === 1) {
|
|
68
|
+
sublist = sublist.children[0];
|
|
69
|
+
subDepth++;
|
|
70
|
+
}
|
|
71
|
+
assembleNested(subcolumnData, sublist, parsers, subDepth);
|
|
72
|
+
const subcolumn = sublist.path.join(".");
|
|
73
|
+
const values = subcolumnData.get(subcolumn);
|
|
74
|
+
if (!values) throw new Error("parquet list column missing values");
|
|
75
|
+
if (optional) flattenAtDepth(values, depth);
|
|
76
|
+
subcolumnData.set(path, values);
|
|
77
|
+
subcolumnData.delete(subcolumn);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (isMapLike(schema)) {
|
|
81
|
+
const mapName = schema.children[0].element.name;
|
|
82
|
+
assembleNested(subcolumnData, schema.children[0].children[0], parsers, nextDepth + 1);
|
|
83
|
+
assembleNested(subcolumnData, schema.children[0].children[1], parsers, nextDepth + 1);
|
|
84
|
+
const keys = subcolumnData.get(`${path}.${mapName}.key`);
|
|
85
|
+
const values = subcolumnData.get(`${path}.${mapName}.value`);
|
|
86
|
+
if (!keys) throw new Error("parquet map column missing keys");
|
|
87
|
+
if (!values) throw new Error("parquet map column missing values");
|
|
88
|
+
if (keys.length !== values.length) throw new Error("parquet map column key/value length mismatch");
|
|
89
|
+
const out = assembleMaps(keys, values, nextDepth);
|
|
90
|
+
if (optional) flattenAtDepth(out, depth);
|
|
91
|
+
subcolumnData.delete(`${path}.${mapName}.key`);
|
|
92
|
+
subcolumnData.delete(`${path}.${mapName}.value`);
|
|
93
|
+
subcolumnData.set(path, out);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (schema.children.length) {
|
|
97
|
+
const invertDepth = schema.element.repetition_type === "REQUIRED" ? depth : depth + 1;
|
|
98
|
+
const struct = {};
|
|
99
|
+
for (const child of schema.children) {
|
|
100
|
+
assembleNested(subcolumnData, child, parsers, invertDepth);
|
|
101
|
+
const childData = subcolumnData.get(child.path.join("."));
|
|
102
|
+
if (!childData) throw new Error("parquet struct missing child data");
|
|
103
|
+
struct[child.element.name] = childData;
|
|
104
|
+
}
|
|
105
|
+
for (const child of schema.children) subcolumnData.delete(child.path.join("."));
|
|
106
|
+
let inverted = invertStruct(struct, invertDepth);
|
|
107
|
+
if (schema.element.logical_type?.type === "VARIANT") inverted = decodeVariantColumn(inverted, parsers);
|
|
108
|
+
if (optional) flattenAtDepth(inverted, depth);
|
|
109
|
+
subcolumnData.set(path, inverted);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function flattenAtDepth(arr, depth) {
|
|
113
|
+
for (let i = 0; i < arr.length; i++) if (depth) flattenAtDepth(arr[i], depth - 1);
|
|
114
|
+
else arr[i] = arr[i][0];
|
|
115
|
+
}
|
|
116
|
+
function assembleMaps(keys, values, depth) {
|
|
117
|
+
const out = [];
|
|
118
|
+
for (let i = 0; i < keys.length; i++) if (depth) out.push(assembleMaps(keys[i], values[i], depth - 1));
|
|
119
|
+
else if (keys[i]) {
|
|
120
|
+
const obj = {};
|
|
121
|
+
for (let j = 0; j < keys[i].length; j++) {
|
|
122
|
+
const value = values[i][j];
|
|
123
|
+
obj[keys[i][j]] = value === void 0 ? null : value;
|
|
124
|
+
}
|
|
125
|
+
out.push(obj);
|
|
126
|
+
} else out.push(void 0);
|
|
127
|
+
return out;
|
|
128
|
+
}
|
|
129
|
+
function invertStruct(struct, depth) {
|
|
130
|
+
const keys = Object.keys(struct);
|
|
131
|
+
const length = struct[keys[0]]?.length;
|
|
132
|
+
const out = [];
|
|
133
|
+
for (let i = 0; i < length; i++) {
|
|
134
|
+
const obj = {};
|
|
135
|
+
for (const key of keys) {
|
|
136
|
+
if (struct[key].length !== length) throw new Error("parquet struct parsing error");
|
|
137
|
+
obj[key] = struct[key][i];
|
|
138
|
+
}
|
|
139
|
+
if (depth) out.push(invertStruct(obj, depth - 1));
|
|
140
|
+
else out.push(obj);
|
|
141
|
+
}
|
|
142
|
+
return out;
|
|
143
|
+
}
|
|
144
|
+
export { assembleLists, assembleNested };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { deserializeTCompactProtocol } from "./thrift.mjs";
|
|
2
|
+
import { xxhash64 } from "./xxhash.mjs";
|
|
3
|
+
const textEncoder = new TextEncoder();
|
|
4
|
+
const SALT = new Uint32Array([
|
|
5
|
+
1203114875,
|
|
6
|
+
1150766481,
|
|
7
|
+
2284105051,
|
|
8
|
+
2729912477,
|
|
9
|
+
1884591559,
|
|
10
|
+
770785867,
|
|
11
|
+
2667333959,
|
|
12
|
+
1550580529
|
|
13
|
+
]);
|
|
14
|
+
function blockIndex(hash, numBlocks) {
|
|
15
|
+
return Number((hash >> 32n) * BigInt(numBlocks) >> 32n);
|
|
16
|
+
}
|
|
17
|
+
function blockMask(hash) {
|
|
18
|
+
const m = /* @__PURE__ */ new Uint32Array(8);
|
|
19
|
+
const low = Number(hash & 4294967295n) | 0;
|
|
20
|
+
for (let i = 0; i < 8; i++) m[i] = 1 << (Math.imul(low, SALT[i]) >>> 27);
|
|
21
|
+
return m;
|
|
22
|
+
}
|
|
23
|
+
function sbbfContains(blocks, hash) {
|
|
24
|
+
const offset = blockIndex(hash, blocks.length >> 3) << 3;
|
|
25
|
+
const m = blockMask(hash);
|
|
26
|
+
for (let i = 0; i < 8; i++) if ((blocks[offset + i] & m[i]) === 0) return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function readBloomFilter(reader) {
|
|
30
|
+
const header = deserializeTCompactProtocol(reader);
|
|
31
|
+
const numBytes = header.field_1;
|
|
32
|
+
if (typeof numBytes !== "number" || numBytes <= 0 || numBytes % 32 !== 0) return void 0;
|
|
33
|
+
if (!header.field_2?.field_1) return void 0;
|
|
34
|
+
if (!header.field_3?.field_1) return void 0;
|
|
35
|
+
if (!header.field_4?.field_1) return void 0;
|
|
36
|
+
const { view, offset } = reader;
|
|
37
|
+
if (offset + numBytes > view.byteLength) throw new Error(`parquet bloom filter truncated: need ${numBytes} bytes, have ${view.byteLength - offset}`);
|
|
38
|
+
const blocks = new Uint32Array(numBytes >> 2);
|
|
39
|
+
for (let i = 0; i < blocks.length; i++) blocks[i] = view.getUint32(offset + i * 4, true);
|
|
40
|
+
reader.offset = offset + numBytes;
|
|
41
|
+
return {
|
|
42
|
+
numBytes,
|
|
43
|
+
blocks
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function hashParquetValue(value, element) {
|
|
47
|
+
if (value === null || value === void 0) return void 0;
|
|
48
|
+
const { type, converted_type, logical_type } = element;
|
|
49
|
+
if (type === "BOOLEAN") {
|
|
50
|
+
if (typeof value !== "boolean") return void 0;
|
|
51
|
+
return xxhash64(new Uint8Array([value ? 1 : 0]));
|
|
52
|
+
}
|
|
53
|
+
if (type === "FLOAT") {
|
|
54
|
+
if (typeof value !== "number") return void 0;
|
|
55
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(4);
|
|
56
|
+
new DataView(buf).setFloat32(0, value, true);
|
|
57
|
+
return xxhash64(new Uint8Array(buf));
|
|
58
|
+
}
|
|
59
|
+
if (type === "DOUBLE") {
|
|
60
|
+
if (typeof value !== "number") return void 0;
|
|
61
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(8);
|
|
62
|
+
new DataView(buf).setFloat64(0, value, true);
|
|
63
|
+
return xxhash64(new Uint8Array(buf));
|
|
64
|
+
}
|
|
65
|
+
if (type === "INT32") {
|
|
66
|
+
if (converted_type === "DATE" || converted_type === "DECIMAL" || converted_type === "TIME_MILLIS") return void 0;
|
|
67
|
+
if (logical_type?.type === "DATE" || logical_type?.type === "TIME" || logical_type?.type === "DECIMAL") return void 0;
|
|
68
|
+
if (typeof value !== "number" || !Number.isInteger(value)) return void 0;
|
|
69
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(4);
|
|
70
|
+
new DataView(buf).setInt32(0, value | 0, true);
|
|
71
|
+
return xxhash64(new Uint8Array(buf));
|
|
72
|
+
}
|
|
73
|
+
if (type === "INT64") {
|
|
74
|
+
if (converted_type === "TIMESTAMP_MILLIS" || converted_type === "TIMESTAMP_MICROS") return void 0;
|
|
75
|
+
if (converted_type === "TIME_MICROS" || converted_type === "DECIMAL") return void 0;
|
|
76
|
+
if (logical_type?.type === "TIMESTAMP" || logical_type?.type === "TIME" || logical_type?.type === "DECIMAL") return void 0;
|
|
77
|
+
let bigValue;
|
|
78
|
+
if (typeof value === "bigint") bigValue = value;
|
|
79
|
+
else if (typeof value === "number" && Number.isSafeInteger(value)) bigValue = BigInt(value);
|
|
80
|
+
else return void 0;
|
|
81
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(8);
|
|
82
|
+
new DataView(buf).setBigUint64(0, BigInt.asUintN(64, bigValue), true);
|
|
83
|
+
return xxhash64(new Uint8Array(buf));
|
|
84
|
+
}
|
|
85
|
+
if (type === "BYTE_ARRAY") {
|
|
86
|
+
if (converted_type === "JSON" || converted_type === "BSON" || converted_type === "DECIMAL") return void 0;
|
|
87
|
+
if (logical_type?.type === "JSON" || logical_type?.type === "BSON" || logical_type?.type === "VARIANT") return void 0;
|
|
88
|
+
if (logical_type?.type === "GEOMETRY" || logical_type?.type === "GEOGRAPHY") return void 0;
|
|
89
|
+
if (typeof value === "string") return xxhash64(textEncoder.encode(value));
|
|
90
|
+
if (value instanceof Uint8Array) return xxhash64(value);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (type === "FIXED_LEN_BYTE_ARRAY") {
|
|
94
|
+
if (converted_type === "DECIMAL" || converted_type === "INTERVAL") return void 0;
|
|
95
|
+
if (logical_type?.type === "DECIMAL" || logical_type?.type === "UUID" || logical_type?.type === "FLOAT16") return void 0;
|
|
96
|
+
if (logical_type?.type === "GEOMETRY" || logical_type?.type === "GEOGRAPHY") return void 0;
|
|
97
|
+
if (value instanceof Uint8Array) return xxhash64(value);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
function bloomEligibleColumns(filter) {
|
|
102
|
+
const out = /* @__PURE__ */ new Set();
|
|
103
|
+
walkBloomEligible(filter, out);
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
function walkBloomEligible(filter, out) {
|
|
107
|
+
if (!filter) return;
|
|
108
|
+
if ("$and" in filter && Array.isArray(filter.$and)) {
|
|
109
|
+
for (const sub of filter.$and) walkBloomEligible(sub, out);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if ("$or" in filter && Array.isArray(filter.$or)) {
|
|
113
|
+
for (const sub of filter.$or) walkBloomEligible(sub, out);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if ("$nor" in filter) return;
|
|
117
|
+
for (const [field, condition] of Object.entries(filter)) {
|
|
118
|
+
if (field.startsWith("$")) continue;
|
|
119
|
+
if (typeof condition === "object" && condition !== null && !Array.isArray(condition)) {
|
|
120
|
+
if ("$eq" in condition || "$in" in condition) out.add(field);
|
|
121
|
+
} else out.add(field);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export { bloomEligibleColumns, hashParquetValue, readBloomFilter, sbbfContains };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Encodings, PageTypes } from "./constants.mjs";
|
|
2
|
+
import { convert, convertWithDictionary } from "./convert.mjs";
|
|
3
|
+
import { isFlatColumn } from "./schema.mjs";
|
|
4
|
+
import { deserializeTCompactProtocol } from "./thrift.mjs";
|
|
5
|
+
import { assembleLists } from "./assemble.mjs";
|
|
6
|
+
import { readPlain } from "./plain.mjs";
|
|
7
|
+
import { decompressPage, readDataPage, readDataPageV2 } from "./datapage.mjs";
|
|
8
|
+
function readColumn(reader, { groupStart, selectStart, selectEnd }, columnDecoder, onPage) {
|
|
9
|
+
const { pathInSchema, schemaPath } = columnDecoder;
|
|
10
|
+
const isFlat = isFlatColumn(schemaPath);
|
|
11
|
+
const chunks = [];
|
|
12
|
+
let dictionary = void 0;
|
|
13
|
+
let lastChunk = void 0;
|
|
14
|
+
let rowCount = 0;
|
|
15
|
+
let skipped = 0;
|
|
16
|
+
const emitLastChunk = onPage && (() => {
|
|
17
|
+
lastChunk && onPage({
|
|
18
|
+
pathInSchema,
|
|
19
|
+
columnData: lastChunk,
|
|
20
|
+
rowStart: groupStart + rowCount - lastChunk.length,
|
|
21
|
+
rowEnd: groupStart + rowCount
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
while (isFlat ? rowCount < selectEnd : reader.offset < reader.view.byteLength - 1) {
|
|
25
|
+
if (reader.offset >= reader.view.byteLength - 1) break;
|
|
26
|
+
const header = parquetHeader(reader);
|
|
27
|
+
if (header.type === "DICTIONARY_PAGE") {
|
|
28
|
+
const { data } = readPage(reader, header, columnDecoder, dictionary, void 0, 0);
|
|
29
|
+
if (data) dictionary = convert(data, columnDecoder);
|
|
30
|
+
} else {
|
|
31
|
+
const lastChunkLength = lastChunk?.length || 0;
|
|
32
|
+
const result = readPage(reader, header, columnDecoder, dictionary, lastChunk, selectStart - rowCount);
|
|
33
|
+
if (result.skipped) {
|
|
34
|
+
if (!chunks.length) skipped += result.skipped;
|
|
35
|
+
rowCount += result.skipped;
|
|
36
|
+
} else if (result.data && lastChunk === result.data) rowCount += result.data.length - lastChunkLength;
|
|
37
|
+
else if (result.data && result.data.length) {
|
|
38
|
+
emitLastChunk?.();
|
|
39
|
+
chunks.push(result.data);
|
|
40
|
+
rowCount += result.data.length;
|
|
41
|
+
lastChunk = result.data;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
emitLastChunk?.();
|
|
46
|
+
return {
|
|
47
|
+
data: chunks,
|
|
48
|
+
skipped
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function readPage(reader, header, columnDecoder, dictionary, previousChunk, pageStart) {
|
|
52
|
+
const { type, element, schemaPath, codec, compressors } = columnDecoder;
|
|
53
|
+
const compressedBytes = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, header.compressed_page_size);
|
|
54
|
+
reader.offset += header.compressed_page_size;
|
|
55
|
+
if (header.type === "DATA_PAGE") {
|
|
56
|
+
const daph = header.data_page_header;
|
|
57
|
+
if (!daph) throw new Error("parquet data page header is undefined");
|
|
58
|
+
if (pageStart > daph.num_values && isFlatColumn(schemaPath)) return { skipped: daph.num_values };
|
|
59
|
+
const page = decompressPage(compressedBytes, Number(header.uncompressed_page_size), codec, compressors);
|
|
60
|
+
const { definitionLevels, repetitionLevels, dataPage } = readDataPage(page, daph, columnDecoder);
|
|
61
|
+
const values = convertWithDictionary(dataPage, dictionary, daph.encoding, columnDecoder);
|
|
62
|
+
return {
|
|
63
|
+
skipped: 0,
|
|
64
|
+
data: assembleLists(Array.isArray(previousChunk) ? previousChunk : [], definitionLevels, repetitionLevels, values, schemaPath)
|
|
65
|
+
};
|
|
66
|
+
} else if (header.type === "DATA_PAGE_V2") {
|
|
67
|
+
const daph2 = header.data_page_header_v2;
|
|
68
|
+
if (!daph2) throw new Error("parquet data page header v2 is undefined");
|
|
69
|
+
if (pageStart > daph2.num_rows) return { skipped: daph2.num_values };
|
|
70
|
+
const { definitionLevels, repetitionLevels, dataPage } = readDataPageV2(compressedBytes, header, columnDecoder);
|
|
71
|
+
const values = convertWithDictionary(dataPage, dictionary, daph2.encoding, columnDecoder);
|
|
72
|
+
return {
|
|
73
|
+
skipped: 0,
|
|
74
|
+
data: assembleLists(Array.isArray(previousChunk) ? previousChunk : [], definitionLevels, repetitionLevels, values, schemaPath)
|
|
75
|
+
};
|
|
76
|
+
} else if (header.type === "DICTIONARY_PAGE") {
|
|
77
|
+
const diph = header.dictionary_page_header;
|
|
78
|
+
if (!diph) throw new Error("parquet dictionary page header is undefined");
|
|
79
|
+
const page = decompressPage(compressedBytes, Number(header.uncompressed_page_size), codec, compressors);
|
|
80
|
+
const reader = {
|
|
81
|
+
view: new DataView(page.buffer, page.byteOffset, page.byteLength),
|
|
82
|
+
offset: 0
|
|
83
|
+
};
|
|
84
|
+
return {
|
|
85
|
+
skipped: 0,
|
|
86
|
+
data: readPlain(reader, type, diph.num_values, element.type_length)
|
|
87
|
+
};
|
|
88
|
+
} else throw new Error(`parquet unsupported page type: ${header.type}`);
|
|
89
|
+
}
|
|
90
|
+
function parquetHeader(reader) {
|
|
91
|
+
const header = deserializeTCompactProtocol(reader);
|
|
92
|
+
return {
|
|
93
|
+
type: PageTypes[header.field_1],
|
|
94
|
+
uncompressed_page_size: header.field_2,
|
|
95
|
+
compressed_page_size: header.field_3,
|
|
96
|
+
crc: header.field_4,
|
|
97
|
+
data_page_header: header.field_5 && {
|
|
98
|
+
num_values: header.field_5.field_1,
|
|
99
|
+
encoding: Encodings[header.field_5.field_2],
|
|
100
|
+
definition_level_encoding: Encodings[header.field_5.field_3],
|
|
101
|
+
repetition_level_encoding: Encodings[header.field_5.field_4],
|
|
102
|
+
statistics: header.field_5.field_5 && {
|
|
103
|
+
max: header.field_5.field_5.field_1,
|
|
104
|
+
min: header.field_5.field_5.field_2,
|
|
105
|
+
null_count: header.field_5.field_5.field_3,
|
|
106
|
+
distinct_count: header.field_5.field_5.field_4,
|
|
107
|
+
max_value: header.field_5.field_5.field_5,
|
|
108
|
+
min_value: header.field_5.field_5.field_6
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
index_page_header: header.field_6,
|
|
112
|
+
dictionary_page_header: header.field_7 && {
|
|
113
|
+
num_values: header.field_7.field_1,
|
|
114
|
+
encoding: Encodings[header.field_7.field_2],
|
|
115
|
+
is_sorted: header.field_7.field_3
|
|
116
|
+
},
|
|
117
|
+
data_page_header_v2: header.field_8 && {
|
|
118
|
+
num_values: header.field_8.field_1,
|
|
119
|
+
num_nulls: header.field_8.field_2,
|
|
120
|
+
num_rows: header.field_8.field_3,
|
|
121
|
+
encoding: Encodings[header.field_8.field_4],
|
|
122
|
+
definition_levels_byte_length: header.field_8.field_5,
|
|
123
|
+
repetition_levels_byte_length: header.field_8.field_6,
|
|
124
|
+
is_compressed: header.field_8.field_7 === void 0 ? true : header.field_8.field_7,
|
|
125
|
+
statistics: header.field_8.field_8
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export { readColumn, readPage };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const ParquetTypes = [
|
|
2
|
+
"BOOLEAN",
|
|
3
|
+
"INT32",
|
|
4
|
+
"INT64",
|
|
5
|
+
"INT96",
|
|
6
|
+
"FLOAT",
|
|
7
|
+
"DOUBLE",
|
|
8
|
+
"BYTE_ARRAY",
|
|
9
|
+
"FIXED_LEN_BYTE_ARRAY"
|
|
10
|
+
];
|
|
11
|
+
const Encodings = [
|
|
12
|
+
"PLAIN",
|
|
13
|
+
"GROUP_VAR_INT",
|
|
14
|
+
"PLAIN_DICTIONARY",
|
|
15
|
+
"RLE",
|
|
16
|
+
"BIT_PACKED",
|
|
17
|
+
"DELTA_BINARY_PACKED",
|
|
18
|
+
"DELTA_LENGTH_BYTE_ARRAY",
|
|
19
|
+
"DELTA_BYTE_ARRAY",
|
|
20
|
+
"RLE_DICTIONARY",
|
|
21
|
+
"BYTE_STREAM_SPLIT"
|
|
22
|
+
];
|
|
23
|
+
const FieldRepetitionTypes = [
|
|
24
|
+
"REQUIRED",
|
|
25
|
+
"OPTIONAL",
|
|
26
|
+
"REPEATED"
|
|
27
|
+
];
|
|
28
|
+
const ConvertedTypes = [
|
|
29
|
+
"UTF8",
|
|
30
|
+
"MAP",
|
|
31
|
+
"MAP_KEY_VALUE",
|
|
32
|
+
"LIST",
|
|
33
|
+
"ENUM",
|
|
34
|
+
"DECIMAL",
|
|
35
|
+
"DATE",
|
|
36
|
+
"TIME_MILLIS",
|
|
37
|
+
"TIME_MICROS",
|
|
38
|
+
"TIMESTAMP_MILLIS",
|
|
39
|
+
"TIMESTAMP_MICROS",
|
|
40
|
+
"UINT_8",
|
|
41
|
+
"UINT_16",
|
|
42
|
+
"UINT_32",
|
|
43
|
+
"UINT_64",
|
|
44
|
+
"INT_8",
|
|
45
|
+
"INT_16",
|
|
46
|
+
"INT_32",
|
|
47
|
+
"INT_64",
|
|
48
|
+
"JSON",
|
|
49
|
+
"BSON",
|
|
50
|
+
"INTERVAL"
|
|
51
|
+
];
|
|
52
|
+
const CompressionCodecs = [
|
|
53
|
+
"UNCOMPRESSED",
|
|
54
|
+
"SNAPPY",
|
|
55
|
+
"GZIP",
|
|
56
|
+
"LZO",
|
|
57
|
+
"BROTLI",
|
|
58
|
+
"LZ4",
|
|
59
|
+
"ZSTD",
|
|
60
|
+
"LZ4_RAW"
|
|
61
|
+
];
|
|
62
|
+
const PageTypes = [
|
|
63
|
+
"DATA_PAGE",
|
|
64
|
+
"INDEX_PAGE",
|
|
65
|
+
"DICTIONARY_PAGE",
|
|
66
|
+
"DATA_PAGE_V2"
|
|
67
|
+
];
|
|
68
|
+
const BoundaryOrders = [
|
|
69
|
+
"UNORDERED",
|
|
70
|
+
"ASCENDING",
|
|
71
|
+
"DESCENDING"
|
|
72
|
+
];
|
|
73
|
+
const EdgeInterpolationAlgorithms = [
|
|
74
|
+
"SPHERICAL",
|
|
75
|
+
"VINCENTY",
|
|
76
|
+
"THOMAS",
|
|
77
|
+
"ANDOYER",
|
|
78
|
+
"KARNEY"
|
|
79
|
+
];
|
|
80
|
+
export { BoundaryOrders, CompressionCodecs, ConvertedTypes, EdgeInterpolationAlgorithms, Encodings, FieldRepetitionTypes, PageTypes, ParquetTypes };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { wkbToGeojson } from "./wkb.mjs";
|
|
2
|
+
const decoder = new TextDecoder();
|
|
3
|
+
const DEFAULT_PARSERS = {
|
|
4
|
+
timestampFromMilliseconds(millis) {
|
|
5
|
+
return new Date(Number(millis));
|
|
6
|
+
},
|
|
7
|
+
timestampFromMicroseconds(micros) {
|
|
8
|
+
return new Date(Number(micros / 1000n));
|
|
9
|
+
},
|
|
10
|
+
timestampFromNanoseconds(nanos) {
|
|
11
|
+
return new Date(Number(nanos / 1000000n));
|
|
12
|
+
},
|
|
13
|
+
dateFromDays(days) {
|
|
14
|
+
return /* @__PURE__ */ new Date(days * 864e5);
|
|
15
|
+
},
|
|
16
|
+
stringFromBytes(bytes) {
|
|
17
|
+
return bytes && decoder.decode(bytes);
|
|
18
|
+
},
|
|
19
|
+
jsonFromBytes(bytes) {
|
|
20
|
+
return bytes && JSON.parse(decoder.decode(bytes));
|
|
21
|
+
},
|
|
22
|
+
geometryFromBytes(bytes) {
|
|
23
|
+
return bytes && wkbToGeojson({
|
|
24
|
+
view: new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength),
|
|
25
|
+
offset: 0
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
geographyFromBytes(bytes) {
|
|
29
|
+
return bytes && wkbToGeojson({
|
|
30
|
+
view: new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength),
|
|
31
|
+
offset: 0
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
uuidFromBytes(bytes) {
|
|
35
|
+
if (!bytes) return void 0;
|
|
36
|
+
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
37
|
+
return hex.slice(0, 8) + "-" + hex.slice(8, 12) + "-" + hex.slice(12, 16) + "-" + hex.slice(16, 20) + "-" + hex.slice(20, 32);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
function convertWithDictionary(data, dictionary, encoding, columnDecoder) {
|
|
41
|
+
if (dictionary && encoding.endsWith("_DICTIONARY")) {
|
|
42
|
+
let output = data;
|
|
43
|
+
if (data instanceof Uint8Array && !(dictionary instanceof Uint8Array)) output = new dictionary.constructor(data.length);
|
|
44
|
+
for (let i = 0; i < data.length; i++) output[i] = dictionary[data[i]];
|
|
45
|
+
return output;
|
|
46
|
+
} else return convert(data, columnDecoder);
|
|
47
|
+
}
|
|
48
|
+
function convert(data, columnDecoder) {
|
|
49
|
+
const { element, parsers, utf8 = true, schemaPath } = columnDecoder;
|
|
50
|
+
const { type, converted_type: ctype, logical_type: ltype } = element;
|
|
51
|
+
const nullable = element.repetition_type !== "REQUIRED";
|
|
52
|
+
if (schemaPath?.some((s) => s.element.logical_type?.type === "VARIANT") && type === "BYTE_ARRAY" && ctype !== "UTF8" && ltype?.type !== "STRING") return data;
|
|
53
|
+
if (ctype === "DECIMAL") {
|
|
54
|
+
const factor = 10 ** -(element.scale || 0);
|
|
55
|
+
const arr = new Array(data.length);
|
|
56
|
+
for (let i = 0; i < arr.length; i++) if (data[i] instanceof Uint8Array) arr[i] = parseDecimal(data[i]) * factor;
|
|
57
|
+
else arr[i] = Number(data[i]) * factor;
|
|
58
|
+
return arr;
|
|
59
|
+
}
|
|
60
|
+
if (!ctype && type === "INT96") return Array.from(data).map((v) => parsers.timestampFromNanoseconds(parseInt96Nanos(v)));
|
|
61
|
+
if (ctype === "DATE") return Array.from(data).map((v) => parsers.dateFromDays(v));
|
|
62
|
+
if (ctype === "TIMESTAMP_MILLIS") return Array.from(data).map((v) => parsers.timestampFromMilliseconds(v));
|
|
63
|
+
if (ctype === "TIMESTAMP_MICROS") return Array.from(data).map((v) => parsers.timestampFromMicroseconds(v));
|
|
64
|
+
if (ctype === "JSON") return data.map((v) => parsers.jsonFromBytes(v));
|
|
65
|
+
if (ctype === "BSON") throw new Error("parquet bson not supported");
|
|
66
|
+
if (ctype === "INTERVAL") throw new Error("parquet interval not supported");
|
|
67
|
+
if (ltype?.type === "GEOMETRY") return data.map((v) => parsers.geometryFromBytes(v));
|
|
68
|
+
if (ltype?.type === "GEOGRAPHY") return data.map((v) => parsers.geographyFromBytes(v));
|
|
69
|
+
if (ltype?.type === "UUID") return data.map((v) => parsers.uuidFromBytes(v));
|
|
70
|
+
if (ctype === "UTF8" || ltype?.type === "STRING" || utf8 && type === "BYTE_ARRAY") return data.map((v) => parsers.stringFromBytes(v));
|
|
71
|
+
if (ctype === "UINT_64" || ltype?.type === "INTEGER" && ltype.bitWidth === 64 && !ltype.isSigned) {
|
|
72
|
+
if (data instanceof BigInt64Array) return new BigUint64Array(data.buffer, data.byteOffset, data.length);
|
|
73
|
+
const arr = nullable ? new Array(data.length) : new BigUint64Array(data.length);
|
|
74
|
+
for (let i = 0; i < arr.length; i++) arr[i] = data[i];
|
|
75
|
+
return arr;
|
|
76
|
+
}
|
|
77
|
+
if (ctype === "UINT_32" || ltype?.type === "INTEGER" && ltype.bitWidth === 32 && !ltype.isSigned) {
|
|
78
|
+
if (data instanceof Int32Array) return new Uint32Array(data.buffer, data.byteOffset, data.length);
|
|
79
|
+
const arr = nullable ? new Array(data.length) : new Uint32Array(data.length);
|
|
80
|
+
for (let i = 0; i < arr.length; i++) arr[i] = data[i] < 0 ? 4294967296 + data[i] : data[i];
|
|
81
|
+
return arr;
|
|
82
|
+
}
|
|
83
|
+
if (ltype?.type === "FLOAT16") return Array.from(data).map(parseFloat16);
|
|
84
|
+
if (ltype?.type === "TIMESTAMP") {
|
|
85
|
+
const { unit } = ltype;
|
|
86
|
+
let parser = parsers.timestampFromMilliseconds;
|
|
87
|
+
if (unit === "MICROS") parser = parsers.timestampFromMicroseconds;
|
|
88
|
+
if (unit === "NANOS") parser = parsers.timestampFromNanoseconds;
|
|
89
|
+
const arr = new Array(data.length);
|
|
90
|
+
for (let i = 0; i < arr.length; i++) arr[i] = parser(data[i]);
|
|
91
|
+
return arr;
|
|
92
|
+
}
|
|
93
|
+
return data;
|
|
94
|
+
}
|
|
95
|
+
function parseDecimal(bytes) {
|
|
96
|
+
if (!bytes.length) return 0;
|
|
97
|
+
let value = 0n;
|
|
98
|
+
for (const byte of bytes) value = value * 256n + BigInt(byte);
|
|
99
|
+
const bits = bytes.length * 8;
|
|
100
|
+
if (value >= 2n ** BigInt(bits - 1)) value -= 2n ** BigInt(bits);
|
|
101
|
+
return Number(value);
|
|
102
|
+
}
|
|
103
|
+
function parseInt96Nanos(value) {
|
|
104
|
+
const days = (value >> 64n) - 2440588n;
|
|
105
|
+
const nano = value & 18446744073709551615n;
|
|
106
|
+
return days * 86400000000000n + nano;
|
|
107
|
+
}
|
|
108
|
+
function parseFloat16(bytes) {
|
|
109
|
+
if (!bytes) return void 0;
|
|
110
|
+
const int16 = bytes[1] << 8 | bytes[0];
|
|
111
|
+
const sign = int16 >> 15 ? -1 : 1;
|
|
112
|
+
const exp = int16 >> 10 & 31;
|
|
113
|
+
const frac = int16 & 1023;
|
|
114
|
+
if (exp === 0) return sign * 2 ** -14 * (frac / 1024);
|
|
115
|
+
if (exp === 31) return frac ? NaN : sign * Infinity;
|
|
116
|
+
return sign * 2 ** (exp - 15) * (1 + frac / 1024);
|
|
117
|
+
}
|
|
118
|
+
export { DEFAULT_PARSERS, convert, convertWithDictionary, parseDecimal, parseFloat16 };
|