@gscdump/engine 1.4.0 → 1.4.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/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} +2 -34
- package/dist/{_chunks/schema.mjs → drizzle-schema.mjs} +2 -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 +110 -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 +4 -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
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { engineErrors } from "../errors.mjs";
|
|
2
|
+
import { coerceRows } from "../coerce.mjs";
|
|
3
|
+
var AttachedTableMissingError = class extends Error {
|
|
4
|
+
missing;
|
|
5
|
+
engineError;
|
|
6
|
+
constructor(missing) {
|
|
7
|
+
const engineError = engineErrors.attachedTableMissing(missing);
|
|
8
|
+
super(engineError.message);
|
|
9
|
+
this.missing = missing;
|
|
10
|
+
this.name = "AttachedTableMissingError";
|
|
11
|
+
this.engineError = engineError;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const ATTACHED_TABLE_CAPABILITIES = {
|
|
15
|
+
fileSets: true,
|
|
16
|
+
attachedTables: true,
|
|
17
|
+
regex: true
|
|
18
|
+
};
|
|
19
|
+
const ATTACHED_TABLE_CAPABILITIES_WITH_ADAPTER = {
|
|
20
|
+
...ATTACHED_TABLE_CAPABILITIES,
|
|
21
|
+
adapter: true
|
|
22
|
+
};
|
|
23
|
+
function rewriteForTableSource(sql, schema, fileSets) {
|
|
24
|
+
let out = sql;
|
|
25
|
+
for (const [key, fs] of Object.entries(fileSets)) {
|
|
26
|
+
const pattern = new RegExp(`read_parquet\\(\\s*\\{\\{${key}\\}\\}\\s*,\\s*union_by_name\\s*=\\s*true\\s*\\)`, "g");
|
|
27
|
+
out = out.replace(pattern, `${schema}.${fs.table}`);
|
|
28
|
+
}
|
|
29
|
+
return out;
|
|
30
|
+
}
|
|
31
|
+
function createAttachedTableSource(runner, options) {
|
|
32
|
+
const { schema, signal, attachedTables, adapter } = options;
|
|
33
|
+
const attachedSet = attachedTables ? new Set(attachedTables) : null;
|
|
34
|
+
return {
|
|
35
|
+
name: "attached-table",
|
|
36
|
+
kind: "browser",
|
|
37
|
+
capabilities: adapter ? ATTACHED_TABLE_CAPABILITIES_WITH_ADAPTER : ATTACHED_TABLE_CAPABILITIES,
|
|
38
|
+
adapter,
|
|
39
|
+
async queryRows() {
|
|
40
|
+
throw new Error("attached-table source: queryRows is not supported; use SQL analyzers");
|
|
41
|
+
},
|
|
42
|
+
async executeSql(sql, params, opts) {
|
|
43
|
+
signal?.throwIfAborted();
|
|
44
|
+
const fileSets = opts?.fileSets ?? {};
|
|
45
|
+
if (attachedSet) {
|
|
46
|
+
const missing = [];
|
|
47
|
+
for (const fs of Object.values(fileSets)) if (!attachedSet.has(fs.table)) missing.push(fs.table);
|
|
48
|
+
if (missing.length > 0) throw new AttachedTableMissingError(missing);
|
|
49
|
+
}
|
|
50
|
+
const rewritten = rewriteForTableSource(sql, schema, fileSets);
|
|
51
|
+
return coerceRows(await runner.query(rewritten, params ?? [], signal));
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export { AttachedTableMissingError, createAttachedTableSource };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ResolverAdapter } from "../resolver/types.mjs";
|
|
2
|
+
import { AnalysisQuerySource, AnalysisSourceKind, QueryRow, SourceCapabilities } from "./source-types.mjs";
|
|
3
|
+
interface CreateSqlQuerySourceOptions<TKey extends string> {
|
|
4
|
+
/** Debug-only identifier surfaced on the source for error messages. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** Telemetry tag stamped onto analyzer result meta. */
|
|
7
|
+
kind?: AnalysisSourceKind;
|
|
8
|
+
/** Dialect-specific adapter; compiles `BuilderState` → `{ sql, params }`. */
|
|
9
|
+
adapter: ResolverAdapter<TKey>;
|
|
10
|
+
/** Drives the underlying DB. Called for both typed queries and raw SQL. */
|
|
11
|
+
execute: (sql: string, params: unknown[]) => Promise<QueryRow[]>;
|
|
12
|
+
/** Tenant id for multi-tenant dialects; forwarded to `resolveToSQL`. */
|
|
13
|
+
siteId?: string | number;
|
|
14
|
+
/**
|
|
15
|
+
* Search-type scope for multi-tenant dialects; forwarded to `resolveToSQL`.
|
|
16
|
+
* `number` = int-encoded code (`SEARCH_TYPE_INT`) for INT `search_type`
|
|
17
|
+
* catalogs (bound bare so the int partition prunes); `string` otherwise.
|
|
18
|
+
*/
|
|
19
|
+
searchType?: string | number;
|
|
20
|
+
/** Additional capability flags merged on top of `adapter.capabilities`. */
|
|
21
|
+
extraCapabilities?: Partial<SourceCapabilities>;
|
|
22
|
+
}
|
|
23
|
+
declare function createSqlQuerySource<TKey extends string>(options: CreateSqlQuerySourceOptions<TKey>): AnalysisQuerySource;
|
|
24
|
+
export { CreateSqlQuerySourceOptions, createSqlQuerySource };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { coerceRows } from "../coerce.mjs";
|
|
2
|
+
import { resolveToSQL } from "../resolver/compile.mjs";
|
|
3
|
+
function createSqlQuerySource(options) {
|
|
4
|
+
const { name, kind, adapter, execute, siteId, searchType, extraCapabilities } = options;
|
|
5
|
+
return {
|
|
6
|
+
name,
|
|
7
|
+
kind,
|
|
8
|
+
capabilities: {
|
|
9
|
+
...adapter.capabilities,
|
|
10
|
+
...extraCapabilities,
|
|
11
|
+
adapter: true
|
|
12
|
+
},
|
|
13
|
+
adapter,
|
|
14
|
+
siteId,
|
|
15
|
+
async queryRows(state) {
|
|
16
|
+
const resolved = resolveToSQL(state, {
|
|
17
|
+
adapter,
|
|
18
|
+
siteId,
|
|
19
|
+
searchType
|
|
20
|
+
});
|
|
21
|
+
return coerceRows(await execute(resolved.sql, resolved.params));
|
|
22
|
+
},
|
|
23
|
+
async executeSql(sql, params) {
|
|
24
|
+
return coerceRows(await execute(sql, params ?? []));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export { createSqlQuerySource };
|
package/dist/source/index.d.mts
CHANGED
|
@@ -1,71 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AnalysisParams, AnalysisResult } from "../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "
|
|
1
|
+
import { SearchType as SearchType$1, StorageEngine, TenantCtx } from "../storage.mjs";
|
|
2
|
+
import { AnalysisParams, AnalysisResult } from "../analysis-types.mjs";
|
|
3
|
+
import { AnalysisQuerySource, AnalysisSourceKind, ExecuteSqlOptions, FileSet, QueryRow, SourceCapabilities } from "./source-types.mjs";
|
|
4
|
+
import { AnalyzerRegistry } from "../analyzer/registry.mjs";
|
|
5
|
+
import { AttachedTableMissingError, AttachedTableRunner, AttachedTableSourceOptions, createAttachedTableSource } from "./attached-table.mjs";
|
|
6
|
+
import { CreateSqlQuerySourceOptions, createSqlQuerySource } from "./create-sql-query-source.mjs";
|
|
7
7
|
import { PlannerCapabilities } from "gscdump/query/plan";
|
|
8
8
|
import { BuilderState } from "gscdump/query";
|
|
9
|
-
interface AttachedTableRunner {
|
|
10
|
-
/**
|
|
11
|
-
* Run a query with positional (`?`) bound parameters. Return objects keyed
|
|
12
|
-
* by column name. BIGINT → number coercion is applied by the source factory
|
|
13
|
-
* (see `coerceRows`); runners only need to handle DATE → ISO string (or
|
|
14
|
-
* let the analyzer reducer normalize via `num(v)`/`str(v)`).
|
|
15
|
-
*/
|
|
16
|
-
query: (sql: string, params?: unknown[], signal?: AbortSignal) => Promise<Row[]>;
|
|
17
|
-
}
|
|
18
|
-
interface AttachedTableSourceOptions {
|
|
19
|
-
/** Schema name the exported DuckDB file was attached under — e.g. `gsc`. */
|
|
20
|
-
schema: string;
|
|
21
|
-
/**
|
|
22
|
-
* Abort in-flight queries when the caller no longer cares about the
|
|
23
|
-
* result. Every `runner.query` call receives the same signal.
|
|
24
|
-
*/
|
|
25
|
-
signal?: AbortSignal;
|
|
26
|
-
/**
|
|
27
|
-
* List of table names actually attached to this connection. When provided,
|
|
28
|
-
* `executeSql` short-circuits with a specific "table not attached" error
|
|
29
|
-
* if the SQL plan references a table that isn't in this list — letting
|
|
30
|
-
* callers (e.g. the analytics layer) route to cloud fallback without
|
|
31
|
-
* paying the SQL execution cost. Omit to disable the check.
|
|
32
|
-
*/
|
|
33
|
-
attachedTables?: readonly string[];
|
|
34
|
-
/**
|
|
35
|
-
* Dialect adapter surfaced on the source for analyzers that compose SQL
|
|
36
|
-
* from a `BuilderState` at plan-build time (e.g. `data-query`,
|
|
37
|
-
* `data-detail`). Attached-table sources execute pg-flavored DuckDB SQL,
|
|
38
|
-
* so callers should pass `pgResolverAdapter` here.
|
|
39
|
-
*/
|
|
40
|
-
adapter?: ResolverAdapter<any>;
|
|
41
|
-
}
|
|
42
|
-
declare class AttachedTableMissingError extends Error {
|
|
43
|
-
readonly missing: readonly string[];
|
|
44
|
-
readonly engineError: EngineError;
|
|
45
|
-
constructor(missing: readonly string[]);
|
|
46
|
-
}
|
|
47
|
-
declare function createAttachedTableSource(runner: AttachedTableRunner, options: AttachedTableSourceOptions): AnalysisQuerySource;
|
|
48
|
-
interface CreateSqlQuerySourceOptions<TKey extends string> {
|
|
49
|
-
/** Debug-only identifier surfaced on the source for error messages. */
|
|
50
|
-
name: string;
|
|
51
|
-
/** Telemetry tag stamped onto analyzer result meta. */
|
|
52
|
-
kind?: AnalysisSourceKind;
|
|
53
|
-
/** Dialect-specific adapter; compiles `BuilderState` → `{ sql, params }`. */
|
|
54
|
-
adapter: ResolverAdapter<TKey>;
|
|
55
|
-
/** Drives the underlying DB. Called for both typed queries and raw SQL. */
|
|
56
|
-
execute: (sql: string, params: unknown[]) => Promise<QueryRow[]>;
|
|
57
|
-
/** Tenant id for multi-tenant dialects; forwarded to `resolveToSQL`. */
|
|
58
|
-
siteId?: string | number;
|
|
59
|
-
/**
|
|
60
|
-
* Search-type scope for multi-tenant dialects; forwarded to `resolveToSQL`.
|
|
61
|
-
* `number` = int-encoded code (`SEARCH_TYPE_INT`) for INT `search_type`
|
|
62
|
-
* catalogs (bound bare so the int partition prunes); `string` otherwise.
|
|
63
|
-
*/
|
|
64
|
-
searchType?: string | number;
|
|
65
|
-
/** Additional capability flags merged on top of `adapter.capabilities`. */
|
|
66
|
-
extraCapabilities?: Partial<SourceCapabilities>;
|
|
67
|
-
}
|
|
68
|
-
declare function createSqlQuerySource<TKey extends string>(options: CreateSqlQuerySourceOptions<TKey>): AnalysisQuerySource;
|
|
69
9
|
/**
|
|
70
10
|
* Capabilities the engine query path honors. Matches what the DuckDB compiler
|
|
71
11
|
* passes to `buildLogicalPlan`: regex pushes down; comparison joins and
|
package/dist/source/index.mjs
CHANGED
|
@@ -1,85 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import "../
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const engineError = engineErrors.attachedTableMissing(missing);
|
|
11
|
-
super(engineError.message);
|
|
12
|
-
this.missing = missing;
|
|
13
|
-
this.name = "AttachedTableMissingError";
|
|
14
|
-
this.engineError = engineError;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
const ATTACHED_TABLE_CAPABILITIES = {
|
|
18
|
-
fileSets: true,
|
|
19
|
-
attachedTables: true,
|
|
20
|
-
regex: true
|
|
21
|
-
};
|
|
22
|
-
const ATTACHED_TABLE_CAPABILITIES_WITH_ADAPTER = {
|
|
23
|
-
...ATTACHED_TABLE_CAPABILITIES,
|
|
24
|
-
adapter: true
|
|
25
|
-
};
|
|
26
|
-
function rewriteForTableSource(sql, schema, fileSets) {
|
|
27
|
-
let out = sql;
|
|
28
|
-
for (const [key, fs] of Object.entries(fileSets)) {
|
|
29
|
-
const pattern = new RegExp(`read_parquet\\(\\s*\\{\\{${key}\\}\\}\\s*,\\s*union_by_name\\s*=\\s*true\\s*\\)`, "g");
|
|
30
|
-
out = out.replace(pattern, `${schema}.${fs.table}`);
|
|
31
|
-
}
|
|
32
|
-
return out;
|
|
33
|
-
}
|
|
34
|
-
function createAttachedTableSource(runner, options) {
|
|
35
|
-
const { schema, signal, attachedTables, adapter } = options;
|
|
36
|
-
const attachedSet = attachedTables ? new Set(attachedTables) : null;
|
|
37
|
-
return {
|
|
38
|
-
name: "attached-table",
|
|
39
|
-
kind: "browser",
|
|
40
|
-
capabilities: adapter ? ATTACHED_TABLE_CAPABILITIES_WITH_ADAPTER : ATTACHED_TABLE_CAPABILITIES,
|
|
41
|
-
adapter,
|
|
42
|
-
async queryRows() {
|
|
43
|
-
throw new Error("attached-table source: queryRows is not supported; use SQL analyzers");
|
|
44
|
-
},
|
|
45
|
-
async executeSql(sql, params, opts) {
|
|
46
|
-
signal?.throwIfAborted();
|
|
47
|
-
const fileSets = opts?.fileSets ?? {};
|
|
48
|
-
if (attachedSet) {
|
|
49
|
-
const missing = [];
|
|
50
|
-
for (const fs of Object.values(fileSets)) if (!attachedSet.has(fs.table)) missing.push(fs.table);
|
|
51
|
-
if (missing.length > 0) throw new AttachedTableMissingError(missing);
|
|
52
|
-
}
|
|
53
|
-
const rewritten = rewriteForTableSource(sql, schema, fileSets);
|
|
54
|
-
return coerceRows(await runner.query(rewritten, params ?? [], signal));
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
function createSqlQuerySource(options) {
|
|
59
|
-
const { name, kind, adapter, execute, siteId, searchType, extraCapabilities } = options;
|
|
60
|
-
return {
|
|
61
|
-
name,
|
|
62
|
-
kind,
|
|
63
|
-
capabilities: {
|
|
64
|
-
...adapter.capabilities,
|
|
65
|
-
...extraCapabilities,
|
|
66
|
-
adapter: true
|
|
67
|
-
},
|
|
68
|
-
adapter,
|
|
69
|
-
siteId,
|
|
70
|
-
async queryRows(state) {
|
|
71
|
-
const resolved = resolveToSQL(state, {
|
|
72
|
-
adapter,
|
|
73
|
-
siteId,
|
|
74
|
-
searchType
|
|
75
|
-
});
|
|
76
|
-
return coerceRows(await execute(resolved.sql, resolved.params));
|
|
77
|
-
},
|
|
78
|
-
async executeSql(sql, params) {
|
|
79
|
-
return coerceRows(await execute(sql, params ?? []));
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
}
|
|
1
|
+
import "../layout.mjs";
|
|
2
|
+
import { coerceRows } from "../coerce.mjs";
|
|
3
|
+
import { assertDimensionsSupported } from "../resolver/datasets.mjs";
|
|
4
|
+
import { getFilterDimensions } from "../resolver/filter-utils.mjs";
|
|
5
|
+
import { pgResolverAdapter } from "../resolver/pg-adapter.mjs";
|
|
6
|
+
import "../resolver/index.mjs";
|
|
7
|
+
import { runAnalyzerFromSource } from "../analyzer/dispatch.mjs";
|
|
8
|
+
import { AttachedTableMissingError, createAttachedTableSource } from "./attached-table.mjs";
|
|
9
|
+
import { createSqlQuerySource } from "./create-sql-query-source.mjs";
|
|
83
10
|
function isMetricDimension(dim) {
|
|
84
11
|
return [
|
|
85
12
|
"clicks",
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ResolverAdapter } from "../resolver/types.mjs";
|
|
2
|
+
import { PlannerCapabilities } from "gscdump/query/plan";
|
|
3
|
+
import { BuilderState } from "gscdump/query";
|
|
4
|
+
import { TableName } from "@gscdump/contracts";
|
|
5
|
+
type QueryRow = Record<string, unknown>;
|
|
6
|
+
interface FileSet {
|
|
7
|
+
table: TableName;
|
|
8
|
+
partitions: string[];
|
|
9
|
+
}
|
|
10
|
+
interface ExecuteSqlOptions {
|
|
11
|
+
fileSets?: Record<string, FileSet>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Flat capability bag: planner-side flags (`regex`, `comparisonJoin`, ...)
|
|
15
|
+
* mixed with storage-side flags. SQL execution is not a capability flag —
|
|
16
|
+
* callers probe `typeof source.executeSql === 'function'`.
|
|
17
|
+
*/
|
|
18
|
+
interface SourceCapabilities extends PlannerCapabilities {
|
|
19
|
+
attachedTables?: boolean;
|
|
20
|
+
fileSets?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* true iff the source provides a `ResolverAdapter` for analyzers that
|
|
23
|
+
* compose SQL from a typed `BuilderState` at plan-build time.
|
|
24
|
+
*/
|
|
25
|
+
adapter?: boolean;
|
|
26
|
+
}
|
|
27
|
+
type AnalysisSourceKind = 'local' | 'browser' | 'live' | 'in-memory' | 'composite' | 'attached-table';
|
|
28
|
+
interface AnalysisQuerySource {
|
|
29
|
+
name?: string;
|
|
30
|
+
/** Telemetry tag stamped onto analyzer result meta; not used for routing. */
|
|
31
|
+
kind?: AnalysisSourceKind;
|
|
32
|
+
capabilities: SourceCapabilities;
|
|
33
|
+
/**
|
|
34
|
+
* Dialect adapter surfaced for analyzers that compose SQL from a
|
|
35
|
+
* `BuilderState` at plan-build time. Optional for pure row sources.
|
|
36
|
+
*/
|
|
37
|
+
adapter?: ResolverAdapter<any>;
|
|
38
|
+
/** Tenant scope; multi-tenant dialects (sqlite/D1) require it, parquet omits it. */
|
|
39
|
+
siteId?: string | number;
|
|
40
|
+
queryRows: (state: BuilderState) => Promise<QueryRow[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Optional raw-SQL escape hatch. Receives the compiled SQL plan with
|
|
43
|
+
* `{{FILES}}` placeholders; sources that advertise `capabilities.fileSets`
|
|
44
|
+
* consume `opts.fileSets`, others ignore them. Implementations MUST coerce
|
|
45
|
+
* BigInts to numbers before returning (see Source invariant above).
|
|
46
|
+
*/
|
|
47
|
+
executeSql?: (sql: string, params?: unknown[], opts?: ExecuteSqlOptions) => Promise<QueryRow[]>;
|
|
48
|
+
}
|
|
49
|
+
export { AnalysisQuerySource, AnalysisSourceKind, ExecuteSqlOptions, FileSet, QueryRow, SourceCapabilities };
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompactionThresholds } from "./compaction.mjs";
|
|
2
|
+
import { ParquetQueryFilter } from "./node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/index.mjs";
|
|
3
|
+
import "./node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/node.mjs";
|
|
2
4
|
import { BuilderState, SearchType, SearchType as SearchType$1 } from "gscdump/query";
|
|
3
5
|
import { Grain, Grain as Grain$1, Row, Row as Row$1, TableName, TableName as TableName$1, TenantCtx, TenantCtx as TenantCtx$1 } from "@gscdump/contracts";
|
|
4
|
-
/**
|
|
5
|
-
* Per-tier age threshold in days. Default ladder collapses on these gates:
|
|
6
|
-
* - raw → d7 once a daily file is older than `raw` days (default 7).
|
|
7
|
-
* - d7 → d30 once the entire weekly bucket sits behind `d7` days (default 30).
|
|
8
|
-
* - d30 → d90 once the entire monthly bucket sits behind `d30` days (default 90).
|
|
9
|
-
*/
|
|
10
|
-
interface CompactionThresholds {
|
|
11
|
-
raw?: number;
|
|
12
|
-
d7?: number;
|
|
13
|
-
d30?: number;
|
|
14
|
-
}
|
|
15
|
-
declare function enumeratePartitions(startDate: string, endDate: string): string[];
|
|
16
6
|
interface WriteCtx extends TenantCtx {
|
|
17
7
|
table: TableName;
|
|
18
8
|
date?: string;
|
|
@@ -554,4 +544,4 @@ interface EngineOptions {
|
|
|
554
544
|
executor: QueryExecutor;
|
|
555
545
|
now?: () => number;
|
|
556
546
|
}
|
|
557
|
-
export { CodecCtx,
|
|
547
|
+
export { CodecCtx, CompactionTier, DataSource, EngineOptions, FileSetRef, GcCtx, type Grain$1 as Grain, ListLiveFilter, LockScope, ManifestEntry, ManifestPurgeResult, ManifestStore, ParquetCodec, PurgeFilter, PurgeResult, PurgeUrlsResult, QueryCtx, QueryExecuteOptions, QueryExecuteResult, QueryExecutor, QueryProfiler, QueryResult, QuerySpan, type Row$1 as Row, RunSQLOptions, type SearchType$1 as SearchType, StorageEngine, SyncState, SyncStateDetail, SyncStateFilter, SyncStateKind, SyncStateScope, type TableName$1 as TableName, type TenantCtx$1 as TenantCtx, Watermark, WatermarkFilter, WatermarkScope, WriteCtx, WriteResult };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SearchType } from "./storage.mjs";
|
|
2
|
+
import { EngineError } from "./errors.mjs";
|
|
3
|
+
import { Result } from "gscdump/result";
|
|
4
|
+
import { TableName } from "@gscdump/contracts";
|
|
5
|
+
type SyncTableName = Extract<TableName, 'pages' | 'queries' | 'countries' | 'page_queries' | 'dates'>;
|
|
6
|
+
declare const TABLES_BY_SEARCH_TYPE: Record<SearchType, readonly SyncTableName[]>;
|
|
7
|
+
declare function parseEnabledSearchTypes(raw: string | null | undefined): SearchType[];
|
|
8
|
+
/**
|
|
9
|
+
* Errors-as-values core for {@link validateEnabledSearchTypes}: returns a typed
|
|
10
|
+
* `invalid-search-types` `EngineError` instead of throwing, so a host saving the
|
|
11
|
+
* persisted config can map a bad value to a 4xx rather than a 500.
|
|
12
|
+
*/
|
|
13
|
+
declare function validateEnabledSearchTypesResult(value: unknown): Result<SearchType[], EngineError>;
|
|
14
|
+
declare function validateEnabledSearchTypes(value: unknown): SearchType[];
|
|
15
|
+
declare const TABLE_TIERS: {
|
|
16
|
+
readonly pages: 'critical';
|
|
17
|
+
readonly queries: 'critical';
|
|
18
|
+
readonly countries: 'standard';
|
|
19
|
+
readonly dates: 'standard';
|
|
20
|
+
readonly page_queries: 'extended';
|
|
21
|
+
};
|
|
22
|
+
type TieredTableName = keyof typeof TABLE_TIERS;
|
|
23
|
+
type TableTier = 'critical' | 'standard' | 'extended';
|
|
24
|
+
type DateWeight = 'fresh' | 'recent' | 'historical';
|
|
25
|
+
declare function getTableTier(table: string): TableTier;
|
|
26
|
+
declare function getTablesForTier(tier: TableTier): TieredTableName[];
|
|
27
|
+
declare function getDateWeight(date: string, now?: Date): DateWeight;
|
|
28
|
+
declare const TIER_PRIORITY: Record<TableTier, number>;
|
|
29
|
+
declare const WEIGHT_PRIORITY: Record<DateWeight, number>;
|
|
30
|
+
declare const MAX_GSC_PAGES_R2 = 40;
|
|
31
|
+
declare const ROW_LIMIT_R2 = 25000;
|
|
32
|
+
declare const MIN_SYNC_IMPRESSIONS = 1;
|
|
33
|
+
declare const MIN_COUNTRY_IMPRESSIONS = 10;
|
|
34
|
+
declare const MAX_SITEMAP_URLS_PER_SITE = 50000;
|
|
35
|
+
declare const MAX_TRACKED_URLS_PER_SITE = 200000;
|
|
36
|
+
export { DateWeight, MAX_GSC_PAGES_R2, MAX_SITEMAP_URLS_PER_SITE, MAX_TRACKED_URLS_PER_SITE, MIN_COUNTRY_IMPRESSIONS, MIN_SYNC_IMPRESSIONS, ROW_LIMIT_R2, SyncTableName, TABLES_BY_SEARCH_TYPE, TABLE_TIERS, TIER_PRIORITY, TableTier, TieredTableName, WEIGHT_PRIORITY, getDateWeight, getTableTier, getTablesForTier, parseEnabledSearchTypes, validateEnabledSearchTypes, validateEnabledSearchTypesResult };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { engineErrorToException, engineErrors } from "./errors.mjs";
|
|
2
|
+
import { err, ok, unwrapResult } from "gscdump/result";
|
|
3
|
+
const TABLES_BY_SEARCH_TYPE = {
|
|
4
|
+
web: [
|
|
5
|
+
"pages",
|
|
6
|
+
"queries",
|
|
7
|
+
"countries",
|
|
8
|
+
"page_queries",
|
|
9
|
+
"dates"
|
|
10
|
+
],
|
|
11
|
+
discover: [
|
|
12
|
+
"pages",
|
|
13
|
+
"countries",
|
|
14
|
+
"dates"
|
|
15
|
+
],
|
|
16
|
+
news: [
|
|
17
|
+
"pages",
|
|
18
|
+
"countries",
|
|
19
|
+
"dates"
|
|
20
|
+
],
|
|
21
|
+
googleNews: [
|
|
22
|
+
"pages",
|
|
23
|
+
"countries",
|
|
24
|
+
"dates"
|
|
25
|
+
],
|
|
26
|
+
image: [
|
|
27
|
+
"pages",
|
|
28
|
+
"countries",
|
|
29
|
+
"dates"
|
|
30
|
+
],
|
|
31
|
+
video: [
|
|
32
|
+
"pages",
|
|
33
|
+
"countries",
|
|
34
|
+
"dates"
|
|
35
|
+
]
|
|
36
|
+
};
|
|
37
|
+
function parseEnabledSearchTypes(raw) {
|
|
38
|
+
if (!raw) return ["web"];
|
|
39
|
+
const parsed = JSON.parse(raw);
|
|
40
|
+
if (!Array.isArray(parsed) || parsed.length === 0) return ["web"];
|
|
41
|
+
const valid = parsed.filter((v) => typeof v === "string" && v in TABLES_BY_SEARCH_TYPE);
|
|
42
|
+
if (valid.length === 0) return ["web"];
|
|
43
|
+
if (!valid.includes("web")) valid.unshift("web");
|
|
44
|
+
return valid;
|
|
45
|
+
}
|
|
46
|
+
function validateEnabledSearchTypesResult(value) {
|
|
47
|
+
if (!Array.isArray(value) || value.length === 0) return err(engineErrors.searchTypesNotArray());
|
|
48
|
+
const seen = /* @__PURE__ */ new Set();
|
|
49
|
+
const out = [];
|
|
50
|
+
for (const v of value) {
|
|
51
|
+
if (typeof v !== "string" || !(v in TABLES_BY_SEARCH_TYPE)) return err(engineErrors.unknownSearchType(v));
|
|
52
|
+
if (seen.has(v)) continue;
|
|
53
|
+
seen.add(v);
|
|
54
|
+
out.push(v);
|
|
55
|
+
}
|
|
56
|
+
if (!out.includes("web")) return err(engineErrors.searchTypesMissingWeb());
|
|
57
|
+
return ok(out);
|
|
58
|
+
}
|
|
59
|
+
function validateEnabledSearchTypes(value) {
|
|
60
|
+
return unwrapResult(validateEnabledSearchTypesResult(value), engineErrorToException);
|
|
61
|
+
}
|
|
62
|
+
const TABLE_TIERS = {
|
|
63
|
+
pages: "critical",
|
|
64
|
+
queries: "critical",
|
|
65
|
+
countries: "standard",
|
|
66
|
+
dates: "standard",
|
|
67
|
+
page_queries: "extended"
|
|
68
|
+
};
|
|
69
|
+
function getTableTier(table) {
|
|
70
|
+
return TABLE_TIERS[table] || "extended";
|
|
71
|
+
}
|
|
72
|
+
function getTablesForTier(tier) {
|
|
73
|
+
return Object.entries(TABLE_TIERS).filter(([_, t]) => t === tier).map(([name]) => name);
|
|
74
|
+
}
|
|
75
|
+
function getDateWeight(date, now = /* @__PURE__ */ new Date()) {
|
|
76
|
+
const target = new Date(date);
|
|
77
|
+
const daysAgo = Math.floor((now.getTime() - target.getTime()) / (1e3 * 60 * 60 * 24));
|
|
78
|
+
if (daysAgo <= 3) return "fresh";
|
|
79
|
+
if (daysAgo <= 60) return "recent";
|
|
80
|
+
return "historical";
|
|
81
|
+
}
|
|
82
|
+
const TIER_PRIORITY = {
|
|
83
|
+
critical: 0,
|
|
84
|
+
standard: 1,
|
|
85
|
+
extended: 2
|
|
86
|
+
};
|
|
87
|
+
const WEIGHT_PRIORITY = {
|
|
88
|
+
fresh: 0,
|
|
89
|
+
recent: 1,
|
|
90
|
+
historical: 2
|
|
91
|
+
};
|
|
92
|
+
const MAX_GSC_PAGES_R2 = 40;
|
|
93
|
+
const ROW_LIMIT_R2 = 25e3;
|
|
94
|
+
const MIN_SYNC_IMPRESSIONS = 1;
|
|
95
|
+
const MIN_COUNTRY_IMPRESSIONS = 10;
|
|
96
|
+
const MAX_SITEMAP_URLS_PER_SITE = 5e4;
|
|
97
|
+
const MAX_TRACKED_URLS_PER_SITE = 2e5;
|
|
98
|
+
export { MAX_GSC_PAGES_R2, MAX_SITEMAP_URLS_PER_SITE, MAX_TRACKED_URLS_PER_SITE, MIN_COUNTRY_IMPRESSIONS, MIN_SYNC_IMPRESSIONS, ROW_LIMIT_R2, TABLES_BY_SEARCH_TYPE, TABLE_TIERS, TIER_PRIORITY, WEIGHT_PRIORITY, getDateWeight, getTableTier, getTablesForTier, parseEnabledSearchTypes, validateEnabledSearchTypes, validateEnabledSearchTypesResult };
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import { snappyUncompress
|
|
1
|
+
import { snappyUncompress as snappyUncompress$1 } from "../node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/snappy.mjs";
|
|
2
|
+
function decode(input, outputLength) {
|
|
3
|
+
const output = new Uint8Array(outputLength);
|
|
4
|
+
snappyUncompress$1(input, output);
|
|
5
|
+
return output;
|
|
6
|
+
}
|
|
7
|
+
function snappyUncompressor() {
|
|
8
|
+
return decode;
|
|
9
|
+
}
|
|
10
|
+
function snappyUncompress(input, outputLength) {
|
|
11
|
+
return decode(input, outputLength);
|
|
12
|
+
}
|
|
2
13
|
export { snappyUncompress, snappyUncompressor };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gscdump/engine",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.1",
|
|
5
5
|
"description": "Append-only Parquet/DuckDB storage engine + planner + adapters for the gscdump pipeline. Node + edge runtimes; opt-in heavy peers.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -176,9 +176,9 @@
|
|
|
176
176
|
"dependencies": {
|
|
177
177
|
"drizzle-orm": "1.0.0-rc.3",
|
|
178
178
|
"proper-lockfile": "^4.1.2",
|
|
179
|
-
"@gscdump/contracts": "^1.4.
|
|
180
|
-
"gscdump": "^1.4.
|
|
181
|
-
"
|
|
179
|
+
"@gscdump/contracts": "^1.4.1",
|
|
180
|
+
"@gscdump/lakehouse": "^1.4.1",
|
|
181
|
+
"gscdump": "^1.4.1"
|
|
182
182
|
},
|
|
183
183
|
"devDependencies": {
|
|
184
184
|
"@duckdb/duckdb-wasm": "1.33.1-dev57.0",
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { BuilderState, SearchType } from "gscdump/query";
|
|
2
|
-
type AnalysisTool = 'striking-distance' | 'opportunity' | 'movers' | 'decay' | 'zero-click' | 'brand' | 'cannibalization' | 'clustering' | 'concentration' | 'seasonality' | 'trends' | 'ctr-anomaly' | 'position-volatility' | 'long-tail' | 'intent-atlas' | 'query-migration' | 'bayesian-ctr' | 'stl-decompose' | 'change-point' | 'bipartite-pagerank' | 'survival' | 'position-distribution' | 'ctr-curve' | 'dark-traffic' | 'content-velocity' | 'keyword-breadth' | 'device-gap' | 'data-query' | 'data-detail';
|
|
3
|
-
interface AnalysisParams {
|
|
4
|
-
type: AnalysisTool;
|
|
5
|
-
startDate?: string;
|
|
6
|
-
endDate?: string;
|
|
7
|
-
prevStartDate?: string;
|
|
8
|
-
prevEndDate?: string;
|
|
9
|
-
brandTerms?: string[];
|
|
10
|
-
limit?: number;
|
|
11
|
-
offset?: number;
|
|
12
|
-
/**
|
|
13
|
-
* movers: select a single direction and paginate within it. When set, the
|
|
14
|
-
* analyzer filters to that direction, reports `meta.total` as the full
|
|
15
|
-
* pre-pagination count for the direction, and applies `limit`/`offset`. When
|
|
16
|
-
* unset, both directions are returned uncapped (the top-N callers slice
|
|
17
|
-
* themselves).
|
|
18
|
-
*/
|
|
19
|
-
direction?: 'rising' | 'declining';
|
|
20
|
-
/** Sort column. Each analyzer enforces its own whitelist. */
|
|
21
|
-
sortBy?: string;
|
|
22
|
-
/** Sort direction. Default per-analyzer. */
|
|
23
|
-
sortDir?: 'asc' | 'desc';
|
|
24
|
-
minPosition?: number;
|
|
25
|
-
maxPosition?: number;
|
|
26
|
-
minImpressions?: number;
|
|
27
|
-
maxCtr?: number;
|
|
28
|
-
minPages?: number;
|
|
29
|
-
maxPositionSpread?: number;
|
|
30
|
-
minClusterSize?: number;
|
|
31
|
-
clusterBy?: 'prefix' | 'intent' | 'both';
|
|
32
|
-
dimension?: 'pages' | 'keywords';
|
|
33
|
-
topN?: number;
|
|
34
|
-
metric?: 'clicks' | 'impressions';
|
|
35
|
-
changeThreshold?: number;
|
|
36
|
-
minPreviousClicks?: number;
|
|
37
|
-
threshold?: number;
|
|
38
|
-
weeks?: number;
|
|
39
|
-
minWeeksWithData?: number;
|
|
40
|
-
/** content-velocity lookback window in days (max 365, default 90). */
|
|
41
|
-
days?: number;
|
|
42
|
-
/** data-query / data-detail primary BuilderState. */
|
|
43
|
-
q?: BuilderState;
|
|
44
|
-
/** data-query / data-detail optional comparison-period BuilderState. */
|
|
45
|
-
qc?: BuilderState;
|
|
46
|
-
/** data-query comparison filter applied to joined current/previous rows. */
|
|
47
|
-
comparisonFilter?: 'new' | 'lost' | 'improving' | 'declining';
|
|
48
|
-
/** GSC slice the analysis is scoped to. Undefined = analyzer runs cross-type (today's behaviour for web-only sites). */
|
|
49
|
-
searchType?: SearchType;
|
|
50
|
-
}
|
|
51
|
-
interface AnalysisResult {
|
|
52
|
-
results: Record<string, unknown>[];
|
|
53
|
-
meta: Record<string, unknown>;
|
|
54
|
-
}
|
|
55
|
-
/** Coerce arbitrary value (number, bigint, string, null) to number, defaulting to 0. */
|
|
56
|
-
declare function num(v: unknown): number;
|
|
57
|
-
export { AnalysisParams, AnalysisResult, AnalysisTool, num };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./storage.mjs";
|