@gscdump/engine 1.4.0 → 1.4.2
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/dist/adapters/duckdb-node.d.mts +7 -0
- package/dist/adapters/duckdb-node.mjs +94 -0
- package/dist/adapters/filesystem.d.mts +1 -1
- package/dist/adapters/filesystem.mjs +1 -1
- package/dist/adapters/hyparquet.d.mts +4 -3
- package/dist/adapters/hyparquet.mjs +7 -3
- package/dist/adapters/node-harness.d.mts +38 -0
- package/dist/adapters/node-harness.mjs +47 -0
- package/dist/adapters/node.d.mts +4 -100
- package/dist/adapters/node.mjs +4 -240
- package/dist/adapters/parquet-attach.d.mts +23 -0
- package/dist/adapters/parquet-attach.mjs +21 -0
- package/dist/adapters/r2-manifest.d.mts +82 -0
- package/dist/adapters/r2-manifest.mjs +364 -0
- package/dist/adapters/r2.d.mts +1 -1
- package/dist/adapters/read-optional.mjs +15 -0
- package/dist/adapters/snapshot-attach.d.mts +38 -0
- package/dist/adapters/snapshot-attach.mjs +85 -0
- package/dist/analysis-types.d.mts +56 -1
- package/dist/analyzer/define.d.mts +48 -0
- package/dist/analyzer/define.mjs +60 -0
- package/dist/analyzer/dispatch.d.mts +17 -0
- package/dist/analyzer/index.d.mts +4 -14
- package/dist/analyzer/index.mjs +4 -112
- package/dist/analyzer/registry.d.mts +33 -0
- package/dist/analyzer/registry.mjs +49 -0
- package/dist/analyzer/types.d.mts +95 -0
- package/dist/analyzer/types.mjs +5 -0
- package/dist/coerce.d.mts +4 -0
- package/dist/compaction.d.mts +14 -0
- package/dist/{_chunks/parquet-plan.mjs → compaction.mjs} +2 -138
- package/dist/contracts.d.mts +1 -2
- package/dist/{_chunks/schema.d.mts → drizzle-schema.d.mts} +152 -184
- package/dist/{_chunks/schema.mjs → drizzle-schema.mjs} +6 -78
- package/dist/{_chunks/snapshot.d.mts → duckdb.d.mts} +1 -14
- package/dist/duckdb.mjs +207 -0
- package/dist/engine.d.mts +4 -0
- package/dist/engine.mjs +385 -0
- package/dist/entities.d.mts +3 -52
- package/dist/entities.mjs +867 -2
- package/dist/errors.d.mts +114 -1
- package/dist/gc.mjs +92 -0
- package/dist/iceberg/append-sink.d.mts +14 -0
- package/dist/iceberg/append-sink.mjs +142 -0
- package/dist/iceberg/catalog.d.mts +71 -0
- package/dist/iceberg/catalog.mjs +109 -0
- package/dist/iceberg/index.d.mts +4 -13
- package/dist/iceberg/index.mjs +3 -244
- package/dist/iceberg/overwrite-writer.d.mts +161 -0
- package/dist/iceberg/overwrite-writer.mjs +102 -0
- package/dist/iceberg/pyiceberg-runtime.mjs +34 -0
- package/dist/iceberg/schema.d.mts +69 -0
- package/dist/{_chunks/schema2.mjs → iceberg/schema.mjs} +3 -2
- package/dist/index.d.mts +14 -190
- package/dist/index.mjs +10 -645
- package/dist/ingest-accumulator.d.mts +1 -1
- package/dist/ingest.d.mts +1 -1
- package/dist/layout.d.mts +31 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.bitreader.mjs +88 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.blocks.mjs +120 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.context.mjs +1805 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.contextmap.mjs +49 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.dictionary.mjs +984 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.huffman.mjs +266 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.mjs +340 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.prefix.mjs +109 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.streams.mjs +21 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.transform.mjs +190 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/compressors.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/gzip.huffman.mjs +121 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/gzip.mjs +176 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/index.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/lz4.mjs +52 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/bloom.mjs +93 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/bytewriter.mjs +91 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/column.mjs +186 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/datapage.mjs +113 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/delta.mjs +111 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/dictionary.mjs +99 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/dremel.mjs +116 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/encoding.mjs +51 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/geospatial.mjs +84 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/index.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/indexes.mjs +31 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/metadata.mjs +138 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/node.mjs +8 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/parquet-writer.mjs +139 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/plain.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/schema.mjs +254 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/snappy.mjs +125 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/splitstream.mjs +38 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/thrift.mjs +79 -0
- package/dist/{_chunks/libs/hyparquet-writer.d.mts → node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/types.d.mts} +2 -2
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/unconvert.mjs +247 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/variant.mjs +321 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/wkb.mjs +79 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/write-rows.mjs +122 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/write.mjs +5 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/bytewriter.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/index.d.mts +10 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/node.d.mts +3 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/parquet-writer.d.mts +2 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/schema.d.mts +2 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/wkb.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/write-rows.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/write.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/assemble.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/bloom.mjs +69 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/column.mjs +8 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/constants.mjs +80 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/convert.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/datapage.mjs +6 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/delta.mjs +2 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/encoding.mjs +2 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/filter.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/geoparquet.mjs +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/index.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/indexes.mjs +5 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/metadata.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/node.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/plain.mjs +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/plan.mjs +5 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/query.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/read.mjs +6 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/rowgroup.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/schema.mjs +54 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/snappy.mjs +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/thrift.mjs +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/types.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/utils.mjs +19 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/variant.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/wkb.mjs +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/xxhash.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/index.d.mts +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/indexes.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/metadata.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/node.d.mts +2 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/query.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/read.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/snappy.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/utils.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/assemble.mjs +144 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/bloom.mjs +124 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/column.mjs +127 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/constants.mjs +75 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/convert.mjs +118 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/datapage.mjs +144 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/delta.mjs +65 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/encoding.mjs +76 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/filter.mjs +98 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/geoparquet.mjs +24 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/index.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/indexes.mjs +16 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/metadata.mjs +235 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/node.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/plain.mjs +78 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/plan.mjs +147 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/query.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/read.mjs +106 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/rowgroup.mjs +154 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/schema.mjs +75 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/snappy.mjs +70 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/thrift.mjs +86 -0
- package/dist/{_chunks/libs/hyparquet.d.mts → node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/types.d.mts} +6 -8
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/utils.mjs +31 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/variant.mjs +225 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/wkb.mjs +94 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/xxhash.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/index.d.mts +10 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/indexes.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/metadata.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/node.d.mts +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/query.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/read.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/snappy.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/utils.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/avro/avro.metadata.mjs +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/avro/avro.read.mjs +4 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/avro/avro.write.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/catalog/file.mjs +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/catalog/loadTable.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/catalog/rest.mjs +73 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/create.mjs +67 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/delete.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/fetch.mjs +8 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/index.mjs +13 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/json.mjs +147 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/manifest.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/metadata.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/prune.mjs +4 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/puffin/deletion-vector.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/puffin/puffin.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/puffin/roaring.mjs +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/read.mjs +9 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/s3.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/schema.mjs +76 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sigv4.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sql/icebergDataSource.mjs +8 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sql/icebergQuery.mjs +5 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sql/whereFilter.mjs +1 -0
- package/dist/{_chunks/libs/icebird.d.mts → node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/types.d.mts} +5 -33
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/utils.mjs +8 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/commit.mjs +5 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/conversions.mjs +19 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/delete-file.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/geospatial.mjs +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/manifest-list.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/manifest.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/parquet.mjs +5 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/partition.mjs +75 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/rewrite.mjs +10 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/serde.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/snapshot.mjs +5 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/sort.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stage-deletion-vector.mjs +11 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stage-position-delete.mjs +8 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stage.mjs +10 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stats.mjs +4 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/transform.mjs +60 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/write.mjs +45 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/catalog/file.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/catalog/rest.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/create.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/fetch.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/index.d.mts +13 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/manifest.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/metadata.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/read.d.mts +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/s3.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/sql/icebergDataSource.d.mts +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/sql/icebergQuery.d.mts +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/write/write.d.mts +32 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/ast.d.mts +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/backend/dataSource.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/accumulator.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/aggregates.mjs +10 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/execute.mjs +15 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/join.mjs +5 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/scanColumn.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/sort.mjs +5 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/streamingAggregate.mjs +9 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/utils.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/window.mjs +5 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/yield.mjs +17 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/alias.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/binary.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/date.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/evaluate.mjs +15 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/math.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/regexp.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/strings.mjs +3 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/index.d.mts +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/index.mjs +9 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/expression.mjs +6 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/extractTables.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/functions.mjs +5 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/joins.mjs +7 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/parse.mjs +10 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/primary.mjs +8 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/state.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/tokenize.mjs +3 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/types.d.mts +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/plan/columns.mjs +3 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/plan/plan.mjs +7 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/plan/types.d.mts +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/bbox.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/equality.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/operations.mjs +5 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/pointRelations.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/primitives.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/segments.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/spatial.mjs +6 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/wkt.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/types.d.mts +3 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/aggregates.mjs +3 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/executionErrors.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/functions.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/keywords.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/parseErrors.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/tables.mjs +2 -0
- package/dist/parquet-plan.d.mts +15 -0
- package/dist/parquet-plan.mjs +139 -0
- package/dist/parquet-pushdown.mjs +58 -0
- package/dist/period/index.d.mts +52 -1
- package/dist/planner.d.mts +2 -14
- package/dist/planner.mjs +2 -1
- package/dist/profile.d.mts +21 -0
- package/dist/profile.mjs +27 -0
- package/dist/query-dim.d.mts +54 -0
- package/dist/query-dim.mjs +91 -0
- package/dist/report/define.d.mts +8 -0
- package/dist/report/define.mjs +15 -0
- package/dist/report/hash.d.mts +13 -0
- package/dist/report/hash.mjs +29 -0
- package/dist/report/index.d.mts +4 -170
- package/dist/report/index.mjs +3 -55
- package/dist/report/registry.d.mts +18 -0
- package/dist/report/registry.mjs +14 -0
- package/dist/report/types.d.mts +139 -0
- package/dist/resolver/adapter.d.mts +13 -0
- package/dist/resolver/adapter.mjs +27 -0
- package/dist/resolver/canonical-source.d.mts +5 -0
- package/dist/resolver/canonical-source.mjs +14 -0
- package/dist/resolver/compile.d.mts +15 -0
- package/dist/resolver/compile.mjs +396 -0
- package/dist/resolver/datasets.d.mts +16 -0
- package/dist/resolver/datasets.mjs +159 -0
- package/dist/resolver/extras-overlay.d.mts +37 -0
- package/dist/resolver/extras-overlay.mjs +17 -0
- package/dist/resolver/filter-utils.d.mts +10 -0
- package/dist/resolver/filter-utils.mjs +59 -0
- package/dist/resolver/fragments.d.mts +60 -0
- package/dist/resolver/fragments.mjs +206 -0
- package/dist/resolver/index.d.mts +11 -371
- package/dist/resolver/index.mjs +10 -1
- package/dist/resolver/pg-adapter.d.mts +56 -0
- package/dist/resolver/pg-adapter.mjs +112 -0
- package/dist/resolver/run-query.d.mts +172 -0
- package/dist/resolver/run-query.mjs +241 -0
- package/dist/resolver/schema-drift.d.mts +15 -0
- package/dist/resolver/schema-drift.mjs +12 -0
- package/dist/rollups.d.mts +4 -4
- package/dist/rollups.mjs +3 -2
- package/dist/schedule.mjs +100 -0
- package/dist/schema.d.mts +34 -1
- package/dist/schema.mjs +78 -1
- package/dist/sink-node.d.mts +1 -159
- package/dist/sink-node.mjs +1 -133
- package/dist/sink.d.mts +125 -0
- package/dist/sinks/in-memory-sink.d.mts +25 -0
- package/dist/sinks/in-memory-sink.mjs +61 -0
- package/dist/sinks/index.d.mts +2 -0
- package/dist/sinks/index.mjs +2 -0
- package/dist/snapshot.d.mts +14 -0
- package/dist/source/attached-table.d.mts +45 -0
- package/dist/source/attached-table.mjs +55 -0
- package/dist/source/create-sql-query-source.d.mts +24 -0
- package/dist/source/create-sql-query-source.mjs +28 -0
- package/dist/source/index.d.mts +6 -66
- package/dist/source/index.mjs +9 -82
- package/dist/source/source-types.d.mts +49 -0
- package/dist/{_chunks/storage.d.mts → storage.d.mts} +4 -14
- package/dist/sync-config.d.mts +36 -0
- package/dist/sync-config.mjs +98 -0
- package/dist/vendor/hysnappy-purejs.mjs +12 -1
- package/package.json +9 -4
- package/dist/_chunks/analysis-types.d.mts +0 -57
- package/dist/_chunks/contracts.d.mts +0 -1
- package/dist/_chunks/engine.mjs +0 -731
- package/dist/_chunks/entities.mjs +0 -967
- package/dist/_chunks/errors.d.mts +0 -115
- package/dist/_chunks/index.d.mts +0 -53
- package/dist/_chunks/libs/hyparquet-compressors.mjs +0 -2796
- package/dist/_chunks/libs/hyparquet-writer.mjs +0 -2524
- package/dist/_chunks/libs/hyparquet.mjs +0 -2596
- package/dist/_chunks/libs/icebird.mjs +0 -564
- package/dist/_chunks/registry.d.mts +0 -213
- package/dist/_chunks/resolver.mjs +0 -1220
- package/dist/_chunks/sink.d.mts +0 -257
- /package/dist/{_chunks → analyzer}/dispatch.mjs +0 -0
- /package/dist/{_chunks/coerce.mjs → coerce.mjs} +0 -0
- /package/dist/{_chunks/layout.mjs → layout.mjs} +0 -0
- /package/dist/{_chunks/manifest-store-utils.mjs → manifest-store-utils.mjs} +0 -0
- /package/dist/{_chunks/libs/fzstd.mjs → node_modules/.pnpm/fzstd@0.1.1/node_modules/fzstd/esm/index.mjs} +0 -0
- /package/dist/{_chunks → resolver}/types.d.mts +0 -0
- /package/dist/{_chunks/schedule.d.mts → schedule.d.mts} +0 -0
package/dist/engine.mjs
ADDED
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import { dayPartition, hourPartition, inferSearchType, objectKey, tenantPrefix } from "./layout.mjs";
|
|
2
|
+
import { SCHEMAS, currentSchemaVersion, dedupeByNaturalKey } from "./schema.mjs";
|
|
3
|
+
import { compactTieredImpl, dedupeOverlappingTiers, splitOverlappingTiers } from "./compaction.mjs";
|
|
4
|
+
import { compileLogicalQueryPlan } from "./parquet-plan.mjs";
|
|
5
|
+
import { gcOrphansImpl } from "./gc.mjs";
|
|
6
|
+
import { extractParquetPushdown } from "./parquet-pushdown.mjs";
|
|
7
|
+
import { buildLogicalPlan } from "gscdump/query/plan";
|
|
8
|
+
import { normalizeUrl } from "gscdump/normalize";
|
|
9
|
+
const URL_PURGE_TABLES = ["pages", "page_queries"];
|
|
10
|
+
const MAX_DAY_BYTES = 100 * 1024 * 1024;
|
|
11
|
+
const URL_COLUMNS = /* @__PURE__ */ new Set();
|
|
12
|
+
for (const t of Object.keys(SCHEMAS)) for (const col of SCHEMAS[t].columns) if (col.name === "url") URL_COLUMNS.add(`${t}:url`);
|
|
13
|
+
function normalizeRow(table, row) {
|
|
14
|
+
if (!URL_COLUMNS.has(`${table}:url`)) return row;
|
|
15
|
+
const url = row.url;
|
|
16
|
+
if (typeof url !== "string") return row;
|
|
17
|
+
const normalized = normalizeUrl(url);
|
|
18
|
+
if (normalized === url) return row;
|
|
19
|
+
return {
|
|
20
|
+
...row,
|
|
21
|
+
url: normalized
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
const DAILY_PARTITION_RE = /^daily\/(\d{4}-\d{2}-\d{2})$/;
|
|
25
|
+
function queryRangeOf(partitions) {
|
|
26
|
+
if (!partitions) return void 0;
|
|
27
|
+
let min;
|
|
28
|
+
let max;
|
|
29
|
+
for (const p of partitions) {
|
|
30
|
+
const m = DAILY_PARTITION_RE.exec(p);
|
|
31
|
+
if (!m) continue;
|
|
32
|
+
const d = m[1];
|
|
33
|
+
if (min === void 0 || d < min) min = d;
|
|
34
|
+
if (max === void 0 || d > max) max = d;
|
|
35
|
+
}
|
|
36
|
+
return min !== void 0 ? {
|
|
37
|
+
start: min,
|
|
38
|
+
end: max
|
|
39
|
+
} : void 0;
|
|
40
|
+
}
|
|
41
|
+
function createStorageEngine(opts) {
|
|
42
|
+
const { dataSource, manifestStore, codec, executor } = opts;
|
|
43
|
+
const defaultNow = opts.now ?? (() => Date.now());
|
|
44
|
+
async function writeDay(ctx, rows) {
|
|
45
|
+
if (!ctx.date) throw new Error("writeDay requires ctx.date");
|
|
46
|
+
const date = ctx.date;
|
|
47
|
+
const now = (ctx.now ?? defaultNow)();
|
|
48
|
+
const partition = dayPartition(date);
|
|
49
|
+
const searchType = ctx.searchType;
|
|
50
|
+
return manifestStore.withLock({
|
|
51
|
+
userId: ctx.userId,
|
|
52
|
+
siteId: ctx.siteId,
|
|
53
|
+
table: ctx.table,
|
|
54
|
+
partition
|
|
55
|
+
}, async () => {
|
|
56
|
+
const superseding = await manifestStore.listLive({
|
|
57
|
+
userId: ctx.userId,
|
|
58
|
+
siteId: ctx.siteId,
|
|
59
|
+
table: ctx.table,
|
|
60
|
+
partitions: [partition],
|
|
61
|
+
searchType: inferSearchType({ searchType })
|
|
62
|
+
});
|
|
63
|
+
const normalizedRows = dedupeByNaturalKey(ctx.table, rows.map((r) => normalizeRow(ctx.table, r)));
|
|
64
|
+
const key = objectKey(ctx, ctx.table, partition, now, searchType);
|
|
65
|
+
const { bytes: writtenBytes, rowCount } = await codec.writeRows({ table: ctx.table }, normalizedRows, key, dataSource);
|
|
66
|
+
let bytes = writtenBytes;
|
|
67
|
+
if (bytes === 0 && rowCount > 0 && dataSource.head) {
|
|
68
|
+
const probed = await dataSource.head(key);
|
|
69
|
+
if (probed) bytes = probed.bytes;
|
|
70
|
+
}
|
|
71
|
+
if (bytes > 104857600) {
|
|
72
|
+
const sizeError = /* @__PURE__ */ new Error(`writeDay payload ${bytes} bytes exceeds ${MAX_DAY_BYTES} hard ceiling (table=${ctx.table}, key=${key})`);
|
|
73
|
+
try {
|
|
74
|
+
await dataSource.delete([key]);
|
|
75
|
+
} catch (deleteError) {
|
|
76
|
+
throw new AggregateError([sizeError, deleteError], `${sizeError.message}; failed to delete oversized object`);
|
|
77
|
+
}
|
|
78
|
+
throw sizeError;
|
|
79
|
+
}
|
|
80
|
+
const entry = {
|
|
81
|
+
userId: ctx.userId,
|
|
82
|
+
siteId: ctx.siteId,
|
|
83
|
+
table: ctx.table,
|
|
84
|
+
partition,
|
|
85
|
+
objectKey: key,
|
|
86
|
+
rowCount,
|
|
87
|
+
bytes,
|
|
88
|
+
createdAt: now,
|
|
89
|
+
schemaVersion: currentSchemaVersion(ctx.table),
|
|
90
|
+
tier: "raw",
|
|
91
|
+
...searchType !== void 0 ? { searchType } : {}
|
|
92
|
+
};
|
|
93
|
+
await manifestStore.registerVersion(entry, superseding);
|
|
94
|
+
await manifestStore.bumpWatermark({
|
|
95
|
+
userId: ctx.userId,
|
|
96
|
+
siteId: ctx.siteId,
|
|
97
|
+
table: ctx.table,
|
|
98
|
+
...searchType !== void 0 ? { searchType } : {}
|
|
99
|
+
}, date, now);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
async function writeHour(ctx, rows) {
|
|
103
|
+
if (!ctx.date) throw new Error("writeHour requires ctx.date (the PT calendar day)");
|
|
104
|
+
const date = ctx.date;
|
|
105
|
+
const now = (ctx.now ?? defaultNow)();
|
|
106
|
+
const partition = hourPartition(date);
|
|
107
|
+
const searchType = ctx.searchType;
|
|
108
|
+
return manifestStore.withLock({
|
|
109
|
+
userId: ctx.userId,
|
|
110
|
+
siteId: ctx.siteId,
|
|
111
|
+
table: ctx.table,
|
|
112
|
+
partition
|
|
113
|
+
}, async () => {
|
|
114
|
+
const live = await manifestStore.listLive({
|
|
115
|
+
userId: ctx.userId,
|
|
116
|
+
siteId: ctx.siteId,
|
|
117
|
+
table: ctx.table,
|
|
118
|
+
partitions: [partition],
|
|
119
|
+
searchType: inferSearchType({ searchType })
|
|
120
|
+
});
|
|
121
|
+
const existing = [];
|
|
122
|
+
for (const entry of live) {
|
|
123
|
+
const rs = await codec.readRows({ table: ctx.table }, entry.objectKey, dataSource);
|
|
124
|
+
existing.push(...rs);
|
|
125
|
+
}
|
|
126
|
+
const dedup = /* @__PURE__ */ new Map();
|
|
127
|
+
for (const r of existing) {
|
|
128
|
+
const k = `${String(r.url ?? "")}\0${String(r.hour ?? "")}`;
|
|
129
|
+
dedup.set(k, r);
|
|
130
|
+
}
|
|
131
|
+
for (const r of rows) {
|
|
132
|
+
const normalized = normalizeRow(ctx.table, r);
|
|
133
|
+
const k = `${String(normalized.url ?? "")}\0${String(normalized.hour ?? "")}`;
|
|
134
|
+
dedup.set(k, normalized);
|
|
135
|
+
}
|
|
136
|
+
const merged = [...dedup.values()];
|
|
137
|
+
const key = objectKey(ctx, ctx.table, partition, now, searchType);
|
|
138
|
+
const { bytes: writtenBytes, rowCount } = await codec.writeRows({ table: ctx.table }, merged, key, dataSource);
|
|
139
|
+
let bytes = writtenBytes;
|
|
140
|
+
if (bytes === 0 && rowCount > 0 && dataSource.head) {
|
|
141
|
+
const probed = await dataSource.head(key);
|
|
142
|
+
if (probed) bytes = probed.bytes;
|
|
143
|
+
}
|
|
144
|
+
if (bytes > 104857600) {
|
|
145
|
+
const sizeError = /* @__PURE__ */ new Error(`writeHour payload ${bytes} bytes exceeds ${MAX_DAY_BYTES} hard ceiling (table=${ctx.table}, key=${key})`);
|
|
146
|
+
try {
|
|
147
|
+
await dataSource.delete([key]);
|
|
148
|
+
} catch (deleteError) {
|
|
149
|
+
throw new AggregateError([sizeError, deleteError], `${sizeError.message}; failed to delete oversized object`);
|
|
150
|
+
}
|
|
151
|
+
throw sizeError;
|
|
152
|
+
}
|
|
153
|
+
const entry = {
|
|
154
|
+
userId: ctx.userId,
|
|
155
|
+
siteId: ctx.siteId,
|
|
156
|
+
table: ctx.table,
|
|
157
|
+
partition,
|
|
158
|
+
objectKey: key,
|
|
159
|
+
rowCount,
|
|
160
|
+
bytes,
|
|
161
|
+
createdAt: now,
|
|
162
|
+
schemaVersion: currentSchemaVersion(ctx.table),
|
|
163
|
+
tier: "raw",
|
|
164
|
+
...searchType !== void 0 ? { searchType } : {}
|
|
165
|
+
};
|
|
166
|
+
await manifestStore.registerVersion(entry, live);
|
|
167
|
+
await manifestStore.bumpWatermark({
|
|
168
|
+
userId: ctx.userId,
|
|
169
|
+
siteId: ctx.siteId,
|
|
170
|
+
table: ctx.table,
|
|
171
|
+
...searchType !== void 0 ? { searchType } : {}
|
|
172
|
+
}, date, now);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
async function runSQL(opts) {
|
|
176
|
+
opts.signal?.throwIfAborted();
|
|
177
|
+
const profiler = opts.profiler;
|
|
178
|
+
const entries = Object.entries(opts.fileSets);
|
|
179
|
+
const endList = profiler?.start("manifest.list", { fileSets: entries.length });
|
|
180
|
+
const perSet = await Promise.all(entries.map(async ([name, ref]) => {
|
|
181
|
+
if (ref.keys !== void 0) return [name, ref.keys];
|
|
182
|
+
return [name, dedupeOverlappingTiers(await manifestStore.listLive({
|
|
183
|
+
userId: opts.ctx.userId,
|
|
184
|
+
siteId: opts.ctx.siteId,
|
|
185
|
+
table: ref.table,
|
|
186
|
+
partitions: ref.partitions,
|
|
187
|
+
...opts.searchType !== void 0 ? { searchType: opts.searchType } : {}
|
|
188
|
+
}), queryRangeOf(ref.partitions)).map((e) => e.objectKey)];
|
|
189
|
+
}));
|
|
190
|
+
opts.signal?.throwIfAborted();
|
|
191
|
+
const fileKeys = {};
|
|
192
|
+
for (const [name, keys] of perSet) fileKeys[name] = keys;
|
|
193
|
+
const uniqueKeys = [...new Set(perSet.flatMap(([, keys]) => keys))];
|
|
194
|
+
endList?.({ files: uniqueKeys.length });
|
|
195
|
+
let table = opts.table;
|
|
196
|
+
if (!table) {
|
|
197
|
+
if (new Set(entries.map(([, ref]) => ref.table)).size > 1) throw new Error("runSQL requires explicit ctx.table when fileSets reference multiple tables.");
|
|
198
|
+
table = entries[0]?.[1].table;
|
|
199
|
+
}
|
|
200
|
+
if (!table) throw new Error("runSQL requires at least one fileSet or an explicit table");
|
|
201
|
+
const placeholderTables = {};
|
|
202
|
+
for (const [name, ref] of entries) placeholderTables[name] = ref.table;
|
|
203
|
+
const endExec = profiler?.start("executor.execute", { files: uniqueKeys.length });
|
|
204
|
+
const result = await executor.execute({
|
|
205
|
+
sql: opts.sql,
|
|
206
|
+
params: opts.params ?? [],
|
|
207
|
+
fileKeys,
|
|
208
|
+
placeholderTables,
|
|
209
|
+
dataSource,
|
|
210
|
+
table,
|
|
211
|
+
signal: opts.signal,
|
|
212
|
+
...opts.pushdownFilters ? { pushdownFilters: opts.pushdownFilters } : {},
|
|
213
|
+
...profiler ? { profiler } : {}
|
|
214
|
+
});
|
|
215
|
+
endExec?.({ rows: result.rows.length });
|
|
216
|
+
return {
|
|
217
|
+
rows: result.rows,
|
|
218
|
+
sql: result.sql,
|
|
219
|
+
objectKeys: uniqueKeys
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
async function query(ctx, state) {
|
|
223
|
+
const plan = buildLogicalPlan(state, { regex: true });
|
|
224
|
+
const table = ctx.table ?? plan.dataset;
|
|
225
|
+
const resolved = compileLogicalQueryPlan(plan, table);
|
|
226
|
+
const pushdown = extractParquetPushdown(state, table);
|
|
227
|
+
return runSQL({
|
|
228
|
+
ctx: {
|
|
229
|
+
userId: ctx.userId,
|
|
230
|
+
siteId: ctx.siteId
|
|
231
|
+
},
|
|
232
|
+
table,
|
|
233
|
+
fileSets: { FILES: {
|
|
234
|
+
table,
|
|
235
|
+
partitions: resolved.partitions
|
|
236
|
+
} },
|
|
237
|
+
sql: resolved.sql,
|
|
238
|
+
params: resolved.params,
|
|
239
|
+
signal: ctx.signal,
|
|
240
|
+
...pushdown ? { pushdownFilters: { FILES: pushdown } } : {},
|
|
241
|
+
...ctx.searchType !== void 0 ? { searchType: ctx.searchType } : {},
|
|
242
|
+
...ctx.profiler ? { profiler: ctx.profiler } : {}
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
async function compactTiered(ctx, thresholds) {
|
|
246
|
+
return compactTieredImpl({
|
|
247
|
+
dataSource,
|
|
248
|
+
manifestStore,
|
|
249
|
+
codec
|
|
250
|
+
}, ctx, (ctx.now ?? defaultNow)(), thresholds);
|
|
251
|
+
}
|
|
252
|
+
async function reconcileSubsumed(ctx) {
|
|
253
|
+
const { subsumed } = splitOverlappingTiers(await manifestStore.listLive({
|
|
254
|
+
userId: ctx.userId,
|
|
255
|
+
siteId: ctx.siteId,
|
|
256
|
+
table: ctx.table
|
|
257
|
+
}));
|
|
258
|
+
if (subsumed.length === 0) return {
|
|
259
|
+
retired: 0,
|
|
260
|
+
partitions: []
|
|
261
|
+
};
|
|
262
|
+
await manifestStore.registerVersions([], subsumed);
|
|
263
|
+
return {
|
|
264
|
+
retired: subsumed.length,
|
|
265
|
+
partitions: subsumed.map((e) => e.partition)
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
async function gcOrphans(ctx, graceMs) {
|
|
269
|
+
return gcOrphansImpl({
|
|
270
|
+
dataSource,
|
|
271
|
+
manifestStore
|
|
272
|
+
}, (ctx.now ?? defaultNow)(), graceMs, {
|
|
273
|
+
userId: ctx.userId,
|
|
274
|
+
siteId: ctx.siteId,
|
|
275
|
+
...ctx.hourlyRetentionMs !== void 0 ? { hourlyRetentionMs: ctx.hourlyRetentionMs } : {}
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
async function purgeTenant(ctx) {
|
|
279
|
+
const prefix = tenantPrefix(ctx);
|
|
280
|
+
const keys = [];
|
|
281
|
+
const keyStream = dataSource.streamList ? dataSource.streamList(prefix) : async function* () {
|
|
282
|
+
for (const k of await dataSource.list(prefix)) yield k;
|
|
283
|
+
}();
|
|
284
|
+
for await (const key of keyStream) keys.push(key);
|
|
285
|
+
const manifestResult = await manifestStore.purgeTenant({
|
|
286
|
+
userId: ctx.userId,
|
|
287
|
+
siteId: ctx.siteId
|
|
288
|
+
});
|
|
289
|
+
if (keys.length > 0) await dataSource.delete(keys);
|
|
290
|
+
return {
|
|
291
|
+
userId: ctx.userId,
|
|
292
|
+
siteId: ctx.siteId,
|
|
293
|
+
prefix,
|
|
294
|
+
objectsDeleted: keys.length,
|
|
295
|
+
entriesRemoved: manifestResult.entriesRemoved,
|
|
296
|
+
watermarksRemoved: manifestResult.watermarksRemoved,
|
|
297
|
+
syncStatesRemoved: manifestResult.syncStatesRemoved,
|
|
298
|
+
at: defaultNow()
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
async function purgeUrls(ctx, urls) {
|
|
302
|
+
const now = defaultNow();
|
|
303
|
+
const urlSet = new Set(urls);
|
|
304
|
+
let entriesRewritten = 0;
|
|
305
|
+
let rowsRemoved = 0;
|
|
306
|
+
let bytesAfter = 0;
|
|
307
|
+
if (urlSet.size === 0) return {
|
|
308
|
+
userId: ctx.userId,
|
|
309
|
+
siteId: ctx.siteId,
|
|
310
|
+
urlsRequested: 0,
|
|
311
|
+
entriesRewritten: 0,
|
|
312
|
+
rowsRemoved: 0,
|
|
313
|
+
bytesAfter: 0,
|
|
314
|
+
at: now
|
|
315
|
+
};
|
|
316
|
+
for (const table of URL_PURGE_TABLES) {
|
|
317
|
+
const entries = await manifestStore.listLive({
|
|
318
|
+
userId: ctx.userId,
|
|
319
|
+
siteId: ctx.siteId,
|
|
320
|
+
table
|
|
321
|
+
});
|
|
322
|
+
for (const entry of entries) await manifestStore.withLock({
|
|
323
|
+
userId: entry.userId,
|
|
324
|
+
siteId: entry.siteId,
|
|
325
|
+
table,
|
|
326
|
+
partition: entry.partition
|
|
327
|
+
}, async () => {
|
|
328
|
+
const rows = await codec.readRows({ table }, entry.objectKey, dataSource);
|
|
329
|
+
const kept = rows.filter((r) => typeof r.url !== "string" || !urlSet.has(r.url));
|
|
330
|
+
const removed = rows.length - kept.length;
|
|
331
|
+
if (removed === 0) return;
|
|
332
|
+
const searchType = entry.searchType;
|
|
333
|
+
const newKey = objectKey({
|
|
334
|
+
userId: entry.userId,
|
|
335
|
+
siteId: entry.siteId
|
|
336
|
+
}, table, entry.partition, now, searchType);
|
|
337
|
+
const { bytes, rowCount } = await codec.writeRows({ table }, kept, newKey, dataSource);
|
|
338
|
+
const newEntry = {
|
|
339
|
+
userId: entry.userId,
|
|
340
|
+
siteId: entry.siteId,
|
|
341
|
+
table,
|
|
342
|
+
partition: entry.partition,
|
|
343
|
+
objectKey: newKey,
|
|
344
|
+
rowCount,
|
|
345
|
+
bytes,
|
|
346
|
+
createdAt: now,
|
|
347
|
+
schemaVersion: entry.schemaVersion ?? currentSchemaVersion(table),
|
|
348
|
+
...entry.tier !== void 0 ? { tier: entry.tier } : {},
|
|
349
|
+
...searchType !== void 0 ? { searchType } : {}
|
|
350
|
+
};
|
|
351
|
+
await manifestStore.registerVersion(newEntry, [entry]);
|
|
352
|
+
entriesRewritten++;
|
|
353
|
+
rowsRemoved += removed;
|
|
354
|
+
bytesAfter += bytes;
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
return {
|
|
358
|
+
userId: ctx.userId,
|
|
359
|
+
siteId: ctx.siteId,
|
|
360
|
+
urlsRequested: urlSet.size,
|
|
361
|
+
entriesRewritten,
|
|
362
|
+
rowsRemoved,
|
|
363
|
+
bytesAfter,
|
|
364
|
+
at: now
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
return {
|
|
368
|
+
writeDay,
|
|
369
|
+
writeHour,
|
|
370
|
+
query,
|
|
371
|
+
runSQL,
|
|
372
|
+
compactTiered,
|
|
373
|
+
reconcileSubsumed,
|
|
374
|
+
gcOrphans,
|
|
375
|
+
purgeTenant,
|
|
376
|
+
purgeUrls,
|
|
377
|
+
listLive: (filter) => manifestStore.listLive(filter),
|
|
378
|
+
listAll: (filter) => manifestStore.listAll(filter),
|
|
379
|
+
getWatermarks: (filter) => manifestStore.getWatermarks(filter),
|
|
380
|
+
getSyncStates: (filter) => manifestStore.getSyncStates(filter),
|
|
381
|
+
setSyncState: (scope, state, detail) => manifestStore.setSyncState(scope, state, detail),
|
|
382
|
+
readObject: (key) => dataSource.read(key)
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
export { MAX_DAY_BYTES, createStorageEngine };
|
package/dist/entities.d.mts
CHANGED
|
@@ -1,57 +1,8 @@
|
|
|
1
|
-
import { DataSource } from "./
|
|
2
|
-
import { ScheduleState } from "./
|
|
1
|
+
import { DataSource } from "./storage.mjs";
|
|
2
|
+
import { ScheduleState } from "./schedule.mjs";
|
|
3
3
|
import { emptyTypesKey, hashSortedUrlList, hashUrl, hashUrlList, indexingMetadataIndexKey, inspectionBaseKey, inspectionEventKey, inspectionEventsPrefix, inspectionHistoryPrefix, inspectionHistoryShardKey, inspectionIndexKey, inspectionParquetKey, queryDimMetaKey, queryDimParquetKey, sitemapHistoryKey, sitemapIndexKey, sitemapUrlsDeltaKey, sitemapUrlsIndexKey, sitemapUrlsIndexPrefix, sitemapUrlsPrefix } from "./entity-keys.mjs";
|
|
4
|
+
import { QueryDimDeps, QueryDimMeta, QueryDimRecord, QueryDimStore, buildQueryDimRecords, createQueryDimStore } from "./query-dim.mjs";
|
|
4
5
|
import { TenantCtx } from "@gscdump/contracts";
|
|
5
|
-
interface QueryDimRecord {
|
|
6
|
-
query: string;
|
|
7
|
-
/** Lexical canonical, never empty: NULL/'' folds to the raw query. */
|
|
8
|
-
query_canonical: string;
|
|
9
|
-
/** Packed search-intent code (see `@gscdump/analysis` `encodeIntent`). */
|
|
10
|
-
intent_code: number;
|
|
11
|
-
normalizer_version: number;
|
|
12
|
-
intent_version: number;
|
|
13
|
-
}
|
|
14
|
-
/** JSON sidecar: versions + freshness, readable without decoding the parquet. */
|
|
15
|
-
interface QueryDimMeta {
|
|
16
|
-
version: 1;
|
|
17
|
-
builtAt: number;
|
|
18
|
-
rowCount: number;
|
|
19
|
-
normalizerVersion: number;
|
|
20
|
-
intentVersion: number;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Injected derivation. `engine` never imports `@gscdump/analysis`; the host
|
|
24
|
-
* passes `normalizeQuery` / `classifyIntentCode` (e.g. `encodeIntent ∘
|
|
25
|
-
* classifyQueryIntent`) plus their version constants.
|
|
26
|
-
*/
|
|
27
|
-
interface QueryDimDeps {
|
|
28
|
-
normalizeQuery: (query: string) => string;
|
|
29
|
-
normalizerVersion: number;
|
|
30
|
-
/** Returns the packed intent code for a raw query. */
|
|
31
|
-
classifyIntentCode: (query: string) => number;
|
|
32
|
-
intentVersion: number;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Pure: distinct raw queries → dimension records. De-dupes, drops empties, and
|
|
36
|
-
* folds an empty/whitespace canonical back to the raw query so the dimension
|
|
37
|
-
* is total for read-time joins.
|
|
38
|
-
*/
|
|
39
|
-
declare function buildQueryDimRecords(queries: Iterable<string>, deps: QueryDimDeps): QueryDimRecord[];
|
|
40
|
-
interface QueryDimStore {
|
|
41
|
-
parquetKey: (ctx: TenantCtx) => string;
|
|
42
|
-
/** Write the parquet + JSON sidecar. Last-write-wins; no history. */
|
|
43
|
-
write: (ctx: TenantCtx, records: readonly QueryDimRecord[], builtAt: number) => Promise<{
|
|
44
|
-
parquetKey: string;
|
|
45
|
-
rowCount: number;
|
|
46
|
-
}>;
|
|
47
|
-
/** Read the sidecar (versions + freshness), or null on first build. */
|
|
48
|
-
loadMeta: (ctx: TenantCtx) => Promise<QueryDimMeta | null>;
|
|
49
|
-
/** Decode the dimension rows (test/inspection; reads JOIN the parquet by key). */
|
|
50
|
-
loadRecords: (ctx: TenantCtx) => Promise<QueryDimRecord[]>;
|
|
51
|
-
}
|
|
52
|
-
declare function createQueryDimStore({ dataSource }: {
|
|
53
|
-
dataSource: DataSource;
|
|
54
|
-
}): QueryDimStore;
|
|
55
6
|
/**
|
|
56
7
|
* GSC URL inspection result fields we persist. Mirrors the
|
|
57
8
|
* `searchconsole_v1.Schema$UrlInspectionResult` shape but as plain JSON
|