@gscdump/engine 3.4.4 → 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,129 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
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 };
|
|
1
|
+
import "./schema.mjs";
|
|
2
|
+
import "./thrift.mjs";
|
|
3
|
+
import "./constants.mjs";
|
|
4
|
+
import "./convert.mjs";
|
|
5
|
+
import "./assemble.mjs";
|
|
6
|
+
import "./plain.mjs";
|
|
7
|
+
import "./datapage.mjs";
|
|
8
|
+
export {};
|
|
@@ -1,118 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
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 };
|
|
1
|
+
import "./wkb.mjs";
|
|
2
|
+
new TextDecoder();
|
|
3
|
+
export {};
|
|
@@ -1,144 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
8
|
-
const reader = {
|
|
9
|
-
view,
|
|
10
|
-
offset: 0
|
|
11
|
-
};
|
|
12
|
-
let dataPage;
|
|
13
|
-
const repetitionLevels = readRepetitionLevels(reader, daph, schemaPath);
|
|
14
|
-
const { definitionLevels, numNulls } = readDefinitionLevels(reader, daph, schemaPath);
|
|
15
|
-
const nValues = daph.num_values - numNulls;
|
|
16
|
-
if (daph.encoding === "PLAIN") dataPage = readPlain(reader, type, nValues, element.type_length);
|
|
17
|
-
else if (daph.encoding === "PLAIN_DICTIONARY" || daph.encoding === "RLE_DICTIONARY" || daph.encoding === "RLE") {
|
|
18
|
-
const bitWidth = type === "BOOLEAN" ? 1 : view.getUint8(reader.offset++);
|
|
19
|
-
if (bitWidth) {
|
|
20
|
-
dataPage = new Array(nValues);
|
|
21
|
-
if (type === "BOOLEAN") {
|
|
22
|
-
readRleBitPackedHybrid(reader, bitWidth, dataPage);
|
|
23
|
-
dataPage = dataPage.map((x) => !!x);
|
|
24
|
-
} else readRleBitPackedHybrid(reader, bitWidth, dataPage, view.byteLength - reader.offset);
|
|
25
|
-
} else dataPage = new Uint8Array(nValues);
|
|
26
|
-
} else if (daph.encoding === "BYTE_STREAM_SPLIT") dataPage = byteStreamSplit(reader, nValues, type, element.type_length);
|
|
27
|
-
else if (daph.encoding === "DELTA_BINARY_PACKED") {
|
|
28
|
-
dataPage = type === "INT32" ? new Int32Array(nValues) : new BigInt64Array(nValues);
|
|
29
|
-
deltaBinaryUnpack(reader, nValues, dataPage);
|
|
30
|
-
} else if (daph.encoding === "DELTA_LENGTH_BYTE_ARRAY") {
|
|
31
|
-
dataPage = new Array(nValues);
|
|
32
|
-
deltaLengthByteArray(reader, nValues, dataPage);
|
|
33
|
-
} else throw new Error(`parquet unsupported encoding: ${daph.encoding}`);
|
|
34
|
-
return {
|
|
35
|
-
definitionLevels,
|
|
36
|
-
repetitionLevels,
|
|
37
|
-
dataPage
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function readRepetitionLevels(reader, daph, schemaPath) {
|
|
41
|
-
if (schemaPath.length > 1) {
|
|
42
|
-
const maxRepetitionLevel = getMaxRepetitionLevel(schemaPath);
|
|
43
|
-
if (maxRepetitionLevel) {
|
|
44
|
-
const values = new Array(daph.num_values);
|
|
45
|
-
readRleBitPackedHybrid(reader, bitWidth(maxRepetitionLevel), values);
|
|
46
|
-
return values;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return [];
|
|
50
|
-
}
|
|
51
|
-
function readDefinitionLevels(reader, daph, schemaPath) {
|
|
52
|
-
const maxDefinitionLevel = getMaxDefinitionLevel(schemaPath);
|
|
53
|
-
if (!maxDefinitionLevel) return {
|
|
54
|
-
definitionLevels: [],
|
|
55
|
-
numNulls: 0
|
|
56
|
-
};
|
|
57
|
-
const definitionLevels = new Array(daph.num_values);
|
|
58
|
-
readRleBitPackedHybrid(reader, bitWidth(maxDefinitionLevel), definitionLevels);
|
|
59
|
-
let numNulls = daph.num_values;
|
|
60
|
-
for (const def of definitionLevels) if (def === maxDefinitionLevel) numNulls--;
|
|
61
|
-
if (numNulls === 0) definitionLevels.length = 0;
|
|
62
|
-
return {
|
|
63
|
-
definitionLevels,
|
|
64
|
-
numNulls
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function decompressPage(compressedBytes, uncompressed_page_size, codec, compressors) {
|
|
68
|
-
let page;
|
|
69
|
-
const customDecompressor = compressors?.[codec];
|
|
70
|
-
if (codec === "UNCOMPRESSED") page = compressedBytes;
|
|
71
|
-
else if (customDecompressor) page = customDecompressor(compressedBytes, uncompressed_page_size);
|
|
72
|
-
else if (codec === "SNAPPY") {
|
|
73
|
-
page = new Uint8Array(uncompressed_page_size);
|
|
74
|
-
snappyUncompress(compressedBytes, page);
|
|
75
|
-
} else throw new Error(`parquet unsupported compression codec: ${codec}`);
|
|
76
|
-
if (page?.length !== uncompressed_page_size) throw new Error(`parquet decompressed page length ${page?.length} does not match header ${uncompressed_page_size}`);
|
|
77
|
-
return page;
|
|
78
|
-
}
|
|
79
|
-
function readDataPageV2(compressedBytes, ph, columnDecoder) {
|
|
80
|
-
const reader = {
|
|
81
|
-
view: new DataView(compressedBytes.buffer, compressedBytes.byteOffset, compressedBytes.byteLength),
|
|
82
|
-
offset: 0
|
|
83
|
-
};
|
|
84
|
-
const { type, element, schemaPath, codec, compressors } = columnDecoder;
|
|
85
|
-
const daph2 = ph.data_page_header_v2;
|
|
86
|
-
if (!daph2) throw new Error("parquet data page header v2 is undefined");
|
|
87
|
-
const repetitionLevels = readRepetitionLevelsV2(reader, daph2, schemaPath);
|
|
88
|
-
reader.offset = daph2.repetition_levels_byte_length;
|
|
89
|
-
const definitionLevels = readDefinitionLevelsV2(reader, daph2, schemaPath);
|
|
90
|
-
const uncompressedPageSize = ph.uncompressed_page_size - daph2.definition_levels_byte_length - daph2.repetition_levels_byte_length;
|
|
91
|
-
let page = compressedBytes.subarray(reader.offset);
|
|
92
|
-
if (daph2.is_compressed !== false) page = decompressPage(page, uncompressedPageSize, codec, compressors);
|
|
93
|
-
const pageView = new DataView(page.buffer, page.byteOffset, page.byteLength);
|
|
94
|
-
const pageReader = {
|
|
95
|
-
view: pageView,
|
|
96
|
-
offset: 0
|
|
97
|
-
};
|
|
98
|
-
let dataPage;
|
|
99
|
-
const nValues = daph2.num_values - daph2.num_nulls;
|
|
100
|
-
if (daph2.encoding === "PLAIN") dataPage = readPlain(pageReader, type, nValues, element.type_length);
|
|
101
|
-
else if (daph2.encoding === "RLE") {
|
|
102
|
-
dataPage = new Array(nValues);
|
|
103
|
-
readRleBitPackedHybrid(pageReader, 1, dataPage);
|
|
104
|
-
dataPage = dataPage.map((x) => !!x);
|
|
105
|
-
} else if (daph2.encoding === "PLAIN_DICTIONARY" || daph2.encoding === "RLE_DICTIONARY") {
|
|
106
|
-
const bitWidth = pageView.getUint8(pageReader.offset++);
|
|
107
|
-
dataPage = new Array(nValues);
|
|
108
|
-
readRleBitPackedHybrid(pageReader, bitWidth, dataPage, uncompressedPageSize - 1);
|
|
109
|
-
} else if (daph2.encoding === "DELTA_BINARY_PACKED") {
|
|
110
|
-
dataPage = type === "INT32" ? new Int32Array(nValues) : new BigInt64Array(nValues);
|
|
111
|
-
deltaBinaryUnpack(pageReader, nValues, dataPage);
|
|
112
|
-
} else if (daph2.encoding === "DELTA_LENGTH_BYTE_ARRAY") {
|
|
113
|
-
dataPage = new Array(nValues);
|
|
114
|
-
deltaLengthByteArray(pageReader, nValues, dataPage);
|
|
115
|
-
} else if (daph2.encoding === "DELTA_BYTE_ARRAY") {
|
|
116
|
-
dataPage = new Array(nValues);
|
|
117
|
-
deltaByteArray(pageReader, nValues, dataPage);
|
|
118
|
-
} else if (daph2.encoding === "BYTE_STREAM_SPLIT") dataPage = byteStreamSplit(pageReader, nValues, type, element.type_length);
|
|
119
|
-
else throw new Error(`parquet unsupported encoding: ${daph2.encoding}`);
|
|
120
|
-
return {
|
|
121
|
-
definitionLevels,
|
|
122
|
-
repetitionLevels,
|
|
123
|
-
dataPage
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
function readRepetitionLevelsV2(reader, daph2, schemaPath) {
|
|
127
|
-
const maxRepetitionLevel = getMaxRepetitionLevel(schemaPath);
|
|
128
|
-
if (!maxRepetitionLevel) return [];
|
|
129
|
-
const values = new Array(daph2.num_values);
|
|
130
|
-
readRleBitPackedHybrid(reader, bitWidth(maxRepetitionLevel), values, daph2.repetition_levels_byte_length);
|
|
131
|
-
return values;
|
|
132
|
-
}
|
|
133
|
-
function readDefinitionLevelsV2(reader, daph2, schemaPath) {
|
|
134
|
-
const maxDefinitionLevel = getMaxDefinitionLevel(schemaPath);
|
|
135
|
-
if (maxDefinitionLevel) {
|
|
136
|
-
const values = new Array(daph2.num_values);
|
|
137
|
-
readRleBitPackedHybrid(reader, bitWidth(maxDefinitionLevel), values, daph2.definition_levels_byte_length);
|
|
138
|
-
return values;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
function bitWidth(value) {
|
|
142
|
-
return 32 - Math.clz32(value);
|
|
143
|
-
}
|
|
144
|
-
export { decompressPage, readDataPage, readDataPageV2 };
|
|
1
|
+
import "./schema.mjs";
|
|
2
|
+
import "./delta.mjs";
|
|
3
|
+
import "./encoding.mjs";
|
|
4
|
+
import "./plain.mjs";
|
|
5
|
+
import "./snappy.mjs";
|
|
6
|
+
export {};
|
|
@@ -1,65 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const int32 = output instanceof Int32Array;
|
|
4
|
-
const blockSize = readVarInt(reader);
|
|
5
|
-
const miniblockPerBlock = readVarInt(reader);
|
|
6
|
-
readVarInt(reader);
|
|
7
|
-
let value = readZigZagBigInt(reader);
|
|
8
|
-
let outputIndex = 0;
|
|
9
|
-
output[outputIndex++] = int32 ? Number(value) : value;
|
|
10
|
-
const valuesPerMiniblock = blockSize / miniblockPerBlock;
|
|
11
|
-
while (outputIndex < count) {
|
|
12
|
-
const minDelta = readZigZagBigInt(reader);
|
|
13
|
-
const bitWidths = new Uint8Array(miniblockPerBlock);
|
|
14
|
-
for (let i = 0; i < miniblockPerBlock; i++) bitWidths[i] = reader.view.getUint8(reader.offset++);
|
|
15
|
-
for (let i = 0; i < miniblockPerBlock && outputIndex < count; i++) {
|
|
16
|
-
const bitWidth = BigInt(bitWidths[i]);
|
|
17
|
-
if (bitWidth) {
|
|
18
|
-
let bitpackPos = 0n;
|
|
19
|
-
let miniblockCount = valuesPerMiniblock;
|
|
20
|
-
const mask = (1n << bitWidth) - 1n;
|
|
21
|
-
while (miniblockCount && outputIndex < count) {
|
|
22
|
-
let bits = BigInt(reader.view.getUint8(reader.offset)) >> bitpackPos & mask;
|
|
23
|
-
bitpackPos += bitWidth;
|
|
24
|
-
while (bitpackPos >= 8) {
|
|
25
|
-
bitpackPos -= 8n;
|
|
26
|
-
reader.offset++;
|
|
27
|
-
if (bitpackPos) bits |= BigInt(reader.view.getUint8(reader.offset)) << bitWidth - bitpackPos & mask;
|
|
28
|
-
}
|
|
29
|
-
const delta = minDelta + bits;
|
|
30
|
-
value += delta;
|
|
31
|
-
output[outputIndex++] = int32 ? Number(value) : value;
|
|
32
|
-
miniblockCount--;
|
|
33
|
-
}
|
|
34
|
-
if (miniblockCount) reader.offset += Math.ceil((miniblockCount * Number(bitWidth) + Number(bitpackPos)) / 8);
|
|
35
|
-
} else for (let j = 0; j < valuesPerMiniblock && outputIndex < count; j++) {
|
|
36
|
-
value += minDelta;
|
|
37
|
-
output[outputIndex++] = int32 ? Number(value) : value;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function deltaLengthByteArray(reader, count, output) {
|
|
43
|
-
const lengths = new Int32Array(count);
|
|
44
|
-
deltaBinaryUnpack(reader, count, lengths);
|
|
45
|
-
for (let i = 0; i < count; i++) {
|
|
46
|
-
output[i] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, lengths[i]);
|
|
47
|
-
reader.offset += lengths[i];
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function deltaByteArray(reader, count, output) {
|
|
51
|
-
const prefixData = new Int32Array(count);
|
|
52
|
-
deltaBinaryUnpack(reader, count, prefixData);
|
|
53
|
-
const suffixData = new Int32Array(count);
|
|
54
|
-
deltaBinaryUnpack(reader, count, suffixData);
|
|
55
|
-
for (let i = 0; i < count; i++) {
|
|
56
|
-
const suffix = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, suffixData[i]);
|
|
57
|
-
if (prefixData[i]) {
|
|
58
|
-
output[i] = new Uint8Array(prefixData[i] + suffixData[i]);
|
|
59
|
-
output[i].set(output[i - 1].subarray(0, prefixData[i]));
|
|
60
|
-
output[i].set(suffix, prefixData[i]);
|
|
61
|
-
} else output[i] = suffix;
|
|
62
|
-
reader.offset += suffixData[i];
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
export { deltaBinaryUnpack, deltaByteArray, deltaLengthByteArray };
|
|
1
|
+
import "./thrift.mjs";
|
|
2
|
+
export {};
|
|
@@ -1,76 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
if (length === void 0) {
|
|
4
|
-
length = reader.view.getUint32(reader.offset, true);
|
|
5
|
-
reader.offset += 4;
|
|
6
|
-
}
|
|
7
|
-
const startOffset = reader.offset;
|
|
8
|
-
let seen = 0;
|
|
9
|
-
while (seen < output.length) {
|
|
10
|
-
const header = readVarInt(reader);
|
|
11
|
-
if (header & 1) seen = readBitPacked(reader, header, width, output, seen);
|
|
12
|
-
else {
|
|
13
|
-
const count = header >>> 1;
|
|
14
|
-
readRle(reader, count, width, output, seen);
|
|
15
|
-
seen += count;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
reader.offset = startOffset + length;
|
|
19
|
-
}
|
|
20
|
-
function readRle(reader, count, bitWidth, output, seen) {
|
|
21
|
-
const width = bitWidth + 7 >> 3;
|
|
22
|
-
let value = 0;
|
|
23
|
-
for (let i = 0; i < width; i++) value |= reader.view.getUint8(reader.offset++) << (i << 3);
|
|
24
|
-
for (let i = 0; i < count; i++) output[seen + i] = value;
|
|
25
|
-
}
|
|
26
|
-
function readBitPacked(reader, header, bitWidth, output, seen) {
|
|
27
|
-
let count = header >> 1 << 3;
|
|
28
|
-
const mask = (1 << bitWidth) - 1;
|
|
29
|
-
let data = 0;
|
|
30
|
-
if (reader.offset < reader.view.byteLength) data = reader.view.getUint8(reader.offset++);
|
|
31
|
-
else if (mask) throw new Error(`parquet bitpack offset ${reader.offset} out of range`);
|
|
32
|
-
let left = 8;
|
|
33
|
-
let right = 0;
|
|
34
|
-
while (count) if (right > 8) {
|
|
35
|
-
right -= 8;
|
|
36
|
-
left -= 8;
|
|
37
|
-
data >>>= 8;
|
|
38
|
-
} else if (left - right < bitWidth) {
|
|
39
|
-
data |= reader.view.getUint8(reader.offset) << left;
|
|
40
|
-
reader.offset++;
|
|
41
|
-
left += 8;
|
|
42
|
-
} else {
|
|
43
|
-
if (seen < output.length) output[seen++] = data >> right & mask;
|
|
44
|
-
count--;
|
|
45
|
-
right += bitWidth;
|
|
46
|
-
}
|
|
47
|
-
return seen;
|
|
48
|
-
}
|
|
49
|
-
function byteStreamSplit(reader, count, type, typeLength) {
|
|
50
|
-
const width = byteWidth(type, typeLength);
|
|
51
|
-
const bytes = new Uint8Array(count * width);
|
|
52
|
-
for (let b = 0; b < width; b++) for (let i = 0; i < count; i++) bytes[i * width + b] = reader.view.getUint8(reader.offset++);
|
|
53
|
-
if (type === "FLOAT") return new Float32Array(bytes.buffer);
|
|
54
|
-
else if (type === "DOUBLE") return new Float64Array(bytes.buffer);
|
|
55
|
-
else if (type === "INT32") return new Int32Array(bytes.buffer);
|
|
56
|
-
else if (type === "INT64") return new BigInt64Array(bytes.buffer);
|
|
57
|
-
else if (type === "FIXED_LEN_BYTE_ARRAY") {
|
|
58
|
-
const split = new Array(count);
|
|
59
|
-
for (let i = 0; i < count; i++) split[i] = bytes.subarray(i * width, (i + 1) * width);
|
|
60
|
-
return split;
|
|
61
|
-
}
|
|
62
|
-
throw new Error(`parquet byte_stream_split unsupported type: ${type}`);
|
|
63
|
-
}
|
|
64
|
-
function byteWidth(type, typeLength) {
|
|
65
|
-
switch (type) {
|
|
66
|
-
case "INT32":
|
|
67
|
-
case "FLOAT": return 4;
|
|
68
|
-
case "INT64":
|
|
69
|
-
case "DOUBLE": return 8;
|
|
70
|
-
case "FIXED_LEN_BYTE_ARRAY":
|
|
71
|
-
if (!typeLength) throw new Error("parquet byteWidth missing type_length");
|
|
72
|
-
return typeLength;
|
|
73
|
-
default: throw new Error(`parquet unsupported type: ${type}`);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
export { byteStreamSplit, readRleBitPackedHybrid };
|
|
1
|
+
import "./thrift.mjs";
|
|
2
|
+
export {};
|