@gscdump/engine 3.5.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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
|
@@ -2,23 +2,23 @@ import { SearchType } from "../storage.mjs";
|
|
|
2
2
|
import { IcebergColumn, IcebergPartitionField, IcebergS3Config, IcebergTableSpec, PartitionKeyEncoding, PartitionKeyEncoding as PartitionKeyEncoding$1 } from "@gscdump/lakehouse/schema";
|
|
3
3
|
import { TableName } from "@gscdump/contracts";
|
|
4
4
|
/** The 9 fact tables that exist as global Iceberg tables. */
|
|
5
|
-
type IcebergTableName = Extract<TableName, 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates' | 'search_appearance' | 'search_appearance_pages' | 'search_appearance_queries' | 'search_appearance_page_queries'>;
|
|
5
|
+
export type IcebergTableName = Extract<TableName, 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates' | 'search_appearance' | 'search_appearance_pages' | 'search_appearance_queries' | 'search_appearance_page_queries'>;
|
|
6
6
|
/** The 9 Iceberg table names, in canonical order. */
|
|
7
|
-
declare const ICEBERG_TABLES: readonly IcebergTableName[];
|
|
7
|
+
export declare const ICEBERG_TABLES: readonly IcebergTableName[];
|
|
8
8
|
/**
|
|
9
9
|
* Stable `search_type` enum → int map for `'int'`-encoded catalogs. Engine-owned
|
|
10
10
|
* and FROZEN: never renumber or reuse an id (it's the on-disk partition value).
|
|
11
11
|
*/
|
|
12
|
-
declare const SEARCH_TYPE_INT: Record<SearchType, number>;
|
|
12
|
+
export declare const SEARCH_TYPE_INT: Record<SearchType, number>;
|
|
13
13
|
/** Reverse of {@link SEARCH_TYPE_INT} — int → `search_type`, for read-result mapping. */
|
|
14
|
-
declare const INT_SEARCH_TYPE: Record<number, SearchType>;
|
|
14
|
+
export declare const INT_SEARCH_TYPE: Record<number, SearchType>;
|
|
15
15
|
/**
|
|
16
16
|
* The two partition-identity columns Iceberg rows carry that the legacy
|
|
17
17
|
* parquet path encoded in the object-key prefix instead. Field ids 1–2 are
|
|
18
18
|
* the first two columns; per-table metric/dimension columns follow
|
|
19
19
|
* contiguously from id 3 (see `ICEBERG_FIELD_ID_BASE`).
|
|
20
20
|
*/
|
|
21
|
-
declare const ICEBERG_PARTITION_COLUMNS: readonly IcebergColumn[];
|
|
21
|
+
export declare const ICEBERG_PARTITION_COLUMNS: readonly IcebergColumn[];
|
|
22
22
|
/**
|
|
23
23
|
* The two partition-identity columns for a given {@link PartitionKeyEncoding}.
|
|
24
24
|
* `'string'` returns {@link ICEBERG_PARTITION_COLUMNS} verbatim; `'int'` swaps
|
|
@@ -27,7 +27,7 @@ declare const ICEBERG_PARTITION_COLUMNS: readonly IcebergColumn[];
|
|
|
27
27
|
* avoid R2 SQL's truncated-string-stats equality undercount and restore pruning.
|
|
28
28
|
* Field ids are unchanged (1, 2) — only the column types differ.
|
|
29
29
|
*/
|
|
30
|
-
declare function icebergPartitionColumns(encoding?: PartitionKeyEncoding): readonly IcebergColumn[];
|
|
30
|
+
export declare function icebergPartitionColumns(encoding?: PartitionKeyEncoding): readonly IcebergColumn[];
|
|
31
31
|
/**
|
|
32
32
|
* First field id used for per-table (non-partition) columns — immediately
|
|
33
33
|
* after the two partition-identity columns (`site_id`=1, `search_type`=2).
|
|
@@ -35,9 +35,9 @@ declare function icebergPartitionColumns(encoding?: PartitionKeyEncoding): reado
|
|
|
35
35
|
* `defineIcebergDataset` itself, identity-then-dims-then-columns) — kept as a
|
|
36
36
|
* documented, byte-identity-tested constant for existing external readers.
|
|
37
37
|
*/
|
|
38
|
-
declare const ICEBERG_FIELD_ID_BASE = 3;
|
|
38
|
+
export declare const ICEBERG_FIELD_ID_BASE = 3;
|
|
39
39
|
/** Shared partition spec — identical across every table. */
|
|
40
|
-
declare const ICEBERG_PARTITION_SPEC: readonly IcebergPartitionField[];
|
|
40
|
+
export declare const ICEBERG_PARTITION_SPEC: readonly IcebergPartitionField[];
|
|
41
41
|
/**
|
|
42
42
|
* Derive the full Iceberg table spec for a table + encoding. Thin wrapper
|
|
43
43
|
* over {@link gscDataset}'s `tableSpec` (ADR-0021 R2-FIXES C5) — kept as a
|
|
@@ -47,17 +47,17 @@ declare const ICEBERG_PARTITION_SPEC: readonly IcebergPartitionField[];
|
|
|
47
47
|
* CONTRACT NOTE: implementation agents must treat the RETURNED VALUE as the
|
|
48
48
|
* source of truth — do not hand-list columns elsewhere.
|
|
49
49
|
*/
|
|
50
|
-
declare function icebergTableSpec(table: IcebergTableName, encoding?: PartitionKeyEncoding): IcebergTableSpec;
|
|
50
|
+
export declare function icebergTableSpec(table: IcebergTableName, encoding?: PartitionKeyEncoding): IcebergTableSpec;
|
|
51
51
|
/** All Iceberg table specs in legacy `'string'` encoding, keyed by table name. */
|
|
52
|
-
declare const ICEBERG_SCHEMAS_STRING: Record<IcebergTableName, IcebergTableSpec>;
|
|
52
|
+
export declare const ICEBERG_SCHEMAS_STRING: Record<IcebergTableName, IcebergTableSpec>;
|
|
53
53
|
/** All Iceberg table specs in `'int'` encoding (INT site_id + INT search_type). */
|
|
54
|
-
declare const ICEBERG_SCHEMAS_INT: Record<IcebergTableName, IcebergTableSpec>;
|
|
54
|
+
export declare const ICEBERG_SCHEMAS_INT: Record<IcebergTableName, IcebergTableSpec>;
|
|
55
55
|
/** All Iceberg table specs for the default new-catalog encoding. */
|
|
56
|
-
declare const ICEBERG_SCHEMAS: Record<IcebergTableName, IcebergTableSpec>;
|
|
56
|
+
export declare const ICEBERG_SCHEMAS: Record<IcebergTableName, IcebergTableSpec>;
|
|
57
57
|
/** Table specs for the given encoding (`'int'` default). */
|
|
58
|
-
declare function icebergSchemasFor(encoding?: PartitionKeyEncoding): Record<IcebergTableName, IcebergTableSpec>;
|
|
58
|
+
export declare function icebergSchemasFor(encoding?: PartitionKeyEncoding): Record<IcebergTableName, IcebergTableSpec>;
|
|
59
59
|
/** True when `table` is one of the canonical {@link ICEBERG_TABLES}. */
|
|
60
|
-
declare function isIcebergTable(table: string): table is IcebergTableName;
|
|
60
|
+
export declare function isIcebergTable(table: string): table is IcebergTableName;
|
|
61
61
|
/**
|
|
62
62
|
* Narrow an arbitrary table name to a canonical {@link IcebergTableName},
|
|
63
63
|
* throwing a clear error otherwise. Guards write paths that index
|
|
@@ -65,5 +65,5 @@ declare function isIcebergTable(table: string): table is IcebergTableName;
|
|
|
65
65
|
* silently yields `undefined` there, propagating a corrupt/empty spec into the
|
|
66
66
|
* Iceberg job instead of failing loudly.
|
|
67
67
|
*/
|
|
68
|
-
declare function assertIcebergTable(table: string): IcebergTableName;
|
|
69
|
-
export {
|
|
68
|
+
export declare function assertIcebergTable(table: string): IcebergTableName;
|
|
69
|
+
export type { IcebergS3Config, PartitionKeyEncoding$1 as PartitionKeyEncoding, SearchType };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SearchType, TenantCtx as TenantCtx$1 } from "./storage.mjs";
|
|
2
2
|
import { GscApiRow, RowAccumulatorOptions } from "./ingest.mjs";
|
|
3
3
|
import { Grain, Row, TableName } from "@gscdump/contracts";
|
|
4
|
-
interface IngestAccumulatorEngine {
|
|
4
|
+
export interface IngestAccumulatorEngine {
|
|
5
5
|
writeDay: (scope: TenantCtx$1 & {
|
|
6
6
|
table: TableName;
|
|
7
7
|
date: string;
|
|
@@ -25,7 +25,7 @@ interface IngestAccumulatorEngine {
|
|
|
25
25
|
error?: string;
|
|
26
26
|
}) => Promise<void>;
|
|
27
27
|
}
|
|
28
|
-
interface IngestAccumulatorCtx {
|
|
28
|
+
export interface IngestAccumulatorCtx {
|
|
29
29
|
userId: string | number;
|
|
30
30
|
siteId: string;
|
|
31
31
|
searchType?: SearchType;
|
|
@@ -36,7 +36,7 @@ interface IngestAccumulatorCtx {
|
|
|
36
36
|
*/
|
|
37
37
|
grain?: Grain;
|
|
38
38
|
}
|
|
39
|
-
interface IngestAccumulatorHooks {
|
|
39
|
+
export interface IngestAccumulatorHooks {
|
|
40
40
|
/**
|
|
41
41
|
* Called once per (table, date) when the job must abandon in-memory rows
|
|
42
42
|
* (overflow or `hasMore` continuation). Host queues a forced re-sync from
|
|
@@ -70,7 +70,7 @@ interface IngestAccumulatorHooks {
|
|
|
70
70
|
rowsWritten: number;
|
|
71
71
|
}) => Promise<void>;
|
|
72
72
|
}
|
|
73
|
-
interface FinalizeOptions {
|
|
73
|
+
export interface FinalizeOptions {
|
|
74
74
|
/**
|
|
75
75
|
* The GSC `hasMore` flag for the whole job. When true, in-memory buckets
|
|
76
76
|
* only reflect this job's slice; we re-queue forced single-day re-syncs
|
|
@@ -78,20 +78,19 @@ interface FinalizeOptions {
|
|
|
78
78
|
*/
|
|
79
79
|
hasMore: boolean;
|
|
80
80
|
}
|
|
81
|
-
interface FinalizeResult {
|
|
81
|
+
export interface FinalizeResult {
|
|
82
82
|
flushed: number;
|
|
83
83
|
recovered: number;
|
|
84
84
|
failed: number;
|
|
85
85
|
rowsWritten: number;
|
|
86
86
|
}
|
|
87
|
-
interface IngestAccumulator {
|
|
87
|
+
export interface IngestAccumulator {
|
|
88
88
|
push: (table: TableName, rows: readonly GscApiRow[]) => boolean;
|
|
89
89
|
finalize: (opts: FinalizeOptions) => Promise<FinalizeResult>;
|
|
90
90
|
}
|
|
91
|
-
interface CreateIngestAccumulatorOptions extends RowAccumulatorOptions {
|
|
91
|
+
export interface CreateIngestAccumulatorOptions extends RowAccumulatorOptions {
|
|
92
92
|
engine: IngestAccumulatorEngine;
|
|
93
93
|
ctx: IngestAccumulatorCtx;
|
|
94
94
|
hooks: IngestAccumulatorHooks;
|
|
95
95
|
}
|
|
96
|
-
declare function createIngestAccumulator(opts: CreateIngestAccumulatorOptions): IngestAccumulator;
|
|
97
|
-
export { CreateIngestAccumulatorOptions, FinalizeOptions, FinalizeResult, IngestAccumulator, IngestAccumulatorCtx, IngestAccumulatorEngine, IngestAccumulatorHooks, createIngestAccumulator };
|
|
96
|
+
export declare function createIngestAccumulator(opts: CreateIngestAccumulatorOptions): IngestAccumulator;
|
package/dist/ingest.d.mts
CHANGED
|
@@ -6,8 +6,8 @@ import { Row, TableName } from "./storage.mjs";
|
|
|
6
6
|
* `keys[]` tuples. Storage-column names (e.g. `page` → `url`) are handled
|
|
7
7
|
* inside `transformGscRow` — this record stays in GSC-API vocabulary.
|
|
8
8
|
*/
|
|
9
|
-
declare const TABLE_DIMS: Record<TableName, string[]>;
|
|
10
|
-
interface GscApiRow {
|
|
9
|
+
export declare const TABLE_DIMS: Record<TableName, string[]>;
|
|
10
|
+
export interface GscApiRow {
|
|
11
11
|
keys: string[];
|
|
12
12
|
clicks: number;
|
|
13
13
|
impressions: number;
|
|
@@ -15,7 +15,7 @@ interface GscApiRow {
|
|
|
15
15
|
ctr?: number;
|
|
16
16
|
position: number;
|
|
17
17
|
}
|
|
18
|
-
interface IngestOptions {
|
|
18
|
+
export interface IngestOptions {
|
|
19
19
|
/** Date for one-day `searchAppearance` total queries, whose keys omit date. */
|
|
20
20
|
date?: string;
|
|
21
21
|
/** Search appearance filter used for contextual second-step rows. */
|
|
@@ -25,19 +25,21 @@ interface IngestOptions {
|
|
|
25
25
|
* Strip a GSC URL to its pathname. Core analytics stores pages by path so
|
|
26
26
|
* queries don't carry origin-prefix filters.
|
|
27
27
|
*/
|
|
28
|
-
declare function toPath(gscUrl: string): string;
|
|
28
|
+
export declare function toPath(gscUrl: string): string;
|
|
29
29
|
/**
|
|
30
30
|
* Encode weighted average position as `sum_position`. The raw GSC position
|
|
31
31
|
* is 1-indexed; subtract 1 and weight by impressions so a downstream
|
|
32
32
|
* `SUM(sum_position) / SUM(impressions) + 1` recovers the true mean without
|
|
33
33
|
* ever materialising per-row position values.
|
|
34
34
|
*/
|
|
35
|
-
declare function toSumPosition(apiPosition: number, impressions: number): number;
|
|
35
|
+
export declare function toSumPosition(apiPosition: number, impressions: number): number;
|
|
36
36
|
/**
|
|
37
37
|
* Map one GSC API row into `{ date, row }` for the given table, or null if
|
|
38
38
|
* the row has no keys (GSC occasionally emits empty-keys placeholders).
|
|
39
|
+
* Use `createRowAccumulator` for a complete slice so URL variants combine
|
|
40
|
+
* before the storage engine deduplicates stored keys.
|
|
39
41
|
*/
|
|
40
|
-
declare function transformGscRow(table: TableName, apiRow: GscApiRow, options?: IngestOptions): {
|
|
42
|
+
export declare function transformGscRow(table: TableName, apiRow: GscApiRow, options?: IngestOptions): {
|
|
41
43
|
date: string;
|
|
42
44
|
row: Row;
|
|
43
45
|
} | null;
|
|
@@ -57,11 +59,11 @@ declare function transformGscRow(table: TableName, apiRow: GscApiRow, options?:
|
|
|
57
59
|
* page_grained_impressions`, where the page/date totals come from `totalsRow`.
|
|
58
60
|
* Mirrors the legacy `dailyTotalsRollup` formula. Clamped to `[0, 1]`.
|
|
59
61
|
*/
|
|
60
|
-
declare function assembleDatesRow(date: string, totalsRow: GscApiRow, deviceRows: readonly GscApiRow[], queryGrainedImpressions: number): {
|
|
62
|
+
export declare function assembleDatesRow(date: string, totalsRow: GscApiRow, deviceRows: readonly GscApiRow[], queryGrainedImpressions: number): {
|
|
61
63
|
date: string;
|
|
62
64
|
row: Row;
|
|
63
65
|
};
|
|
64
|
-
interface RowAccumulator {
|
|
66
|
+
export interface RowAccumulator {
|
|
65
67
|
/**
|
|
66
68
|
* Push a batch of GSC API rows into the accumulator. Returns `false` if
|
|
67
69
|
* the batch pushed total row count past `maxRows`; subsequent pushes
|
|
@@ -71,6 +73,8 @@ interface RowAccumulator {
|
|
|
71
73
|
/**
|
|
72
74
|
* Consume accumulated rows, grouped by `table → date → rows`. Resets
|
|
73
75
|
* internal state; subsequent pushes behave as on a fresh accumulator.
|
|
76
|
+
* Repeated source identities count once. Distinct URL variants that share
|
|
77
|
+
* stored dimensions contribute their combined metrics.
|
|
74
78
|
*/
|
|
75
79
|
drain: () => Map<TableName, Map<string, Row[]>>;
|
|
76
80
|
/**
|
|
@@ -85,12 +89,12 @@ interface RowAccumulator {
|
|
|
85
89
|
* eventual `drain()` at job end.
|
|
86
90
|
*/
|
|
87
91
|
drainCompleted: () => Map<TableName, Map<string, Row[]>>;
|
|
88
|
-
/**
|
|
92
|
+
/** Distinct source row count across all tables/dates since last drain. */
|
|
89
93
|
readonly totalRows: number;
|
|
90
94
|
/** Whether the accumulator has overflowed since last drain. */
|
|
91
95
|
readonly overflowed: boolean;
|
|
92
96
|
}
|
|
93
|
-
interface RowAccumulatorOptions extends IngestOptions {
|
|
97
|
+
export interface RowAccumulatorOptions extends IngestOptions {
|
|
94
98
|
/**
|
|
95
99
|
* Soft cap on total accumulated rows before `push` starts returning
|
|
96
100
|
* `false` and dropping rows. Defaults to 500_000 — matches the
|
|
@@ -109,5 +113,4 @@ interface RowAccumulatorOptions extends IngestOptions {
|
|
|
109
113
|
*/
|
|
110
114
|
trackDateBoundary?: boolean;
|
|
111
115
|
}
|
|
112
|
-
declare function createRowAccumulator(options?: RowAccumulatorOptions): RowAccumulator;
|
|
113
|
-
export { GscApiRow, IngestOptions, RowAccumulator, RowAccumulatorOptions, TABLE_DIMS, assembleDatesRow, createRowAccumulator, toPath, toSumPosition, transformGscRow };
|
|
116
|
+
export declare function createRowAccumulator(options?: RowAccumulatorOptions): RowAccumulator;
|
package/dist/ingest.mjs
CHANGED
|
@@ -233,6 +233,20 @@ function assembleDatesRow(date, totalsRow, deviceRows, queryGrainedImpressions)
|
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
235
|
const DEFAULT_MAX_ROWS = 5e5;
|
|
236
|
+
function storedRows(table, sourceRows) {
|
|
237
|
+
if (!TABLE_DIMS[table].includes("page")) return [...sourceRows.values()];
|
|
238
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
239
|
+
for (const row of sourceRows.values()) {
|
|
240
|
+
const key = JSON.stringify([row.searchAppearance, ...TABLE_DIMS[table].map((dimension) => row[dimension === "page" ? "url" : dimension])]);
|
|
241
|
+
const prior = grouped.get(key);
|
|
242
|
+
if (prior) {
|
|
243
|
+
prior.clicks = Number(prior.clicks) + Number(row.clicks);
|
|
244
|
+
prior.impressions = Number(prior.impressions) + Number(row.impressions);
|
|
245
|
+
prior.sum_position = Number(prior.sum_position) + Number(row.sum_position);
|
|
246
|
+
} else grouped.set(key, { ...row });
|
|
247
|
+
}
|
|
248
|
+
return [...grouped.values()];
|
|
249
|
+
}
|
|
236
250
|
function createRowAccumulator(options = {}) {
|
|
237
251
|
const maxRows = options.maxRows ?? DEFAULT_MAX_ROWS;
|
|
238
252
|
const trackDateBoundary = options.trackDateBoundary === true;
|
|
@@ -260,11 +274,12 @@ function createRowAccumulator(options = {}) {
|
|
|
260
274
|
}
|
|
261
275
|
let dateRows = byDate.get(t.date);
|
|
262
276
|
if (!dateRows) {
|
|
263
|
-
dateRows =
|
|
277
|
+
dateRows = /* @__PURE__ */ new Map();
|
|
264
278
|
byDate.set(t.date, dateRows);
|
|
265
279
|
}
|
|
266
|
-
|
|
267
|
-
total++;
|
|
280
|
+
const sourceKey = JSON.stringify(r.keys);
|
|
281
|
+
if (!dateRows.has(sourceKey)) total++;
|
|
282
|
+
dateRows.set(sourceKey, t.row);
|
|
268
283
|
if (trackDateBoundary && (!newestDate || t.date > newestDate)) newestDate = t.date;
|
|
269
284
|
if (total > maxRows) {
|
|
270
285
|
if (newestDate) latestDate.set(table, newestDate);
|
|
@@ -276,7 +291,8 @@ function createRowAccumulator(options = {}) {
|
|
|
276
291
|
return true;
|
|
277
292
|
},
|
|
278
293
|
drain() {
|
|
279
|
-
const out =
|
|
294
|
+
const out = /* @__PURE__ */ new Map();
|
|
295
|
+
for (const [table, byDate] of buckets) out.set(table, new Map([...byDate].map(([date, sourceRows]) => [date, storedRows(table, sourceRows)])));
|
|
280
296
|
buckets = /* @__PURE__ */ new Map();
|
|
281
297
|
latestDate.clear();
|
|
282
298
|
total = 0;
|
|
@@ -295,8 +311,8 @@ function createRowAccumulator(options = {}) {
|
|
|
295
311
|
outBy = /* @__PURE__ */ new Map();
|
|
296
312
|
out.set(table, outBy);
|
|
297
313
|
}
|
|
298
|
-
outBy.set(date, dateRows);
|
|
299
|
-
total -= dateRows.
|
|
314
|
+
outBy.set(date, storedRows(table, dateRows));
|
|
315
|
+
total -= dateRows.size;
|
|
300
316
|
}
|
|
301
317
|
if (outBy) for (const date of outBy.keys()) byDate.delete(date);
|
|
302
318
|
}
|
package/dist/layout.d.mts
CHANGED
|
@@ -6,18 +6,17 @@ import { SearchType } from "gscdump/query";
|
|
|
6
6
|
* sync paths that don't request a specific type. GSC's own default; the
|
|
7
7
|
* vast majority of stored data is web-search.
|
|
8
8
|
*/
|
|
9
|
-
declare const DEFAULT_SEARCH_TYPE: SearchType;
|
|
10
|
-
declare function objectKey(ctx: TenantCtx, table: TableName, partition: string, version: number, searchType?: SearchType): string;
|
|
9
|
+
export declare const DEFAULT_SEARCH_TYPE: SearchType;
|
|
10
|
+
export declare function objectKey(ctx: TenantCtx, table: TableName, partition: string, version: number, searchType?: SearchType): string;
|
|
11
11
|
/**
|
|
12
12
|
* Resolve the search type for an entry, defaulting legacy entries to `web`.
|
|
13
13
|
* Use this anywhere code needs to bucket entries by searchType.
|
|
14
14
|
*/
|
|
15
|
-
declare function inferSearchType(entry: Pick<ManifestEntry, 'searchType'>): SearchType;
|
|
15
|
+
export declare function inferSearchType(entry: Pick<ManifestEntry, 'searchType'>): SearchType;
|
|
16
16
|
/**
|
|
17
17
|
* Infer the tier for an entry that pre-dates the `tier` field. Daily files
|
|
18
18
|
* are `raw`; monthly files are `d30`. Anything else (already migrated, or
|
|
19
19
|
* a partition shape we haven't seen) returns undefined and the caller must
|
|
20
20
|
* decide how to handle it.
|
|
21
21
|
*/
|
|
22
|
-
declare function inferLegacyTier(entry: Pick<ManifestEntry, 'partition' | 'tier'>): CompactionTier | undefined;
|
|
23
|
-
export { DEFAULT_SEARCH_TYPE, inferLegacyTier, inferSearchType, objectKey };
|
|
22
|
+
export declare function inferLegacyTier(entry: Pick<ManifestEntry, 'partition' | 'tier'>): CompactionTier | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Encodings, PageTypes } from "../../../../hyparquet@1.29.2/node_modules/hyparquet/src/constants.mjs";
|
|
2
1
|
import { ByteWriter } from "./bytewriter.mjs";
|
|
3
2
|
import { serializeTCompactProtocol } from "./thrift.mjs";
|
|
3
|
+
import { Encodings, PageTypes } from "../../../../hyparquet@1.29.2/node_modules/hyparquet/src/constants.mjs";
|
|
4
4
|
import { deltaBinaryPack, deltaByteArray, deltaLengthByteArray } from "./delta.mjs";
|
|
5
5
|
import { writeRleBitPackedHybrid } from "./encoding.mjs";
|
|
6
6
|
import { writePlain } from "./plain.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BoundaryOrders } from "../../../../hyparquet@1.29.2/node_modules/hyparquet/src/constants.mjs";
|
|
2
1
|
import { serializeTCompactProtocol } from "./thrift.mjs";
|
|
2
|
+
import { BoundaryOrders } from "../../../../hyparquet@1.29.2/node_modules/hyparquet/src/constants.mjs";
|
|
3
3
|
function writeIndexes(writer, pageIndexes) {
|
|
4
4
|
for (const { chunk, columnIndex } of pageIndexes) writeColumnIndex(writer, chunk, columnIndex);
|
|
5
5
|
for (const { chunk, offsetIndex } of pageIndexes) writeOffsetIndex(writer, chunk, offsetIndex);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CompressionCodecs, ConvertedTypes, EdgeInterpolationAlgorithms, Encodings, FieldRepetitionTypes, PageTypes, ParquetTypes } from "../../../../hyparquet@1.29.2/node_modules/hyparquet/src/constants.mjs";
|
|
2
1
|
import { getSchemaPath } from "../../../../hyparquet@1.29.2/node_modules/hyparquet/src/schema.mjs";
|
|
3
2
|
import { ThriftStruct, serializeTCompactProtocol } from "./thrift.mjs";
|
|
3
|
+
import { CompressionCodecs, ConvertedTypes, EdgeInterpolationAlgorithms, Encodings, FieldRepetitionTypes, PageTypes, ParquetTypes } from "../../../../hyparquet@1.29.2/node_modules/hyparquet/src/constants.mjs";
|
|
4
4
|
import { unconvertStatistics } from "./unconvert.mjs";
|
|
5
5
|
function writeMetadata(writer, metadata) {
|
|
6
6
|
const compact = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../../../hyparquet@1.29.2/node_modules/hyparquet/types/node.mjs";
|
|
2
|
-
interface Writer {
|
|
2
|
+
export interface Writer {
|
|
3
3
|
buffer: ArrayBuffer;
|
|
4
4
|
view: DataView;
|
|
5
5
|
offset: number; // total bytes written
|
|
@@ -19,5 +19,4 @@ interface Writer {
|
|
|
19
19
|
appendVarInt(value: number): void;
|
|
20
20
|
appendVarBigInt(value: bigint): void;
|
|
21
21
|
appendZigZag(value: number | bigint): void;
|
|
22
|
-
}
|
|
23
|
-
export { Writer };
|
|
22
|
+
}
|
|
@@ -6,7 +6,7 @@ import "./schema.mjs";
|
|
|
6
6
|
import "./bytewriter.mjs";
|
|
7
7
|
import "./parquet-writer.mjs";
|
|
8
8
|
import "./wkb.mjs";
|
|
9
|
-
type Writer = Writer$1;
|
|
9
|
+
export type Writer = Writer$1;
|
|
10
10
|
/**
|
|
11
11
|
* @typedef {import('hyparquet').KeyValue} KeyValue
|
|
12
12
|
* @typedef {import('hyparquet').SchemaElement} SchemaElement
|
|
@@ -14,5 +14,4 @@ type Writer = Writer$1;
|
|
|
14
14
|
* @typedef {import('../src/types.d.ts').ColumnSource} ColumnSource
|
|
15
15
|
* @typedef {import('../src/types.d.ts').ParquetWriteOptions} ParquetWriteOptions
|
|
16
16
|
* @typedef {import('../src/types.d.ts').Writer} Writer
|
|
17
|
-
*/
|
|
18
|
-
export { Writer };
|
|
17
|
+
*/
|
|
@@ -1,144 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const maxDefinitionLevel = getMaxDefinitionLevel(schemaPath);
|
|
5
|
-
if (!definitionLevels?.length && !repetitionLevels.length) {
|
|
6
|
-
if (!maxDefinitionLevel || !values.length) return values;
|
|
7
|
-
definitionLevels = new Array(values.length).fill(maxDefinitionLevel);
|
|
8
|
-
}
|
|
9
|
-
const n = definitionLevels?.length || repetitionLevels.length;
|
|
10
|
-
const repetitionPath = schemaPath.map(({ element }) => element.repetition_type);
|
|
11
|
-
let valueIndex = 0;
|
|
12
|
-
const containerStack = [output];
|
|
13
|
-
let currentContainer = output;
|
|
14
|
-
let currentDepth = 0;
|
|
15
|
-
let currentDefLevel = 0;
|
|
16
|
-
let currentRepLevel = 0;
|
|
17
|
-
if (repetitionLevels[0]) while (currentDepth < repetitionPath.length - 2 && currentRepLevel < repetitionLevels[0]) {
|
|
18
|
-
currentDepth++;
|
|
19
|
-
if (repetitionPath[currentDepth] !== "REQUIRED") {
|
|
20
|
-
currentContainer = currentContainer.at(-1);
|
|
21
|
-
containerStack.push(currentContainer);
|
|
22
|
-
currentDefLevel++;
|
|
23
|
-
}
|
|
24
|
-
if (repetitionPath[currentDepth] === "REPEATED") currentRepLevel++;
|
|
25
|
-
}
|
|
26
|
-
for (let i = 0; i < n; i++) {
|
|
27
|
-
const def = definitionLevels?.length ? definitionLevels[i] : maxDefinitionLevel;
|
|
28
|
-
const rep = repetitionLevels[i];
|
|
29
|
-
while (currentDepth && (rep < currentRepLevel || repetitionPath[currentDepth] !== "REPEATED")) {
|
|
30
|
-
if (repetitionPath[currentDepth] !== "REQUIRED") {
|
|
31
|
-
containerStack.pop();
|
|
32
|
-
currentDefLevel--;
|
|
33
|
-
}
|
|
34
|
-
if (repetitionPath[currentDepth] === "REPEATED") currentRepLevel--;
|
|
35
|
-
currentDepth--;
|
|
36
|
-
}
|
|
37
|
-
currentContainer = containerStack.at(-1);
|
|
38
|
-
while ((currentDepth < repetitionPath.length - 2 || repetitionPath[currentDepth + 1] === "REPEATED") && (currentDefLevel < def || repetitionPath[currentDepth + 1] === "REQUIRED")) {
|
|
39
|
-
currentDepth++;
|
|
40
|
-
if (repetitionPath[currentDepth] !== "REQUIRED") {
|
|
41
|
-
const newList = [];
|
|
42
|
-
currentContainer.push(newList);
|
|
43
|
-
currentContainer = newList;
|
|
44
|
-
containerStack.push(newList);
|
|
45
|
-
currentDefLevel++;
|
|
46
|
-
}
|
|
47
|
-
if (repetitionPath[currentDepth] === "REPEATED") currentRepLevel++;
|
|
48
|
-
}
|
|
49
|
-
if (def === maxDefinitionLevel) currentContainer.push(values[valueIndex++]);
|
|
50
|
-
else if (currentDepth === repetitionPath.length - 2) currentContainer.push(null);
|
|
51
|
-
else currentContainer.push([]);
|
|
52
|
-
}
|
|
53
|
-
if (!output.length) for (let i = 0; i < maxDefinitionLevel; i++) {
|
|
54
|
-
const newList = [];
|
|
55
|
-
currentContainer.push(newList);
|
|
56
|
-
currentContainer = newList;
|
|
57
|
-
}
|
|
58
|
-
return output;
|
|
59
|
-
}
|
|
60
|
-
function assembleNested(subcolumnData, schema, parsers, depth = 0) {
|
|
61
|
-
const path = schema.path.join(".");
|
|
62
|
-
const optional = schema.element.repetition_type === "OPTIONAL";
|
|
63
|
-
const nextDepth = optional ? depth + 1 : depth;
|
|
64
|
-
if (isListLike(schema)) {
|
|
65
|
-
let sublist = schema.children[0];
|
|
66
|
-
let subDepth = nextDepth;
|
|
67
|
-
if (sublist.children.length === 1) {
|
|
68
|
-
sublist = sublist.children[0];
|
|
69
|
-
subDepth++;
|
|
70
|
-
}
|
|
71
|
-
assembleNested(subcolumnData, sublist, parsers, subDepth);
|
|
72
|
-
const subcolumn = sublist.path.join(".");
|
|
73
|
-
const values = subcolumnData.get(subcolumn);
|
|
74
|
-
if (!values) throw new Error("parquet list column missing values");
|
|
75
|
-
if (optional) flattenAtDepth(values, depth);
|
|
76
|
-
subcolumnData.set(path, values);
|
|
77
|
-
subcolumnData.delete(subcolumn);
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (isMapLike(schema)) {
|
|
81
|
-
const mapName = schema.children[0].element.name;
|
|
82
|
-
assembleNested(subcolumnData, schema.children[0].children[0], parsers, nextDepth + 1);
|
|
83
|
-
assembleNested(subcolumnData, schema.children[0].children[1], parsers, nextDepth + 1);
|
|
84
|
-
const keys = subcolumnData.get(`${path}.${mapName}.key`);
|
|
85
|
-
const values = subcolumnData.get(`${path}.${mapName}.value`);
|
|
86
|
-
if (!keys) throw new Error("parquet map column missing keys");
|
|
87
|
-
if (!values) throw new Error("parquet map column missing values");
|
|
88
|
-
if (keys.length !== values.length) throw new Error("parquet map column key/value length mismatch");
|
|
89
|
-
const out = assembleMaps(keys, values, nextDepth);
|
|
90
|
-
if (optional) flattenAtDepth(out, depth);
|
|
91
|
-
subcolumnData.delete(`${path}.${mapName}.key`);
|
|
92
|
-
subcolumnData.delete(`${path}.${mapName}.value`);
|
|
93
|
-
subcolumnData.set(path, out);
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
if (schema.children.length) {
|
|
97
|
-
const invertDepth = schema.element.repetition_type === "REQUIRED" ? depth : depth + 1;
|
|
98
|
-
const struct = {};
|
|
99
|
-
for (const child of schema.children) {
|
|
100
|
-
assembleNested(subcolumnData, child, parsers, invertDepth);
|
|
101
|
-
const childData = subcolumnData.get(child.path.join("."));
|
|
102
|
-
if (!childData) throw new Error("parquet struct missing child data");
|
|
103
|
-
struct[child.element.name] = childData;
|
|
104
|
-
}
|
|
105
|
-
for (const child of schema.children) subcolumnData.delete(child.path.join("."));
|
|
106
|
-
let inverted = invertStruct(struct, invertDepth);
|
|
107
|
-
if (schema.element.logical_type?.type === "VARIANT") inverted = decodeVariantColumn(inverted, parsers);
|
|
108
|
-
if (optional) flattenAtDepth(inverted, depth);
|
|
109
|
-
subcolumnData.set(path, inverted);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
function flattenAtDepth(arr, depth) {
|
|
113
|
-
for (let i = 0; i < arr.length; i++) if (depth) flattenAtDepth(arr[i], depth - 1);
|
|
114
|
-
else arr[i] = arr[i][0];
|
|
115
|
-
}
|
|
116
|
-
function assembleMaps(keys, values, depth) {
|
|
117
|
-
const out = [];
|
|
118
|
-
for (let i = 0; i < keys.length; i++) if (depth) out.push(assembleMaps(keys[i], values[i], depth - 1));
|
|
119
|
-
else if (keys[i]) {
|
|
120
|
-
const obj = {};
|
|
121
|
-
for (let j = 0; j < keys[i].length; j++) {
|
|
122
|
-
const value = values[i][j];
|
|
123
|
-
obj[keys[i][j]] = value === void 0 ? null : value;
|
|
124
|
-
}
|
|
125
|
-
out.push(obj);
|
|
126
|
-
} else out.push(void 0);
|
|
127
|
-
return out;
|
|
128
|
-
}
|
|
129
|
-
function invertStruct(struct, depth) {
|
|
130
|
-
const keys = Object.keys(struct);
|
|
131
|
-
const length = struct[keys[0]]?.length;
|
|
132
|
-
const out = [];
|
|
133
|
-
for (let i = 0; i < length; i++) {
|
|
134
|
-
const obj = {};
|
|
135
|
-
for (const key of keys) {
|
|
136
|
-
if (struct[key].length !== length) throw new Error("parquet struct parsing error");
|
|
137
|
-
obj[key] = struct[key][i];
|
|
138
|
-
}
|
|
139
|
-
if (depth) out.push(invertStruct(obj, depth - 1));
|
|
140
|
-
else out.push(obj);
|
|
141
|
-
}
|
|
142
|
-
return out;
|
|
143
|
-
}
|
|
144
|
-
export { assembleLists, assembleNested };
|
|
1
|
+
import "./schema.mjs";
|
|
2
|
+
import "./variant.mjs";
|
|
3
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./thrift.mjs";
|
|
2
2
|
import { xxhash64 } from "./xxhash.mjs";
|
|
3
3
|
const textEncoder = new TextEncoder();
|
|
4
|
-
|
|
4
|
+
new Uint32Array([
|
|
5
5
|
1203114875,
|
|
6
6
|
1150766481,
|
|
7
7
|
2284105051,
|
|
@@ -11,38 +11,6 @@ const SALT = new Uint32Array([
|
|
|
11
11
|
2667333959,
|
|
12
12
|
1550580529
|
|
13
13
|
]);
|
|
14
|
-
function blockIndex(hash, numBlocks) {
|
|
15
|
-
return Number((hash >> 32n) * BigInt(numBlocks) >> 32n);
|
|
16
|
-
}
|
|
17
|
-
function blockMask(hash) {
|
|
18
|
-
const m = /* @__PURE__ */ new Uint32Array(8);
|
|
19
|
-
const low = Number(hash & 4294967295n) | 0;
|
|
20
|
-
for (let i = 0; i < 8; i++) m[i] = 1 << (Math.imul(low, SALT[i]) >>> 27);
|
|
21
|
-
return m;
|
|
22
|
-
}
|
|
23
|
-
function sbbfContains(blocks, hash) {
|
|
24
|
-
const offset = blockIndex(hash, blocks.length >> 3) << 3;
|
|
25
|
-
const m = blockMask(hash);
|
|
26
|
-
for (let i = 0; i < 8; i++) if ((blocks[offset + i] & m[i]) === 0) return false;
|
|
27
|
-
return true;
|
|
28
|
-
}
|
|
29
|
-
function readBloomFilter(reader) {
|
|
30
|
-
const header = deserializeTCompactProtocol(reader);
|
|
31
|
-
const numBytes = header.field_1;
|
|
32
|
-
if (typeof numBytes !== "number" || numBytes <= 0 || numBytes % 32 !== 0) return void 0;
|
|
33
|
-
if (!header.field_2?.field_1) return void 0;
|
|
34
|
-
if (!header.field_3?.field_1) return void 0;
|
|
35
|
-
if (!header.field_4?.field_1) return void 0;
|
|
36
|
-
const { view, offset } = reader;
|
|
37
|
-
if (offset + numBytes > view.byteLength) throw new Error(`parquet bloom filter truncated: need ${numBytes} bytes, have ${view.byteLength - offset}`);
|
|
38
|
-
const blocks = new Uint32Array(numBytes >> 2);
|
|
39
|
-
for (let i = 0; i < blocks.length; i++) blocks[i] = view.getUint32(offset + i * 4, true);
|
|
40
|
-
reader.offset = offset + numBytes;
|
|
41
|
-
return {
|
|
42
|
-
numBytes,
|
|
43
|
-
blocks
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
14
|
function hashParquetValue(value, element) {
|
|
47
15
|
if (value === null || value === void 0) return void 0;
|
|
48
16
|
const { type, converted_type, logical_type } = element;
|
|
@@ -98,27 +66,4 @@ function hashParquetValue(value, element) {
|
|
|
98
66
|
return;
|
|
99
67
|
}
|
|
100
68
|
}
|
|
101
|
-
|
|
102
|
-
const out = /* @__PURE__ */ new Set();
|
|
103
|
-
walkBloomEligible(filter, out);
|
|
104
|
-
return out;
|
|
105
|
-
}
|
|
106
|
-
function walkBloomEligible(filter, out) {
|
|
107
|
-
if (!filter) return;
|
|
108
|
-
if ("$and" in filter && Array.isArray(filter.$and)) {
|
|
109
|
-
for (const sub of filter.$and) walkBloomEligible(sub, out);
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
if ("$or" in filter && Array.isArray(filter.$or)) {
|
|
113
|
-
for (const sub of filter.$or) walkBloomEligible(sub, out);
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
if ("$nor" in filter) return;
|
|
117
|
-
for (const [field, condition] of Object.entries(filter)) {
|
|
118
|
-
if (field.startsWith("$")) continue;
|
|
119
|
-
if (typeof condition === "object" && condition !== null && !Array.isArray(condition)) {
|
|
120
|
-
if ("$eq" in condition || "$in" in condition) out.add(field);
|
|
121
|
-
} else out.add(field);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
export { bloomEligibleColumns, hashParquetValue, readBloomFilter, sbbfContains };
|
|
69
|
+
export { hashParquetValue };
|