@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,212 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!filter) return [];
|
|
6
|
-
const paths = [];
|
|
7
|
-
if ("$and" in filter && Array.isArray(filter.$and)) paths.push(...filter.$and.flatMap(pathsNeededForFilter));
|
|
8
|
-
else if ("$or" in filter && Array.isArray(filter.$or)) paths.push(...filter.$or.flatMap(pathsNeededForFilter));
|
|
9
|
-
else if ("$nor" in filter && Array.isArray(filter.$nor)) paths.push(...filter.$nor.flatMap(pathsNeededForFilter));
|
|
10
|
-
else paths.push(...Object.keys(filter));
|
|
11
|
-
return [...new Set(paths)];
|
|
12
|
-
}
|
|
13
|
-
function columnsNeededForFilter(filter) {
|
|
14
|
-
return [...new Set(pathsNeededForFilter(filter).map((path) => path.split(".")[0]))];
|
|
15
|
-
}
|
|
16
|
-
function matchFilter(record, filter, strict = true) {
|
|
17
|
-
if ("$and" in filter && Array.isArray(filter.$and)) return filter.$and.every((subQuery) => matchFilter(record, subQuery, strict));
|
|
18
|
-
if ("$or" in filter && Array.isArray(filter.$or)) return filter.$or.some((subQuery) => matchFilter(record, subQuery, strict));
|
|
19
|
-
if ("$nor" in filter && Array.isArray(filter.$nor)) return !filter.$nor.some((subQuery) => matchFilter(record, subQuery, strict));
|
|
20
|
-
return Object.entries(filter).every(([field, condition]) => {
|
|
21
|
-
const value = resolve(record, field);
|
|
22
|
-
if (typeof condition !== "object" || condition === null || Array.isArray(condition)) return equals(value, condition, strict);
|
|
23
|
-
return Object.entries(condition || {}).every(([operator, target]) => {
|
|
24
|
-
if (operator === "$gt") return value !== null && value !== void 0 && value > target;
|
|
25
|
-
if (operator === "$gte") return value !== null && value !== void 0 && value >= target;
|
|
26
|
-
if (operator === "$lt") return value !== null && value !== void 0 && value < target;
|
|
27
|
-
if (operator === "$lte") return value !== null && value !== void 0 && value <= target;
|
|
28
|
-
if (operator === "$eq") return equals(value, target, strict);
|
|
29
|
-
if (operator === "$ne") return !equals(value, target, strict);
|
|
30
|
-
if (operator === "$in") return Array.isArray(target) && matchesIn(value, target, strict);
|
|
31
|
-
if (operator === "$nin") return Array.isArray(target) && !matchesIn(value, target, strict);
|
|
32
|
-
if (operator === "$not") return !matchFilter({ [field]: value }, { [field]: target }, strict);
|
|
33
|
-
return true;
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function matchesIn(value, targets, strict) {
|
|
38
|
-
return targets.some((target) => equals(value, target, strict) || Array.isArray(value) && value.some((element) => equals(element, target, strict)));
|
|
39
|
-
}
|
|
40
|
-
function canSkipRowGroup({ rowGroup, physicalColumns, filter, strict = true, bloomFilters, schemaElements }) {
|
|
41
|
-
if (!filter) return false;
|
|
42
|
-
if ("$and" in filter && Array.isArray(filter.$and)) return filter.$and.some((subFilter) => canSkipRowGroup({
|
|
43
|
-
rowGroup,
|
|
44
|
-
physicalColumns,
|
|
45
|
-
filter: subFilter,
|
|
46
|
-
strict,
|
|
47
|
-
bloomFilters,
|
|
48
|
-
schemaElements
|
|
49
|
-
}));
|
|
50
|
-
if ("$or" in filter && Array.isArray(filter.$or)) return filter.$or.every((subFilter) => canSkipRowGroup({
|
|
51
|
-
rowGroup,
|
|
52
|
-
physicalColumns,
|
|
53
|
-
filter: subFilter,
|
|
54
|
-
strict,
|
|
55
|
-
bloomFilters,
|
|
56
|
-
schemaElements
|
|
57
|
-
}));
|
|
58
|
-
if ("$nor" in filter && Array.isArray(filter.$nor)) return false;
|
|
59
|
-
for (const [field, condition] of Object.entries(filter)) {
|
|
60
|
-
const columnIndex = physicalColumns.indexOf(field);
|
|
61
|
-
if (columnIndex === -1) continue;
|
|
62
|
-
const { min, max, min_value, max_value, null_count: nullCount } = rowGroup.columns[columnIndex].meta_data?.statistics || {};
|
|
63
|
-
const minVal = min_value !== void 0 ? min_value : min;
|
|
64
|
-
const maxVal = max_value !== void 0 ? max_value : max;
|
|
65
|
-
const haveStats = minVal !== void 0 && maxVal !== void 0;
|
|
66
|
-
const bloom = bloomFilters?.[field];
|
|
67
|
-
const element = schemaElements?.[field];
|
|
68
|
-
const matchingNulls = matchFilter({ value: null }, { value: condition }, strict) && (nullCount === void 0 || nullCount > 0);
|
|
69
|
-
if (haveStats && !matchingNulls && canSkipStats(condition, minVal, maxVal, strict, element)) return true;
|
|
70
|
-
for (const [operator, target] of Object.entries(condition || {})) if (bloom && element) {
|
|
71
|
-
if (operator === "$eq") {
|
|
72
|
-
const hash = hashParquetValue(target, element);
|
|
73
|
-
if (hash !== void 0 && !sbbfContains(bloom.blocks, hash)) return true;
|
|
74
|
-
}
|
|
75
|
-
if (operator === "$in" && Array.isArray(target) && target.length > 0) {
|
|
76
|
-
let allAbsent = true;
|
|
77
|
-
for (const v of target) {
|
|
78
|
-
const h = hashParquetValue(v, element);
|
|
79
|
-
if (h === void 0 || sbbfContains(bloom.blocks, h)) {
|
|
80
|
-
allAbsent = false;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (allAbsent) return true;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
function canSkipStats(condition, minVal, maxVal, strict, element) {
|
|
91
|
-
if (minVal === void 0 || maxVal === void 0) return false;
|
|
92
|
-
const mayContainNaN = element?.type === "FLOAT" || element?.type === "DOUBLE" || element?.logical_type?.type === "FLOAT16";
|
|
93
|
-
for (const [operator, target] of Object.entries(condition || {})) {
|
|
94
|
-
const minComparison = compareParquetValues(minVal, target, strict, element);
|
|
95
|
-
const maxComparison = compareParquetValues(maxVal, target, strict, element);
|
|
96
|
-
const relationalBoundsAreSafe = !(minVal instanceof Uint8Array || maxVal instanceof Uint8Array) && (element?.type !== "BYTE_ARRAY" || typeof target === "string" && [...target].every((character) => character.charCodeAt(0) <= 127));
|
|
97
|
-
if (operator === "$gt" && relationalBoundsAreSafe && maxComparison !== void 0 && maxComparison <= 0) return true;
|
|
98
|
-
if (operator === "$gte" && relationalBoundsAreSafe && maxComparison !== void 0 && maxComparison < 0) return true;
|
|
99
|
-
if (operator === "$lt" && relationalBoundsAreSafe && minComparison !== void 0 && minComparison >= 0) return true;
|
|
100
|
-
if (operator === "$lte" && relationalBoundsAreSafe && minComparison !== void 0 && minComparison > 0) return true;
|
|
101
|
-
if (operator === "$eq") {
|
|
102
|
-
const targetMinComparison = compareParquetValues(target, minVal, strict, element);
|
|
103
|
-
const targetMaxComparison = compareParquetValues(target, maxVal, strict, element);
|
|
104
|
-
if (targetMinComparison !== void 0 && targetMinComparison < 0 || targetMaxComparison !== void 0 && targetMaxComparison > 0) return true;
|
|
105
|
-
}
|
|
106
|
-
if (operator === "$ne" && !mayContainNaN && equals(minVal, maxVal, strict) && equals(minVal, target, strict)) return true;
|
|
107
|
-
if (operator === "$in" && Array.isArray(target) && target.every((value) => {
|
|
108
|
-
const valueMinComparison = compareParquetValues(value, minVal, strict, element);
|
|
109
|
-
const valueMaxComparison = compareParquetValues(value, maxVal, strict, element);
|
|
110
|
-
return valueMinComparison !== void 0 && valueMinComparison < 0 || valueMaxComparison !== void 0 && valueMaxComparison > 0;
|
|
111
|
-
})) return true;
|
|
112
|
-
if (operator === "$nin" && !mayContainNaN && Array.isArray(target) && equals(minVal, maxVal, strict) && target.some((value) => equals(minVal, value, strict))) return true;
|
|
113
|
-
}
|
|
114
|
-
return false;
|
|
115
|
-
}
|
|
116
|
-
function compareParquetValues(a, b, strict, element) {
|
|
117
|
-
if (element?.type === "BYTE_ARRAY") {
|
|
118
|
-
if (typeof a !== "string" || typeof b !== "string") return void 0;
|
|
119
|
-
return compareBytes(encoder.encode(a), encoder.encode(b));
|
|
120
|
-
}
|
|
121
|
-
if (a instanceof Uint8Array || b instanceof Uint8Array) {
|
|
122
|
-
if (!(a instanceof Uint8Array) || !(b instanceof Uint8Array)) return void 0;
|
|
123
|
-
return compareBytes(a, b);
|
|
124
|
-
}
|
|
125
|
-
if (a < b) return -1;
|
|
126
|
-
if (a > b) return 1;
|
|
127
|
-
if (equals(a, b, strict)) return 0;
|
|
128
|
-
}
|
|
129
|
-
function compareBytes(a, b) {
|
|
130
|
-
const length = Math.min(a.length, b.length);
|
|
131
|
-
for (let i = 0; i < length; i++) {
|
|
132
|
-
if (a[i] < b[i]) return -1;
|
|
133
|
-
if (a[i] > b[i]) return 1;
|
|
134
|
-
}
|
|
135
|
-
if (a.length < b.length) return -1;
|
|
136
|
-
if (a.length > b.length) return 1;
|
|
137
|
-
return 0;
|
|
138
|
-
}
|
|
139
|
-
function matchesNull(condition, strict) {
|
|
140
|
-
return matchFilter({ value: null }, { value: condition }, strict);
|
|
141
|
-
}
|
|
142
|
-
function filterPageRanges(filter, columnPages, groupRows, strict = true) {
|
|
143
|
-
if (!filter) return void 0;
|
|
144
|
-
if ("$and" in filter && Array.isArray(filter.$and)) {
|
|
145
|
-
let ranges;
|
|
146
|
-
for (const subFilter of filter.$and) ranges = intersectRanges(ranges, filterPageRanges(subFilter, columnPages, groupRows, strict));
|
|
147
|
-
return ranges;
|
|
148
|
-
}
|
|
149
|
-
if ("$or" in filter && Array.isArray(filter.$or)) {
|
|
150
|
-
let ranges = [];
|
|
151
|
-
for (const subFilter of filter.$or) {
|
|
152
|
-
const subRanges = filterPageRanges(subFilter, columnPages, groupRows, strict);
|
|
153
|
-
if (!subRanges) return void 0;
|
|
154
|
-
ranges = unionRanges(ranges, subRanges);
|
|
155
|
-
}
|
|
156
|
-
return ranges;
|
|
157
|
-
}
|
|
158
|
-
if ("$nor" in filter && Array.isArray(filter.$nor)) return;
|
|
159
|
-
let result;
|
|
160
|
-
for (const [field, condition] of Object.entries(filter)) {
|
|
161
|
-
const pages = columnPages[field];
|
|
162
|
-
if (!pages) continue;
|
|
163
|
-
const nullCanMatch = matchesNull(condition, strict);
|
|
164
|
-
const keep = [];
|
|
165
|
-
for (let i = 0; i < pages.pageStarts.length; i++) {
|
|
166
|
-
const start = pages.pageStarts[i];
|
|
167
|
-
const end = i + 1 < pages.pageStarts.length ? pages.pageStarts[i + 1] : groupRows;
|
|
168
|
-
const nullCount = pages.nullCounts?.[i];
|
|
169
|
-
const matchingNulls = nullCanMatch && (nullCount === void 0 || nullCount > 0);
|
|
170
|
-
if (!(!pages.nullPages[i] && !matchingNulls && canSkipStats(condition, pages.minValues[i], pages.maxValues[i], strict, pages.element))) {
|
|
171
|
-
const last = keep[keep.length - 1];
|
|
172
|
-
if (last && last[1] === start) last[1] = end;
|
|
173
|
-
else keep.push([start, end]);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
result = intersectRanges(result, keep);
|
|
177
|
-
}
|
|
178
|
-
return result;
|
|
179
|
-
}
|
|
180
|
-
function intersectRanges(a, b) {
|
|
181
|
-
if (!a) return b;
|
|
182
|
-
if (!b) return a;
|
|
183
|
-
const out = [];
|
|
184
|
-
let i = 0;
|
|
185
|
-
let j = 0;
|
|
186
|
-
while (i < a.length && j < b.length) {
|
|
187
|
-
const start = Math.max(a[i][0], b[j][0]);
|
|
188
|
-
const end = Math.min(a[i][1], b[j][1]);
|
|
189
|
-
if (start < end) out.push([start, end]);
|
|
190
|
-
if (a[i][1] < b[j][1]) i++;
|
|
191
|
-
else j++;
|
|
192
|
-
}
|
|
193
|
-
return out;
|
|
194
|
-
}
|
|
195
|
-
function unionRanges(a, b) {
|
|
196
|
-
const out = [];
|
|
197
|
-
let i = 0;
|
|
198
|
-
let j = 0;
|
|
199
|
-
while (i < a.length || j < b.length) {
|
|
200
|
-
const next = j >= b.length || i < a.length && a[i][0] <= b[j][0] ? a[i++] : b[j++];
|
|
201
|
-
const last = out[out.length - 1];
|
|
202
|
-
if (last && next[0] <= last[1]) last[1] = Math.max(last[1], next[1]);
|
|
203
|
-
else out.push([next[0], next[1]]);
|
|
204
|
-
}
|
|
205
|
-
return out;
|
|
206
|
-
}
|
|
207
|
-
function resolve(record, path) {
|
|
208
|
-
let value = record;
|
|
209
|
-
for (const part of path.split(".")) value = value?.[part];
|
|
210
|
-
return value;
|
|
211
|
-
}
|
|
212
|
-
export { canSkipRowGroup, columnsNeededForFilter, filterPageRanges, intersectRanges, matchFilter, pathsNeededForFilter, unionRanges };
|
|
1
|
+
import "./bloom.mjs";
|
|
2
|
+
import "./utils.mjs";
|
|
3
|
+
new TextEncoder();
|
|
4
|
+
export {};
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
const columns = /* @__PURE__ */ new Map();
|
|
3
|
-
const geo = key_value_metadata?.find(({ key }) => key === "geo")?.value;
|
|
4
|
-
const decodedColumns = (geo && JSON.parse(geo)?.columns) ?? {};
|
|
5
|
-
for (const [name, column] of Object.entries(decodedColumns)) {
|
|
6
|
-
if (column.encoding !== "WKB") continue;
|
|
7
|
-
const type = column.edges === "spherical" ? "GEOGRAPHY" : "GEOMETRY";
|
|
8
|
-
const id = column.crs?.id ?? column.crs?.ids?.[0];
|
|
9
|
-
const crs = id ? `${id.authority}:${id.code.toString()}` : void 0;
|
|
10
|
-
columns.set(name, {
|
|
11
|
-
type,
|
|
12
|
-
crs
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
for (let i = 1; i < schema.length; i++) {
|
|
16
|
-
const { logical_type, name, num_children, type } = schema[i];
|
|
17
|
-
if (num_children) {
|
|
18
|
-
i += num_children;
|
|
19
|
-
continue;
|
|
20
|
-
}
|
|
21
|
-
if (type === "BYTE_ARRAY" && !logical_type) schema[i].logical_type = columns.get(name);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export { markGeoColumns };
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./metadata.mjs";
|
|
2
2
|
import "./indexes.mjs";
|
|
3
3
|
import { toJson } from "./utils.mjs";
|
|
4
4
|
import "./snappy.mjs";
|
|
5
5
|
import "./scan.mjs";
|
|
6
|
-
import
|
|
6
|
+
import "./read.mjs";
|
|
7
7
|
import "./query.mjs";
|
|
8
|
-
export {
|
|
8
|
+
export { toJson };
|
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
parsers = {
|
|
7
|
-
...DEFAULT_PARSERS,
|
|
8
|
-
...parsers
|
|
9
|
-
};
|
|
10
|
-
const thrift = deserializeTCompactProtocol(reader);
|
|
11
|
-
return {
|
|
12
|
-
null_pages: thrift.field_1,
|
|
13
|
-
min_values: thrift.field_2.map((m) => convertMetadata(m, schema, parsers)),
|
|
14
|
-
max_values: thrift.field_3.map((m) => convertMetadata(m, schema, parsers)),
|
|
15
|
-
boundary_order: BoundaryOrders[thrift.field_4],
|
|
16
|
-
null_counts: thrift.field_5,
|
|
17
|
-
repetition_level_histograms: thrift.field_6,
|
|
18
|
-
definition_level_histograms: thrift.field_7
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function readOffsetIndex(reader) {
|
|
22
|
-
const thrift = deserializeTCompactProtocol(reader);
|
|
23
|
-
return {
|
|
24
|
-
page_locations: thrift.field_1.map((loc) => ({
|
|
25
|
-
offset: loc.field_1,
|
|
26
|
-
compressed_page_size: loc.field_2,
|
|
27
|
-
first_row_index: loc.field_3
|
|
28
|
-
})),
|
|
29
|
-
unencoded_byte_array_data_bytes: thrift.field_2
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
export { readColumnIndex, readOffsetIndex };
|
|
1
|
+
import "./thrift.mjs";
|
|
2
|
+
import "./constants.mjs";
|
|
3
|
+
import "./convert.mjs";
|
|
4
|
+
import "./metadata.mjs";
|
|
5
|
+
export {};
|
|
@@ -1,241 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
function decode(value) {
|
|
9
|
-
return value && decoder.decode(value);
|
|
10
|
-
}
|
|
11
|
-
async function parquetMetadataAsync(asyncBuffer, { parsers, initialFetchSize = defaultInitialFetchSize, geoparquet = true } = {}) {
|
|
12
|
-
if (!asyncBuffer || !(asyncBuffer.byteLength >= 0)) throw new Error("parquet expected AsyncBuffer");
|
|
13
|
-
const footerOffset = Math.max(0, asyncBuffer.byteLength - initialFetchSize);
|
|
14
|
-
const footerBuffer = await asyncBuffer.slice(footerOffset, asyncBuffer.byteLength);
|
|
15
|
-
const footerView = new DataView(footerBuffer);
|
|
16
|
-
if (footerView.getUint32(footerBuffer.byteLength - 4, true) !== 827474256) throw new Error("parquet file invalid (footer != PAR1)");
|
|
17
|
-
const metadataLength = footerView.getUint32(footerBuffer.byteLength - 8, true);
|
|
18
|
-
if (metadataLength > asyncBuffer.byteLength - 8) throw new Error(`parquet metadata length ${metadataLength} exceeds available buffer ${asyncBuffer.byteLength - 8}`);
|
|
19
|
-
if (metadataLength + 8 > initialFetchSize) {
|
|
20
|
-
const metadataOffset = asyncBuffer.byteLength - metadataLength - 8;
|
|
21
|
-
const metadataBuffer = await asyncBuffer.slice(metadataOffset, footerOffset);
|
|
22
|
-
const combinedBuffer = new ArrayBuffer(metadataLength + 8);
|
|
23
|
-
const combinedView = new Uint8Array(combinedBuffer);
|
|
24
|
-
combinedView.set(new Uint8Array(metadataBuffer));
|
|
25
|
-
combinedView.set(new Uint8Array(footerBuffer), footerOffset - metadataOffset);
|
|
26
|
-
return parquetMetadata(combinedBuffer, {
|
|
27
|
-
parsers,
|
|
28
|
-
geoparquet
|
|
29
|
-
});
|
|
30
|
-
} else return parquetMetadata(footerBuffer, {
|
|
31
|
-
parsers,
|
|
32
|
-
geoparquet
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
function parquetMetadata(arrayBuffer, { parsers, geoparquet = true } = {}) {
|
|
36
|
-
if (!(arrayBuffer instanceof ArrayBuffer)) throw new Error("parquet expected ArrayBuffer");
|
|
37
|
-
const view = new DataView(arrayBuffer);
|
|
38
|
-
parsers = {
|
|
39
|
-
...DEFAULT_PARSERS,
|
|
40
|
-
...parsers
|
|
41
|
-
};
|
|
42
|
-
if (view.byteLength < 8) throw new Error("parquet file is too short");
|
|
43
|
-
if (view.getUint32(view.byteLength - 4, true) !== 827474256) throw new Error("parquet file invalid (footer != PAR1)");
|
|
44
|
-
const metadataLengthOffset = view.byteLength - 8;
|
|
45
|
-
const metadataLength = view.getUint32(metadataLengthOffset, true);
|
|
46
|
-
if (metadataLength > view.byteLength - 8) throw new Error(`parquet metadata length ${metadataLength} exceeds available buffer ${view.byteLength - 8}`);
|
|
47
|
-
const reader = {
|
|
48
|
-
view,
|
|
49
|
-
offset: metadataLengthOffset - metadataLength
|
|
50
|
-
};
|
|
51
|
-
const metadata = deserializeTCompactProtocol(reader);
|
|
52
|
-
const version = metadata.field_1;
|
|
53
|
-
const schema = metadata.field_2.map((field) => ({
|
|
54
|
-
type: ParquetTypes[field.field_1],
|
|
55
|
-
type_length: field.field_2,
|
|
56
|
-
repetition_type: FieldRepetitionTypes[field.field_3],
|
|
57
|
-
name: decode(field.field_4),
|
|
58
|
-
num_children: field.field_5,
|
|
59
|
-
converted_type: ConvertedTypes[field.field_6],
|
|
60
|
-
scale: field.field_7,
|
|
61
|
-
precision: field.field_8,
|
|
62
|
-
field_id: field.field_9,
|
|
63
|
-
logical_type: logicalType(field.field_10)
|
|
64
|
-
}));
|
|
65
|
-
const columnSchema = schema.filter((e) => e.type);
|
|
66
|
-
const num_rows = metadata.field_3;
|
|
67
|
-
const row_groups = metadata.field_4.map((rowGroup) => ({
|
|
68
|
-
columns: rowGroup.field_1.map((column, columnIndex) => ({
|
|
69
|
-
file_path: decode(column.field_1),
|
|
70
|
-
file_offset: column.field_2,
|
|
71
|
-
meta_data: column.field_3 && {
|
|
72
|
-
type: ParquetTypes[column.field_3.field_1],
|
|
73
|
-
encodings: column.field_3.field_2?.map((e) => Encodings[e]),
|
|
74
|
-
path_in_schema: column.field_3.field_3.map(decode),
|
|
75
|
-
codec: CompressionCodecs[column.field_3.field_4],
|
|
76
|
-
num_values: column.field_3.field_5,
|
|
77
|
-
total_uncompressed_size: column.field_3.field_6,
|
|
78
|
-
total_compressed_size: column.field_3.field_7,
|
|
79
|
-
key_value_metadata: column.field_3.field_8?.map((kv) => ({
|
|
80
|
-
key: decode(kv.field_1),
|
|
81
|
-
value: decode(kv.field_2)
|
|
82
|
-
})),
|
|
83
|
-
data_page_offset: column.field_3.field_9,
|
|
84
|
-
index_page_offset: column.field_3.field_10,
|
|
85
|
-
dictionary_page_offset: column.field_3.field_11,
|
|
86
|
-
statistics: convertStats(column.field_3.field_12, columnSchema[columnIndex], parsers),
|
|
87
|
-
encoding_stats: column.field_3.field_13?.map((encodingStat) => ({
|
|
88
|
-
page_type: PageTypes[encodingStat.field_1],
|
|
89
|
-
encoding: Encodings[encodingStat.field_2],
|
|
90
|
-
count: encodingStat.field_3
|
|
91
|
-
})),
|
|
92
|
-
bloom_filter_offset: column.field_3.field_14,
|
|
93
|
-
bloom_filter_length: column.field_3.field_15,
|
|
94
|
-
size_statistics: column.field_3.field_16 && {
|
|
95
|
-
unencoded_byte_array_data_bytes: column.field_3.field_16.field_1,
|
|
96
|
-
repetition_level_histogram: column.field_3.field_16.field_2,
|
|
97
|
-
definition_level_histogram: column.field_3.field_16.field_3
|
|
98
|
-
},
|
|
99
|
-
geospatial_statistics: column.field_3.field_17 && {
|
|
100
|
-
bbox: column.field_3.field_17.field_1 && {
|
|
101
|
-
xmin: column.field_3.field_17.field_1.field_1,
|
|
102
|
-
xmax: column.field_3.field_17.field_1.field_2,
|
|
103
|
-
ymin: column.field_3.field_17.field_1.field_3,
|
|
104
|
-
ymax: column.field_3.field_17.field_1.field_4,
|
|
105
|
-
zmin: column.field_3.field_17.field_1.field_5,
|
|
106
|
-
zmax: column.field_3.field_17.field_1.field_6,
|
|
107
|
-
mmin: column.field_3.field_17.field_1.field_7,
|
|
108
|
-
mmax: column.field_3.field_17.field_1.field_8
|
|
109
|
-
},
|
|
110
|
-
geospatial_types: column.field_3.field_17.field_2
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
offset_index_offset: column.field_4,
|
|
114
|
-
offset_index_length: column.field_5,
|
|
115
|
-
column_index_offset: column.field_6,
|
|
116
|
-
column_index_length: column.field_7,
|
|
117
|
-
crypto_metadata: column.field_8,
|
|
118
|
-
encrypted_column_metadata: column.field_9
|
|
119
|
-
})),
|
|
120
|
-
total_byte_size: rowGroup.field_2,
|
|
121
|
-
num_rows: rowGroup.field_3,
|
|
122
|
-
sorting_columns: rowGroup.field_4?.map((sortingColumn) => ({
|
|
123
|
-
column_idx: sortingColumn.field_1,
|
|
124
|
-
descending: sortingColumn.field_2,
|
|
125
|
-
nulls_first: sortingColumn.field_3
|
|
126
|
-
})),
|
|
127
|
-
file_offset: rowGroup.field_5,
|
|
128
|
-
total_compressed_size: rowGroup.field_6,
|
|
129
|
-
ordinal: rowGroup.field_7
|
|
130
|
-
}));
|
|
131
|
-
const key_value_metadata = metadata.field_5?.map((kv) => ({
|
|
132
|
-
key: decode(kv.field_1),
|
|
133
|
-
value: decode(kv.field_2)
|
|
134
|
-
}));
|
|
135
|
-
const created_by = decode(metadata.field_6);
|
|
136
|
-
if (geoparquet) markGeoColumns(schema, key_value_metadata);
|
|
137
|
-
return {
|
|
138
|
-
version,
|
|
139
|
-
schema,
|
|
140
|
-
num_rows,
|
|
141
|
-
row_groups,
|
|
142
|
-
key_value_metadata,
|
|
143
|
-
created_by,
|
|
144
|
-
metadata_length: metadataLength
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
function parquetSchema({ schema }) {
|
|
148
|
-
return getSchemaPath(schema, [])[0];
|
|
149
|
-
}
|
|
150
|
-
function logicalType(logicalType) {
|
|
151
|
-
if (logicalType?.field_1) return { type: "STRING" };
|
|
152
|
-
if (logicalType?.field_2) return { type: "MAP" };
|
|
153
|
-
if (logicalType?.field_3) return { type: "LIST" };
|
|
154
|
-
if (logicalType?.field_4) return { type: "ENUM" };
|
|
155
|
-
if (logicalType?.field_5) return {
|
|
156
|
-
type: "DECIMAL",
|
|
157
|
-
scale: logicalType.field_5.field_1,
|
|
158
|
-
precision: logicalType.field_5.field_2
|
|
159
|
-
};
|
|
160
|
-
if (logicalType?.field_6) return { type: "DATE" };
|
|
161
|
-
if (logicalType?.field_7) return {
|
|
162
|
-
type: "TIME",
|
|
163
|
-
isAdjustedToUTC: logicalType.field_7.field_1,
|
|
164
|
-
unit: timeUnit(logicalType.field_7.field_2)
|
|
165
|
-
};
|
|
166
|
-
if (logicalType?.field_8) return {
|
|
167
|
-
type: "TIMESTAMP",
|
|
168
|
-
isAdjustedToUTC: logicalType.field_8.field_1,
|
|
169
|
-
unit: timeUnit(logicalType.field_8.field_2)
|
|
170
|
-
};
|
|
171
|
-
if (logicalType?.field_10) return {
|
|
172
|
-
type: "INTEGER",
|
|
173
|
-
bitWidth: logicalType.field_10.field_1,
|
|
174
|
-
isSigned: logicalType.field_10.field_2
|
|
175
|
-
};
|
|
176
|
-
if (logicalType?.field_11) return { type: "NULL" };
|
|
177
|
-
if (logicalType?.field_12) return { type: "JSON" };
|
|
178
|
-
if (logicalType?.field_13) return { type: "BSON" };
|
|
179
|
-
if (logicalType?.field_14) return { type: "UUID" };
|
|
180
|
-
if (logicalType?.field_15) return { type: "FLOAT16" };
|
|
181
|
-
if (logicalType?.field_16) return {
|
|
182
|
-
type: "VARIANT",
|
|
183
|
-
specification_version: logicalType.field_16.field_1
|
|
184
|
-
};
|
|
185
|
-
if (logicalType?.field_17) return {
|
|
186
|
-
type: "GEOMETRY",
|
|
187
|
-
crs: decode(logicalType.field_17.field_1)
|
|
188
|
-
};
|
|
189
|
-
if (logicalType?.field_18) return {
|
|
190
|
-
type: "GEOGRAPHY",
|
|
191
|
-
crs: decode(logicalType.field_18.field_1),
|
|
192
|
-
algorithm: EdgeInterpolationAlgorithms[logicalType.field_18.field_2]
|
|
193
|
-
};
|
|
194
|
-
return logicalType;
|
|
195
|
-
}
|
|
196
|
-
function timeUnit(unit) {
|
|
197
|
-
if (unit.field_1) return "MILLIS";
|
|
198
|
-
if (unit.field_2) return "MICROS";
|
|
199
|
-
if (unit.field_3) return "NANOS";
|
|
200
|
-
throw new Error("parquet time unit required");
|
|
201
|
-
}
|
|
202
|
-
function convertStats(stats, schema, parsers) {
|
|
203
|
-
return stats && {
|
|
204
|
-
max: convertMetadata(stats.field_1, schema, parsers),
|
|
205
|
-
min: convertMetadata(stats.field_2, schema, parsers),
|
|
206
|
-
null_count: stats.field_3,
|
|
207
|
-
distinct_count: stats.field_4,
|
|
208
|
-
max_value: convertMetadata(stats.field_5, schema, parsers),
|
|
209
|
-
min_value: convertMetadata(stats.field_6, schema, parsers),
|
|
210
|
-
is_max_value_exact: stats.field_7,
|
|
211
|
-
is_min_value_exact: stats.field_8
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
function convertMetadata(value, schema, parsers) {
|
|
215
|
-
const { type, converted_type, logical_type } = schema;
|
|
216
|
-
if (value === void 0) return value;
|
|
217
|
-
if (type === "BOOLEAN") return value[0] === 1;
|
|
218
|
-
if (type === "BYTE_ARRAY") return parsers.stringFromBytes(value);
|
|
219
|
-
const view = new DataView(value.buffer, value.byteOffset, value.byteLength);
|
|
220
|
-
if (type === "FLOAT" && view.byteLength === 4) return view.getFloat32(0, true);
|
|
221
|
-
if (type === "DOUBLE" && view.byteLength === 8) return view.getFloat64(0, true);
|
|
222
|
-
if (type === "INT32" && converted_type === "DECIMAL" && view.byteLength === 4) return view.getInt32(0, true) * 10 ** -(schema.scale || 0);
|
|
223
|
-
if (type === "INT64" && converted_type === "DECIMAL" && view.byteLength === 8) return Number(view.getBigInt64(0, true)) * 10 ** -(schema.scale || 0);
|
|
224
|
-
if (type === "INT32" && converted_type === "DATE") return parsers.dateFromDays(view.getInt32(0, true));
|
|
225
|
-
if (type === "INT64" && converted_type === "TIMESTAMP_MILLIS") return parsers.timestampFromMilliseconds(view.getBigInt64(0, true));
|
|
226
|
-
if (type === "INT64" && converted_type === "TIMESTAMP_MICROS") return parsers.timestampFromMicroseconds(view.getBigInt64(0, true));
|
|
227
|
-
if (type === "INT64" && logical_type?.type === "TIMESTAMP" && logical_type?.unit === "NANOS") return parsers.timestampFromNanoseconds(view.getBigInt64(0, true));
|
|
228
|
-
if (type === "INT64" && logical_type?.type === "TIMESTAMP" && logical_type?.unit === "MICROS") return parsers.timestampFromMicroseconds(view.getBigInt64(0, true));
|
|
229
|
-
if (type === "INT64" && logical_type?.type === "TIMESTAMP") return parsers.timestampFromMilliseconds(view.getBigInt64(0, true));
|
|
230
|
-
const unsigned = converted_type?.startsWith("UINT_") || logical_type?.type === "INTEGER" && !logical_type.isSigned;
|
|
231
|
-
if (type === "INT32" && unsigned && view.byteLength === 4) return view.getUint32(0, true);
|
|
232
|
-
if (type === "INT64" && unsigned && view.byteLength === 8) return view.getBigUint64(0, true);
|
|
233
|
-
if (type === "INT32" && view.byteLength === 4) return view.getInt32(0, true);
|
|
234
|
-
if (type === "INT64" && view.byteLength === 8) return view.getBigInt64(0, true);
|
|
235
|
-
if (converted_type === "DECIMAL") return parseDecimal(value) * 10 ** -(schema.scale || 0);
|
|
236
|
-
if (logical_type?.type === "FLOAT16") return parseFloat16(value);
|
|
237
|
-
if (logical_type?.type === "UUID") return parsers.uuidFromBytes(value);
|
|
238
|
-
if (type === "FIXED_LEN_BYTE_ARRAY") return value;
|
|
239
|
-
return value;
|
|
240
|
-
}
|
|
241
|
-
export { convertMetadata, defaultInitialFetchSize, parquetMetadata, parquetMetadataAsync, parquetSchema };
|
|
1
|
+
import "./schema.mjs";
|
|
2
|
+
import "./thrift.mjs";
|
|
3
|
+
import "./constants.mjs";
|
|
4
|
+
import "./convert.mjs";
|
|
5
|
+
import "./geoparquet.mjs";
|
|
6
|
+
new TextDecoder();
|
|
7
|
+
export {};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { parquetMetadataAsync, parquetSchema } from "./metadata.mjs";
|
|
2
|
-
import "./indexes.mjs";
|
|
3
1
|
import { toJson } from "./utils.mjs";
|
|
4
|
-
import "./snappy.mjs";
|
|
5
|
-
import { parquetReadObjects } from "./read.mjs";
|
|
6
2
|
import "./index.mjs";
|
|
7
|
-
export {
|
|
3
|
+
export { toJson };
|
|
@@ -1,79 +1 @@
|
|
|
1
|
-
|
|
2
|
-
if (count === 0) return [];
|
|
3
|
-
if (type === "BOOLEAN") return readPlainBoolean(reader, count);
|
|
4
|
-
else if (type === "INT32") return readPlainInt32(reader, count);
|
|
5
|
-
else if (type === "INT64") return readPlainInt64(reader, count);
|
|
6
|
-
else if (type === "INT96") return readPlainInt96(reader, count);
|
|
7
|
-
else if (type === "FLOAT") return readPlainFloat(reader, count);
|
|
8
|
-
else if (type === "DOUBLE") return readPlainDouble(reader, count);
|
|
9
|
-
else if (type === "BYTE_ARRAY") return readPlainByteArray(reader, count);
|
|
10
|
-
else if (type === "FIXED_LEN_BYTE_ARRAY") {
|
|
11
|
-
if (!fixedLength) throw new Error("parquet missing fixed length");
|
|
12
|
-
return readPlainByteArrayFixed(reader, count, fixedLength);
|
|
13
|
-
} else throw new Error(`parquet unhandled type: ${type}`);
|
|
14
|
-
}
|
|
15
|
-
function readPlainBoolean(reader, count) {
|
|
16
|
-
const values = new Array(count);
|
|
17
|
-
for (let i = 0; i < count; i++) {
|
|
18
|
-
const byteOffset = reader.offset + (i / 8 | 0);
|
|
19
|
-
const bitOffset = i % 8;
|
|
20
|
-
const byte = reader.view.getUint8(byteOffset);
|
|
21
|
-
values[i] = (byte & 1 << bitOffset) !== 0;
|
|
22
|
-
}
|
|
23
|
-
reader.offset += Math.ceil(count / 8);
|
|
24
|
-
return values;
|
|
25
|
-
}
|
|
26
|
-
function readPlainInt32(reader, count) {
|
|
27
|
-
const values = (reader.view.byteOffset + reader.offset) % 4 ? new Int32Array(align(reader.view.buffer, reader.view.byteOffset + reader.offset, count * 4)) : new Int32Array(reader.view.buffer, reader.view.byteOffset + reader.offset, count);
|
|
28
|
-
reader.offset += count * 4;
|
|
29
|
-
return values;
|
|
30
|
-
}
|
|
31
|
-
function readPlainInt64(reader, count) {
|
|
32
|
-
const values = (reader.view.byteOffset + reader.offset) % 8 ? new BigInt64Array(align(reader.view.buffer, reader.view.byteOffset + reader.offset, count * 8)) : new BigInt64Array(reader.view.buffer, reader.view.byteOffset + reader.offset, count);
|
|
33
|
-
reader.offset += count * 8;
|
|
34
|
-
return values;
|
|
35
|
-
}
|
|
36
|
-
function readPlainInt96(reader, count) {
|
|
37
|
-
const values = new Array(count);
|
|
38
|
-
for (let i = 0; i < count; i++) {
|
|
39
|
-
const low = reader.view.getBigInt64(reader.offset + i * 12, true);
|
|
40
|
-
const high = reader.view.getInt32(reader.offset + i * 12 + 8, true);
|
|
41
|
-
values[i] = BigInt(high) << 64n | low;
|
|
42
|
-
}
|
|
43
|
-
reader.offset += count * 12;
|
|
44
|
-
return values;
|
|
45
|
-
}
|
|
46
|
-
function readPlainFloat(reader, count) {
|
|
47
|
-
const values = (reader.view.byteOffset + reader.offset) % 4 ? new Float32Array(align(reader.view.buffer, reader.view.byteOffset + reader.offset, count * 4)) : new Float32Array(reader.view.buffer, reader.view.byteOffset + reader.offset, count);
|
|
48
|
-
reader.offset += count * 4;
|
|
49
|
-
return values;
|
|
50
|
-
}
|
|
51
|
-
function readPlainDouble(reader, count) {
|
|
52
|
-
const values = (reader.view.byteOffset + reader.offset) % 8 ? new Float64Array(align(reader.view.buffer, reader.view.byteOffset + reader.offset, count * 8)) : new Float64Array(reader.view.buffer, reader.view.byteOffset + reader.offset, count);
|
|
53
|
-
reader.offset += count * 8;
|
|
54
|
-
return values;
|
|
55
|
-
}
|
|
56
|
-
function readPlainByteArray(reader, count) {
|
|
57
|
-
const values = new Array(count);
|
|
58
|
-
for (let i = 0; i < count; i++) {
|
|
59
|
-
const length = reader.view.getUint32(reader.offset, true);
|
|
60
|
-
reader.offset += 4;
|
|
61
|
-
values[i] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, length);
|
|
62
|
-
reader.offset += length;
|
|
63
|
-
}
|
|
64
|
-
return values;
|
|
65
|
-
}
|
|
66
|
-
function readPlainByteArrayFixed(reader, count, fixedLength) {
|
|
67
|
-
const values = new Array(count);
|
|
68
|
-
for (let i = 0; i < count; i++) {
|
|
69
|
-
values[i] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, fixedLength);
|
|
70
|
-
reader.offset += fixedLength;
|
|
71
|
-
}
|
|
72
|
-
return values;
|
|
73
|
-
}
|
|
74
|
-
function align(buffer, offset, size) {
|
|
75
|
-
const aligned = new ArrayBuffer(size);
|
|
76
|
-
new Uint8Array(aligned).set(new Uint8Array(buffer, offset, size));
|
|
77
|
-
return aligned;
|
|
78
|
-
}
|
|
79
|
-
export { readPlain };
|
|
1
|
+
export {};
|