@gscdump/engine 3.5.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -18
- package/dist/THIRD-PARTY-LICENSES.md +2 -2
- package/dist/adapters/duckdb-node.d.mts +4 -4
- package/dist/adapters/duckdb-node.mjs +103 -77
- package/dist/adapters/filesystem.d.mts +6 -7
- package/dist/adapters/filesystem.mjs +11 -6
- package/dist/adapters/hyparquet.d.mts +9 -10
- package/dist/adapters/hyparquet.mjs +84 -44
- package/dist/adapters/node-harness.d.mts +3 -4
- package/dist/adapters/parquet-attach.d.mts +4 -5
- package/dist/adapters/parquet-attach.mjs +7 -2
- package/dist/adapters/r2-manifest.d.mts +4 -5
- package/dist/adapters/r2.d.mts +2 -3
- package/dist/adapters/snapshot-attach.d.mts +7 -8
- package/dist/adapters/snapshot-attach.mjs +7 -2
- package/dist/analysis-range.d.mts +2 -3
- package/dist/analysis-types.d.mts +4 -5
- package/dist/analyzer/define.d.mts +6 -7
- package/dist/analyzer/dispatch.d.mts +2 -3
- package/dist/analyzer/registry.d.mts +4 -5
- package/dist/analyzer/types.d.mts +11 -12
- package/dist/arrow-utils.d.mts +4 -5
- package/dist/arrow-utils.mjs +10 -0
- package/dist/coerce.d.mts +1 -2
- package/dist/compaction.d.mts +2 -3
- package/dist/drizzle-schema.d.mts +14 -15
- package/dist/duckdb.d.mts +5 -6
- package/dist/duckdb.mjs +9 -5
- package/dist/engine.d.mts +1 -2
- package/dist/entities/empty-types.d.mts +4 -5
- package/dist/entities/indexing-metadata.d.mts +5 -6
- package/dist/entities/inspection.d.mts +9 -10
- package/dist/entities/query-dim.d.mts +7 -7
- package/dist/entities/sitemap-shared.d.mts +26 -27
- package/dist/entities/sitemap-write.d.mts +1 -2
- package/dist/entities/sitemap.d.mts +1 -2
- package/dist/entity-keys.d.mts +28 -29
- package/dist/errors.d.mts +5 -6
- package/dist/iceberg/append-sink.d.mts +2 -3
- package/dist/iceberg/catalog.d.mts +10 -10
- package/dist/iceberg/catalog.mjs +2 -2
- package/dist/iceberg/overwrite-writer.d.mts +17 -18
- package/dist/iceberg/schema.d.mts +16 -16
- package/dist/ingest-accumulator.d.mts +8 -9
- package/dist/ingest.d.mts +15 -12
- package/dist/ingest.mjs +22 -6
- package/dist/layout.d.mts +4 -5
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/datapage.mjs +1 -1
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/indexes.mjs +1 -1
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/metadata.mjs +1 -1
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/types.d.mts +2 -3
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/types/index.d.mts +2 -3
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/assemble.mjs +3 -144
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/bloom.mjs +3 -58
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/column.mjs +8 -129
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/convert.mjs +3 -118
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/datapage.mjs +6 -144
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/delta.mjs +2 -65
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/encoding.mjs +2 -76
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/filter.mjs +4 -212
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/geoparquet.mjs +1 -24
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/index.mjs +3 -3
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/indexes.mjs +5 -32
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/metadata.mjs +7 -241
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/node.mjs +1 -5
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/plain.mjs +1 -79
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/plan.mjs +6 -375
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/read.mjs +6 -77
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/rowgroup.mjs +7 -175
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/scan.mjs +5 -73
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/schema.mjs +1 -22
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/snappy.mjs +1 -68
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/thrift.mjs +1 -86
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/types.d.mts +2 -28
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/utils.mjs +1 -31
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/variant.mjs +3 -228
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/wkb.mjs +1 -94
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/types/index.d.mts +2 -52
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/types/node.d.mts +2 -2
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/assemble.mjs +144 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/bloom.mjs +124 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/column.mjs +129 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/constants.mjs +80 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/convert.mjs +118 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/datapage.mjs +144 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/delta.mjs +65 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/encoding.mjs +76 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/filter.mjs +212 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/geoparquet.mjs +24 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/index.mjs +8 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/indexes.mjs +32 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/metadata.mjs +241 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/node.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/plain.mjs +79 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/plan.mjs +375 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/query.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/read.mjs +81 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/rowgroup.mjs +175 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/scan.mjs +74 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/schema.mjs +75 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/snappy.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/thrift.mjs +86 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/types.d.mts +25 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/utils.mjs +32 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/variant.mjs +228 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/wkb.mjs +94 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/xxhash.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/index.d.mts +58 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/node.d.mts +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/scan.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/utils.d.mts +1 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/index.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/read.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/icebergDataSource.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/icebergQuery.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/types.d.mts +17 -18
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/create.d.mts +1 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/index.d.mts +1 -1
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/manifest.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/metadata.d.mts +1 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/read.d.mts +1 -1
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/s3.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergDataSource.d.mts +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergQuery.d.mts +2 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/write/write.d.mts +2 -3
- package/dist/node_modules/.pnpm/squirreling@0.16.4/node_modules/squirreling/src/ast.d.mts +1 -0
- package/dist/parquet-plan.d.mts +5 -6
- package/dist/period/index.d.mts +8 -8
- package/dist/profile.d.mts +3 -3
- package/dist/report/define.d.mts +1 -2
- package/dist/report/hash.d.mts +3 -4
- package/dist/report/registry.d.mts +3 -4
- package/dist/report/types.d.mts +22 -23
- package/dist/resolver/adapter.d.mts +2 -3
- package/dist/resolver/canonical-source.d.mts +1 -2
- package/dist/resolver/compile.d.mts +12 -8
- package/dist/resolver/compile.mjs +7 -3
- package/dist/resolver/datasets.d.mts +9 -9
- package/dist/resolver/extras-overlay.d.mts +2 -3
- package/dist/resolver/filter-utils.d.mts +7 -7
- package/dist/resolver/fragments.d.mts +3 -4
- package/dist/resolver/pg-adapter.d.mts +7 -8
- package/dist/resolver/run-query.d.mts +16 -17
- package/dist/resolver/run-query.mjs +16 -15
- package/dist/resolver/schema-drift.d.mts +2 -3
- package/dist/resolver/types.d.mts +8 -9
- package/dist/rollups/canonical.d.mts +4 -5
- package/dist/rollups/core.d.mts +12 -13
- package/dist/rollups/defaults.d.mts +2 -3
- package/dist/rollups/hourly.d.mts +3 -4
- package/dist/rollups/indexing.d.mts +5 -6
- package/dist/rollups/traffic.d.mts +5 -6
- package/dist/rollups/windows.d.mts +7 -8
- package/dist/schedule.d.mts +6 -7
- package/dist/schema.d.mts +9 -9
- package/dist/scope.d.mts +6 -7
- package/dist/sink.d.mts +9 -10
- package/dist/sinks/in-memory-sink.d.mts +3 -4
- package/dist/snapshot.d.mts +2 -3
- package/dist/source/attached-table.d.mts +4 -5
- package/dist/source/create-sql-query-source.d.mts +2 -3
- package/dist/source/index.d.mts +6 -6
- package/dist/source/source-types.d.mts +7 -8
- package/dist/sql-bind.d.mts +3 -4
- package/dist/sql-fragments.d.mts +5 -6
- package/dist/storage.d.mts +37 -37
- package/dist/sync-config.d.mts +20 -21
- package/dist/vendor/hysnappy-purejs.d.mts +2 -3
- package/dist/vendor/hysnappy-purejs.mjs +1 -1
- package/package.json +12 -10
- package/dist/node_modules/.pnpm/icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergDataSource.d.mts +0 -2
- package/dist/node_modules/.pnpm/icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergQuery.d.mts +0 -2
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/create.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/indexes.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird → hyparquet@1.30.0/node_modules/hyparquet}/types/metadata.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/manifest.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/query.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/s3.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/read.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3/node_modules/squirreling/src/ast.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/snappy.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.metadata.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.read.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.write.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/file.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/loadTable.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/rest.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/create.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/delete.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/fetch.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/json.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/manifest.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/metadata.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/prune.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/deletion-vector.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/puffin.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/roaring.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/s3.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/schema.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sigv4.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/whereFilter.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/utils.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/commit.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/conversions.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/delete-file.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/geospatial.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/manifest-list.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/manifest.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/parquet.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/partition.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/rewrite.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/serde.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/snapshot.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/sort.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage-deletion-vector.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage-position-delete.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stats.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/transform.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/write.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/catalog/file.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/catalog/rest.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/fetch.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/batch.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/batchAdapters.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/dataSource.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/accumulator.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/aggregates.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/batchResults.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/batches.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/execute.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/fold.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/join.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/rowScope.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/scanColumn.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/sort.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/streamingAggregate.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/utils.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/window.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/yield.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/alias.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/batch.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/binary.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/date.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/evaluate.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/math.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/regexp.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/scalar.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/strings.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/index.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/index.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/expression.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/extractTables.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/functions.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/joins.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/parse.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/primary.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/state.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/tokenize.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/types.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/columns.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/plan.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/types.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/bbox.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/equality.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/operations.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/pointRelations.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/primitives.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/segments.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/spatial.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/wkt.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/types.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/aggregates.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/executionErrors.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/functions.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/keywords.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/parseErrors.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/tables.mjs +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SnapshotQueryRunner } from "./snapshot-attach.mjs";
|
|
2
|
-
interface AttachParquetIndexOptions {
|
|
2
|
+
export interface AttachParquetIndexOptions {
|
|
3
3
|
/**
|
|
4
|
-
* Map of table name → list of Parquet URLs. The
|
|
4
|
+
* Map of table name → list of Parquet URLs or local paths. The list may mix monthly
|
|
5
5
|
* compacted files and per-day files — DuckDB will scan all of them with
|
|
6
6
|
* `union_by_name = true`. Empty lists are skipped (no view created).
|
|
7
7
|
*/
|
|
@@ -14,10 +14,9 @@ interface AttachParquetIndexOptions {
|
|
|
14
14
|
*/
|
|
15
15
|
forceDownload?: boolean;
|
|
16
16
|
}
|
|
17
|
-
interface AttachParquetIndexResult {
|
|
17
|
+
export interface AttachParquetIndexResult {
|
|
18
18
|
schema: string;
|
|
19
19
|
/** Tables for which a view was created. */
|
|
20
20
|
tables: string[];
|
|
21
21
|
}
|
|
22
|
-
declare function attachParquetIndex(runner: SnapshotQueryRunner, opts: AttachParquetIndexOptions): Promise<AttachParquetIndexResult>;
|
|
23
|
-
export { AttachParquetIndexOptions, AttachParquetIndexResult, attachParquetIndex };
|
|
22
|
+
export declare function attachParquetIndex(runner: SnapshotQueryRunner, opts: AttachParquetIndexOptions): Promise<AttachParquetIndexResult>;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
const IDENT_RE = /^[A-Z_][\w$]*$/i;
|
|
2
|
+
const REMOTE_URL_RE = /^(?:https?|s3):\/\//i;
|
|
2
3
|
async function attachParquetIndex(runner, opts) {
|
|
3
4
|
const schema = opts.schema ?? "main";
|
|
4
5
|
const forceDownload = opts.forceDownload !== false;
|
|
5
6
|
if (!IDENT_RE.test(schema)) throw new TypeError(`attachParquetIndex: invalid schema identifier ${JSON.stringify(schema)}`);
|
|
6
7
|
for (const table of Object.keys(opts.tables)) if (!IDENT_RE.test(table)) throw new TypeError(`attachParquetIndex: invalid table identifier ${JSON.stringify(table)}`);
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
if (Object.values(opts.tables).some((urls) => urls.some((url) => REMOTE_URL_RE.test(url)))) {
|
|
9
|
+
await runner("LOAD httpfs").catch((cause) => {
|
|
10
|
+
throw new Error("Remote files require the DuckDB httpfs extension. Install httpfs before attaching remote files.", { cause });
|
|
11
|
+
});
|
|
12
|
+
if (forceDownload) await runner("SET force_download=true");
|
|
13
|
+
}
|
|
9
14
|
await runner(`CREATE SCHEMA IF NOT EXISTS ${schema}`);
|
|
10
15
|
const created = [];
|
|
11
16
|
for (const [table, urls] of Object.entries(opts.tables)) {
|
|
@@ -26,7 +26,7 @@ interface R2ConditionalPutOptions {
|
|
|
26
26
|
* Minimal Cloudflare R2 binding shape needed for the manifest CAS loop.
|
|
27
27
|
* Structurally compatible with Cloudflare's `R2Bucket` Workers API.
|
|
28
28
|
*/
|
|
29
|
-
interface R2ManifestBucketLike {
|
|
29
|
+
export interface R2ManifestBucketLike {
|
|
30
30
|
get: (key: string) => Promise<R2ObjectBody | null>;
|
|
31
31
|
put: (key: string, bytes: string | Uint8Array, options?: R2ConditionalPutOptions) => Promise<R2ObjectMetadata | null>;
|
|
32
32
|
list: (options?: {
|
|
@@ -46,7 +46,7 @@ interface R2ManifestBucketLike {
|
|
|
46
46
|
* into metrics (prom-client, console.table, the contention harness) to
|
|
47
47
|
* measure rejection rate and latency under real R2 load.
|
|
48
48
|
*/
|
|
49
|
-
type R2ManifestEvent = {
|
|
49
|
+
export type R2ManifestEvent = {
|
|
50
50
|
kind: 'cas-attempt';
|
|
51
51
|
siteId: string;
|
|
52
52
|
table: TableName;
|
|
@@ -62,7 +62,7 @@ type R2ManifestEvent = {
|
|
|
62
62
|
table: TableName;
|
|
63
63
|
attempts: number;
|
|
64
64
|
};
|
|
65
|
-
interface CreateR2ManifestStoreOptions {
|
|
65
|
+
export interface CreateR2ManifestStoreOptions {
|
|
66
66
|
bucket: R2ManifestBucketLike;
|
|
67
67
|
/** Tenant scope. All shard keys are prefixed `u_<userId>/manifest/...`. */
|
|
68
68
|
userId: string;
|
|
@@ -78,5 +78,4 @@ interface CreateR2ManifestStoreOptions {
|
|
|
78
78
|
*/
|
|
79
79
|
onEvent?: (event: R2ManifestEvent) => void;
|
|
80
80
|
}
|
|
81
|
-
declare function createR2ManifestStore(opts: CreateR2ManifestStoreOptions): ManifestStore;
|
|
82
|
-
export { CreateR2ManifestStoreOptions, R2ManifestBucketLike, R2ManifestEvent, createR2ManifestStore };
|
|
81
|
+
export declare function createR2ManifestStore(opts: CreateR2ManifestStoreOptions): ManifestStore;
|
package/dist/adapters/r2.d.mts
CHANGED
|
@@ -30,7 +30,7 @@ interface R2BucketLike {
|
|
|
30
30
|
list: (options?: R2ListOptions) => Promise<R2ListResult>;
|
|
31
31
|
head: (key: string) => Promise<R2HeadObject | null>;
|
|
32
32
|
}
|
|
33
|
-
interface R2DataSourceOptions {
|
|
33
|
+
export interface R2DataSourceOptions {
|
|
34
34
|
/**
|
|
35
35
|
* R2 bucket binding. Structurally typed — pass a Cloudflare `R2Bucket` or
|
|
36
36
|
* any object with the same get/put/delete/list/head surface.
|
|
@@ -43,5 +43,4 @@ interface R2DataSourceOptions {
|
|
|
43
43
|
*/
|
|
44
44
|
bucketName?: string;
|
|
45
45
|
}
|
|
46
|
-
declare function createR2DataSource(options: R2DataSourceOptions): DataSource;
|
|
47
|
-
export { R2DataSourceOptions, createR2DataSource };
|
|
46
|
+
export declare function createR2DataSource(options: R2DataSourceOptions): DataSource;
|
|
@@ -4,13 +4,13 @@ import { SnapshotIndex } from "../snapshot.mjs";
|
|
|
4
4
|
* this so the function works with AsyncDuckDB (browser DuckDB-WASM) or
|
|
5
5
|
* @duckdb/node-api (Node) without coupling to either.
|
|
6
6
|
*/
|
|
7
|
-
type SnapshotQueryRunner = (sql: string) => Promise<Array<Record<string, unknown>>>;
|
|
8
|
-
interface AttachSnapshotOptions {
|
|
7
|
+
export type SnapshotQueryRunner = (sql: string) => Promise<Array<Record<string, unknown>>>;
|
|
8
|
+
export interface AttachSnapshotOptions {
|
|
9
9
|
/** Index produced by the builder. */
|
|
10
10
|
index: SnapshotIndex;
|
|
11
11
|
/**
|
|
12
|
-
* Map from filename (`cold-YYYY-MM.duckdb`, `hot.duckdb`) to
|
|
13
|
-
*
|
|
12
|
+
* Map from filename (`cold-YYYY-MM.duckdb`, `hot.duckdb`) to a local path
|
|
13
|
+
* or remote HTTP(S)/S3 URL. Must contain an entry for every
|
|
14
14
|
* cold month in `index.cold` and — if `index.hot` — for `hot.duckdb`.
|
|
15
15
|
*/
|
|
16
16
|
attachUrls: Record<string, string>;
|
|
@@ -22,7 +22,7 @@ interface AttachSnapshotOptions {
|
|
|
22
22
|
*/
|
|
23
23
|
forceDownload?: boolean;
|
|
24
24
|
}
|
|
25
|
-
interface AttachSnapshotResult {
|
|
25
|
+
export interface AttachSnapshotResult {
|
|
26
26
|
schema: string;
|
|
27
27
|
/** Aliases we ATTACH'd — e.g. ['cold_2024_09', 'cold_2024_10', 'hot']. */
|
|
28
28
|
aliases: string[];
|
|
@@ -33,6 +33,5 @@ interface AttachSnapshotResult {
|
|
|
33
33
|
* Turns a filename like `cold-2024-09.duckdb` into a valid SQL identifier
|
|
34
34
|
* `cold_2024_09`. `hot.duckdb` → `hot`.
|
|
35
35
|
*/
|
|
36
|
-
declare function snapshotAlias(fileName: string): string;
|
|
37
|
-
declare function attachSnapshotIndex(runner: SnapshotQueryRunner, opts: AttachSnapshotOptions): Promise<AttachSnapshotResult>;
|
|
38
|
-
export { AttachSnapshotOptions, AttachSnapshotResult, SnapshotQueryRunner, attachSnapshotIndex, snapshotAlias };
|
|
36
|
+
export declare function snapshotAlias(fileName: string): string;
|
|
37
|
+
export declare function attachSnapshotIndex(runner: SnapshotQueryRunner, opts: AttachSnapshotOptions): Promise<AttachSnapshotResult>;
|
|
@@ -3,6 +3,7 @@ import { err, ok, unwrapResult } from "gscdump/result";
|
|
|
3
3
|
const YEAR_MONTH_RE = /^\d{4}-\d{2}$/;
|
|
4
4
|
const SCHEMA_IDENT_RE = /^[A-Z_][\w$]*$/i;
|
|
5
5
|
const COLD_FILENAME_RE = /^cold-(\d{4}-\d{2})\.duckdb$/;
|
|
6
|
+
const REMOTE_URL_RE = /^(?:https?|s3):\/\//i;
|
|
6
7
|
function snapshotAlias(fileName) {
|
|
7
8
|
if (fileName === "hot.duckdb") return "hot";
|
|
8
9
|
const m = fileName.match(COLD_FILENAME_RE);
|
|
@@ -27,8 +28,6 @@ async function attachSnapshotIndexResult(runner, opts) {
|
|
|
27
28
|
if (index?.version !== 1) return err(engineErrors.unsupportedSnapshotIndexVersion(index?.version));
|
|
28
29
|
if (!SCHEMA_IDENT_RE.test(schema)) return err(engineErrors.invalidSchemaIdentifier(schema));
|
|
29
30
|
for (const ym of index.cold) if (!YEAR_MONTH_RE.test(ym)) return err(engineErrors.invalidYearMonth(ym));
|
|
30
|
-
await runner("LOAD httpfs").catch(() => void 0);
|
|
31
|
-
if (forceDownload) await runner("SET force_download=true");
|
|
32
31
|
const plan = [];
|
|
33
32
|
for (const ym of index.cold) {
|
|
34
33
|
const fileName = `cold-${ym}.duckdb`;
|
|
@@ -50,6 +49,12 @@ async function attachSnapshotIndexResult(runner, opts) {
|
|
|
50
49
|
url
|
|
51
50
|
});
|
|
52
51
|
}
|
|
52
|
+
if (plan.some(({ url }) => REMOTE_URL_RE.test(url))) {
|
|
53
|
+
await runner("LOAD httpfs").catch((cause) => {
|
|
54
|
+
throw new Error("Remote files require the DuckDB httpfs extension. Install httpfs before attaching remote files.", { cause });
|
|
55
|
+
});
|
|
56
|
+
if (forceDownload) await runner("SET force_download=true");
|
|
57
|
+
}
|
|
53
58
|
const aliases = [];
|
|
54
59
|
for (const { alias, url } of plan) {
|
|
55
60
|
await runner(`ATTACH '${url.replace(/'/g, "''")}' AS ${alias} (READ_ONLY)`);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AnalysisParams } from "./analysis-types.mjs";
|
|
2
|
-
interface AnalysisCoverageRange {
|
|
2
|
+
export interface AnalysisCoverageRange {
|
|
3
3
|
start: string;
|
|
4
4
|
end: string;
|
|
5
5
|
}
|
|
6
|
-
declare function analysisRequestedRange(params: AnalysisParams, onInvalidFilter?: (error: unknown) => void): AnalysisCoverageRange | null;
|
|
7
|
-
export { AnalysisCoverageRange, analysisRequestedRange };
|
|
6
|
+
export declare function analysisRequestedRange(params: AnalysisParams, onInvalidFilter?: (error: unknown) => void): AnalysisCoverageRange | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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 {
|
|
2
|
+
export 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
|
+
export interface AnalysisParams {
|
|
4
4
|
type: AnalysisTool;
|
|
5
5
|
startDate?: string;
|
|
6
6
|
endDate?: string;
|
|
@@ -48,10 +48,9 @@ interface AnalysisParams {
|
|
|
48
48
|
/** GSC slice the analysis is scoped to. Undefined = analyzer runs cross-type (today's behaviour for web-only sites). */
|
|
49
49
|
searchType?: SearchType;
|
|
50
50
|
}
|
|
51
|
-
interface AnalysisResult {
|
|
51
|
+
export interface AnalysisResult {
|
|
52
52
|
results: Record<string, unknown>[];
|
|
53
53
|
meta: Record<string, unknown>;
|
|
54
54
|
}
|
|
55
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 };
|
|
56
|
+
export declare function num(v: unknown): number;
|
|
@@ -2,7 +2,7 @@ import { AnalysisParams } from "../analysis-types.mjs";
|
|
|
2
2
|
import { FileSet } from "../source/source-types.mjs";
|
|
3
3
|
import { Analyzer, BuildContext, RequiredCapability, SqlExtraQuery } from "./types.mjs";
|
|
4
4
|
import { BuilderState } from "gscdump/query";
|
|
5
|
-
interface SqlPlanSpec {
|
|
5
|
+
export interface SqlPlanSpec {
|
|
6
6
|
sql: string;
|
|
7
7
|
params: unknown[];
|
|
8
8
|
current: FileSet;
|
|
@@ -10,15 +10,15 @@ interface SqlPlanSpec {
|
|
|
10
10
|
extraFiles?: Record<string, FileSet>;
|
|
11
11
|
extraQueries?: SqlExtraQuery[];
|
|
12
12
|
}
|
|
13
|
-
interface ReduceCtx<InputRow> {
|
|
13
|
+
export interface ReduceCtx<InputRow> {
|
|
14
14
|
/** Extra SQL-query results keyed by `SqlExtraQuery.name` (SQL path only). */
|
|
15
15
|
extras?: Record<string, InputRow[]>;
|
|
16
16
|
}
|
|
17
|
-
type Reducer<Params, InputRow, Result> = (rows: InputRow[] | Record<string, InputRow[]>, params: Params, ctx: ReduceCtx<InputRow>) => {
|
|
17
|
+
export type Reducer<Params, InputRow, Result> = (rows: InputRow[] | Record<string, InputRow[]>, params: Params, ctx: ReduceCtx<InputRow>) => {
|
|
18
18
|
results: Result;
|
|
19
19
|
meta?: Record<string, unknown>;
|
|
20
20
|
};
|
|
21
|
-
interface DefineAnalyzerOptions<Params extends AnalysisParams, InputRow, Result> {
|
|
21
|
+
export interface DefineAnalyzerOptions<Params extends AnalysisParams, InputRow, Result> {
|
|
22
22
|
id: string;
|
|
23
23
|
/**
|
|
24
24
|
* Shared reducer used by both SQL and row paths. Use this when the
|
|
@@ -39,10 +39,9 @@ interface DefineAnalyzerOptions<Params extends AnalysisParams, InputRow, Result>
|
|
|
39
39
|
/** Capabilities required by the row plan. Defaults to `[]`. */
|
|
40
40
|
rowsRequires?: readonly RequiredCapability[];
|
|
41
41
|
}
|
|
42
|
-
interface DefinedAnalyzer {
|
|
42
|
+
export interface DefinedAnalyzer {
|
|
43
43
|
id: string;
|
|
44
44
|
sql?: Analyzer;
|
|
45
45
|
rows?: Analyzer;
|
|
46
46
|
}
|
|
47
|
-
declare function defineAnalyzer<Params extends AnalysisParams, InputRow, Result>(opts: DefineAnalyzerOptions<Params, InputRow, Result>): DefinedAnalyzer;
|
|
48
|
-
export { DefineAnalyzerOptions, DefinedAnalyzer, ReduceCtx, Reducer, SqlPlanSpec, defineAnalyzer };
|
|
47
|
+
export declare function defineAnalyzer<Params extends AnalysisParams, InputRow, Result>(opts: DefineAnalyzerOptions<Params, InputRow, Result>): DefinedAnalyzer;
|
|
@@ -3,7 +3,7 @@ import { AnalysisQuerySource } from "../source/source-types.mjs";
|
|
|
3
3
|
import { RequiredCapability } from "./types.mjs";
|
|
4
4
|
import { EngineError } from "../errors.mjs";
|
|
5
5
|
import { AnalyzerRegistry } from "./registry.mjs";
|
|
6
|
-
declare class AnalyzerCapabilityError extends Error {
|
|
6
|
+
export declare class AnalyzerCapabilityError extends Error {
|
|
7
7
|
readonly tool: string;
|
|
8
8
|
readonly missing: readonly RequiredCapability[];
|
|
9
9
|
readonly engineError: EngineError;
|
|
@@ -13,5 +13,4 @@ declare class AnalyzerCapabilityError extends Error {
|
|
|
13
13
|
* Run an analyzer against a generic `AnalysisQuerySource`. The registry is
|
|
14
14
|
* an explicit parameter — callers build one via `createAnalyzerRegistry`.
|
|
15
15
|
*/
|
|
16
|
-
declare function runAnalyzerFromSource(source: AnalysisQuerySource, params: AnalysisParams, registry: AnalyzerRegistry): Promise<AnalysisResult>;
|
|
17
|
-
export { AnalyzerCapabilityError, runAnalyzerFromSource };
|
|
16
|
+
export declare function runAnalyzerFromSource(source: AnalysisQuerySource, params: AnalysisParams, registry: AnalyzerRegistry): Promise<AnalysisResult>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Analyzer } from "./types.mjs";
|
|
2
2
|
import { DefinedAnalyzer } from "./define.mjs";
|
|
3
|
-
interface AnalyzerVariants {
|
|
3
|
+
export interface AnalyzerVariants {
|
|
4
4
|
sql?: Analyzer;
|
|
5
5
|
rows?: Analyzer;
|
|
6
6
|
}
|
|
7
|
-
interface AnalyzerRegistryInit {
|
|
7
|
+
export interface AnalyzerRegistryInit {
|
|
8
8
|
/**
|
|
9
9
|
* Preferred for in-tree composition: pass `DefinedAnalyzer[]` directly so
|
|
10
10
|
* SQL/row variants can never drift apart from their `defineAnalyzer` site.
|
|
@@ -15,7 +15,7 @@ interface AnalyzerRegistryInit {
|
|
|
15
15
|
/** Flat-array path retained for narrow tree-shaken registry composition. */
|
|
16
16
|
sql?: readonly Analyzer[];
|
|
17
17
|
}
|
|
18
|
-
interface AnalyzerRegistry {
|
|
18
|
+
export interface AnalyzerRegistry {
|
|
19
19
|
listAnalyzerIds: () => readonly string[];
|
|
20
20
|
getAnalyzerVariants: (id: string) => AnalyzerVariants | undefined;
|
|
21
21
|
resolveAnalyzer: (id: string, sourceSupportsSql: boolean) => Analyzer | undefined;
|
|
@@ -29,5 +29,4 @@ interface AnalyzerRegistry {
|
|
|
29
29
|
* No global state; call this once per logical use (typically at startup
|
|
30
30
|
* or per-request in a worker).
|
|
31
31
|
*/
|
|
32
|
-
declare function createAnalyzerRegistry(init?: AnalyzerRegistryInit): AnalyzerRegistry;
|
|
33
|
-
export { AnalyzerRegistry, AnalyzerRegistryInit, AnalyzerVariants, createAnalyzerRegistry };
|
|
32
|
+
export declare function createAnalyzerRegistry(init?: AnalyzerRegistryInit): AnalyzerRegistry;
|
|
@@ -12,8 +12,8 @@ import { BuilderState } from "gscdump/query";
|
|
|
12
12
|
* on `SourceCapabilities`. Single source of truth — adding a new capability
|
|
13
13
|
* is one line in `SourceCapabilities`.
|
|
14
14
|
*/
|
|
15
|
-
type RequiredCapability = 'executeSql' | keyof SourceCapabilities;
|
|
16
|
-
interface SqlExtraQuery {
|
|
15
|
+
export type RequiredCapability = 'executeSql' | keyof SourceCapabilities;
|
|
16
|
+
export interface SqlExtraQuery {
|
|
17
17
|
name: string;
|
|
18
18
|
sql: string;
|
|
19
19
|
params: unknown[];
|
|
@@ -22,7 +22,7 @@ interface SqlExtraQuery {
|
|
|
22
22
|
* SQL-native plan: SQL string + placeholders, with optional extra file sets
|
|
23
23
|
* and follow-up queries.
|
|
24
24
|
*/
|
|
25
|
-
interface SqlPlan {
|
|
25
|
+
export interface SqlPlan {
|
|
26
26
|
kind: 'sql';
|
|
27
27
|
sql: string;
|
|
28
28
|
params: unknown[];
|
|
@@ -31,7 +31,7 @@ interface SqlPlan {
|
|
|
31
31
|
extraFiles?: Record<string, FileSet>;
|
|
32
32
|
extraQueries?: SqlExtraQuery[];
|
|
33
33
|
}
|
|
34
|
-
interface TypedRowQuery<T extends Row = Row> {
|
|
34
|
+
export interface TypedRowQuery<T extends Row = Row> {
|
|
35
35
|
state: BuilderState;
|
|
36
36
|
/** Optional type tag for downstream narrowing. */
|
|
37
37
|
rowType?: (row: Row) => T;
|
|
@@ -41,11 +41,11 @@ interface TypedRowQuery<T extends Row = Row> {
|
|
|
41
41
|
* dispatcher runs each against a source's `queryRows` and hands the row
|
|
42
42
|
* collection to `reduce`.
|
|
43
43
|
*/
|
|
44
|
-
interface RowQueriesPlan {
|
|
44
|
+
export interface RowQueriesPlan {
|
|
45
45
|
kind: 'rows';
|
|
46
46
|
queries: Record<string, TypedRowQuery>;
|
|
47
47
|
}
|
|
48
|
-
type Plan = SqlPlan | RowQueriesPlan;
|
|
48
|
+
export type Plan = SqlPlan | RowQueriesPlan;
|
|
49
49
|
/**
|
|
50
50
|
* Plan-build context. Surfaced from the source at dispatch time so analyzers
|
|
51
51
|
* that compose SQL from a typed `BuilderState` can pick up the right dialect
|
|
@@ -58,7 +58,7 @@ type Plan = SqlPlan | RowQueriesPlan;
|
|
|
58
58
|
* declaration (`'adapter'` in `requires`) is the runtime guarantee; the
|
|
59
59
|
* helper makes the failure mode loud if the contract is broken.
|
|
60
60
|
*/
|
|
61
|
-
interface BuildContext {
|
|
61
|
+
export interface BuildContext {
|
|
62
62
|
adapter?: ResolverAdapter<any>;
|
|
63
63
|
siteId?: string | number;
|
|
64
64
|
}
|
|
@@ -67,8 +67,8 @@ interface BuildContext {
|
|
|
67
67
|
* but the dispatcher handed it a context without one. Centralizes the assert
|
|
68
68
|
* so analyzers don't repeat `ctx.adapter!` with explanatory comments.
|
|
69
69
|
*/
|
|
70
|
-
declare function requireAdapter(ctx: BuildContext, analyzerId: string): ResolverAdapter<any>;
|
|
71
|
-
interface ReduceContext<TRow extends Row = Row> {
|
|
70
|
+
export declare function requireAdapter(ctx: BuildContext, analyzerId: string): ResolverAdapter<any>;
|
|
71
|
+
export interface ReduceContext<TRow extends Row = Row> {
|
|
72
72
|
params: AnalysisParams;
|
|
73
73
|
/** Extra SQL-query results keyed by `SqlExtraQuery.name`. */
|
|
74
74
|
extras?: Record<string, TRow[]>;
|
|
@@ -79,7 +79,7 @@ interface ReduceContext<TRow extends Row = Row> {
|
|
|
79
79
|
* when their reducer assumes specific columns exist — catches drift between
|
|
80
80
|
* `build` (SELECT list) and `reduce` (column access) at compile time.
|
|
81
81
|
*/
|
|
82
|
-
interface Analyzer<P extends AnalysisParams = AnalysisParams, R = unknown, TRow extends Row = Row> {
|
|
82
|
+
export interface Analyzer<P extends AnalysisParams = AnalysisParams, R = unknown, TRow extends Row = Row> {
|
|
83
83
|
/** Stable tool id (e.g. `striking-distance`, `opportunity`). */
|
|
84
84
|
id: string;
|
|
85
85
|
/** Capabilities a host source must provide. */
|
|
@@ -91,5 +91,4 @@ interface Analyzer<P extends AnalysisParams = AnalysisParams, R = unknown, TRow
|
|
|
91
91
|
results: R;
|
|
92
92
|
meta?: Record<string, unknown>;
|
|
93
93
|
};
|
|
94
|
-
}
|
|
95
|
-
export { Analyzer, BuildContext, Plan, ReduceContext, RequiredCapability, RowQueriesPlan, SqlExtraQuery, SqlPlan, TypedRowQuery, requireAdapter };
|
|
94
|
+
}
|
package/dist/arrow-utils.d.mts
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
* Arrow → row conversion shared by every engine adapter.
|
|
3
3
|
*
|
|
4
4
|
* DuckDB returns Arrow tables; drizzle / consumers want plain row objects.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Read Arrow vectors directly to avoid creating a proxy for every row.
|
|
6
|
+
* Simpler table wrappers can supply row objects through `toArray()`.
|
|
7
7
|
*/
|
|
8
|
-
interface ArrowTableLike {
|
|
8
|
+
export interface ArrowTableLike {
|
|
9
9
|
toArray: () => Array<Record<string, unknown> & {
|
|
10
10
|
toJSON?: () => Record<string, unknown>;
|
|
11
11
|
}>;
|
|
12
12
|
}
|
|
13
|
-
declare function arrowToRows(result: unknown): Record<string, unknown>[];
|
|
14
|
-
export { ArrowTableLike, arrowToRows };
|
|
13
|
+
export declare function arrowToRows(result: unknown): Record<string, unknown>[];
|
package/dist/arrow-utils.mjs
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
function arrowToRows(result) {
|
|
2
|
+
const table = result;
|
|
3
|
+
if (!Array.isArray(table) && typeof table?.getChildAt === "function" && Array.isArray(table.schema?.fields) && Number.isInteger(table.numRows) && table.numRows >= 0) {
|
|
4
|
+
const rows = Array.from({ length: table.numRows }, () => ({}));
|
|
5
|
+
for (let columnIndex = 0; columnIndex < table.schema.fields.length; columnIndex++) {
|
|
6
|
+
const name = table.schema.fields[columnIndex].name;
|
|
7
|
+
const column = table.getChildAt(columnIndex);
|
|
8
|
+
for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) rows[rowIndex][name] = column.get(rowIndex);
|
|
9
|
+
}
|
|
10
|
+
return rows;
|
|
11
|
+
}
|
|
2
12
|
const r = result;
|
|
3
13
|
const arr = Array.isArray(r) ? r : typeof r?.toArray === "function" ? r.toArray() : [];
|
|
4
14
|
if (!arr || arr.length === 0) return [];
|
package/dist/coerce.d.mts
CHANGED
package/dist/compaction.d.mts
CHANGED
|
@@ -5,10 +5,9 @@ import "./storage.mjs";
|
|
|
5
5
|
* - d7 → d30 once the entire weekly bucket sits behind `d7` days (default 30).
|
|
6
6
|
* - d30 → d90 once the entire monthly bucket sits behind `d30` days (default 90).
|
|
7
7
|
*/
|
|
8
|
-
interface CompactionThresholds {
|
|
8
|
+
export interface CompactionThresholds {
|
|
9
9
|
raw?: number;
|
|
10
10
|
d7?: number;
|
|
11
11
|
d30?: number;
|
|
12
12
|
}
|
|
13
|
-
declare function enumeratePartitions(startDate: string, endDate: string): string[];
|
|
14
|
-
export { CompactionThresholds, enumeratePartitions };
|
|
13
|
+
export declare function enumeratePartitions(startDate: string, endDate: string): string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TableName } from "@gscdump/contracts";
|
|
2
|
-
declare const pages: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
2
|
+
export declare const pages: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
3
3
|
name: "pages";
|
|
4
4
|
schema: undefined;
|
|
5
5
|
columns: {
|
|
@@ -81,7 +81,7 @@ declare const pages: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
|
81
81
|
};
|
|
82
82
|
dialect: "pg";
|
|
83
83
|
}>;
|
|
84
|
-
declare const queries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
84
|
+
export declare const queries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
85
85
|
name: "queries";
|
|
86
86
|
schema: undefined;
|
|
87
87
|
columns: {
|
|
@@ -163,7 +163,7 @@ declare const queries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
|
163
163
|
};
|
|
164
164
|
dialect: "pg";
|
|
165
165
|
}>;
|
|
166
|
-
declare const countries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
166
|
+
export declare const countries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
167
167
|
name: "countries";
|
|
168
168
|
schema: undefined;
|
|
169
169
|
columns: {
|
|
@@ -245,7 +245,7 @@ declare const countries: import("drizzle-orm/pg-core/table").PgTableWithColumns<
|
|
|
245
245
|
};
|
|
246
246
|
dialect: "pg";
|
|
247
247
|
}>;
|
|
248
|
-
declare const page_queries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
248
|
+
export declare const page_queries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
249
249
|
name: "page_queries";
|
|
250
250
|
schema: undefined;
|
|
251
251
|
columns: {
|
|
@@ -358,7 +358,7 @@ declare const page_queries: import("drizzle-orm/pg-core/table").PgTableWithColum
|
|
|
358
358
|
* - `clicks_{device}` / `impressions_{device}` / `sum_position_{device}`:
|
|
359
359
|
* device breakdown pivoted from a GSC `['date','device']` query.
|
|
360
360
|
*/
|
|
361
|
-
declare const dates: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
361
|
+
export declare const dates: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
362
362
|
name: "dates";
|
|
363
363
|
schema: undefined;
|
|
364
364
|
columns: {
|
|
@@ -575,7 +575,7 @@ declare const dates: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
|
575
575
|
};
|
|
576
576
|
dialect: "pg";
|
|
577
577
|
}>;
|
|
578
|
-
declare const search_appearance: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
578
|
+
export declare const search_appearance: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
579
579
|
name: "search_appearance";
|
|
580
580
|
schema: undefined;
|
|
581
581
|
columns: {
|
|
@@ -657,7 +657,7 @@ declare const search_appearance: import("drizzle-orm/pg-core/table").PgTableWith
|
|
|
657
657
|
};
|
|
658
658
|
dialect: "pg";
|
|
659
659
|
}>;
|
|
660
|
-
declare const search_appearance_pages: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
660
|
+
export declare const search_appearance_pages: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
661
661
|
name: "search_appearance_pages";
|
|
662
662
|
schema: undefined;
|
|
663
663
|
columns: {
|
|
@@ -754,7 +754,7 @@ declare const search_appearance_pages: import("drizzle-orm/pg-core/table").PgTab
|
|
|
754
754
|
};
|
|
755
755
|
dialect: "pg";
|
|
756
756
|
}>;
|
|
757
|
-
declare const search_appearance_queries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
757
|
+
export declare const search_appearance_queries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
758
758
|
name: "search_appearance_queries";
|
|
759
759
|
schema: undefined;
|
|
760
760
|
columns: {
|
|
@@ -851,7 +851,7 @@ declare const search_appearance_queries: import("drizzle-orm/pg-core/table").PgT
|
|
|
851
851
|
};
|
|
852
852
|
dialect: "pg";
|
|
853
853
|
}>;
|
|
854
|
-
declare const search_appearance_page_queries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
854
|
+
export declare const search_appearance_page_queries: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
855
855
|
name: "search_appearance_page_queries";
|
|
856
856
|
schema: undefined;
|
|
857
857
|
columns: {
|
|
@@ -963,7 +963,7 @@ declare const search_appearance_page_queries: import("drizzle-orm/pg-core/table"
|
|
|
963
963
|
};
|
|
964
964
|
dialect: "pg";
|
|
965
965
|
}>;
|
|
966
|
-
declare const hourly_pages: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
966
|
+
export declare const hourly_pages: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
967
967
|
name: "hourly_pages";
|
|
968
968
|
schema: undefined;
|
|
969
969
|
columns: {
|
|
@@ -1060,7 +1060,7 @@ declare const hourly_pages: import("drizzle-orm/pg-core/table").PgTableWithColum
|
|
|
1060
1060
|
};
|
|
1061
1061
|
dialect: "pg";
|
|
1062
1062
|
}>;
|
|
1063
|
-
declare const drizzleSchema: {
|
|
1063
|
+
export declare const drizzleSchema: {
|
|
1064
1064
|
pages: import("drizzle-orm/pg-core/table").PgTableWithColumns<{
|
|
1065
1065
|
name: "pages";
|
|
1066
1066
|
schema: undefined;
|
|
@@ -2107,10 +2107,9 @@ declare const drizzleSchema: {
|
|
|
2107
2107
|
dialect: "pg";
|
|
2108
2108
|
}>;
|
|
2109
2109
|
};
|
|
2110
|
-
type DrizzleSchema = typeof drizzleSchema;
|
|
2111
|
-
declare const TABLE_METADATA: Record<TableName, {
|
|
2110
|
+
export type DrizzleSchema = typeof drizzleSchema;
|
|
2111
|
+
export declare const TABLE_METADATA: Record<TableName, {
|
|
2112
2112
|
sortKey: string[];
|
|
2113
2113
|
clusterKey: string[];
|
|
2114
2114
|
version: number;
|
|
2115
|
-
}>;
|
|
2116
|
-
export { DrizzleSchema, TABLE_METADATA, countries, dates, drizzleSchema, hourly_pages, page_queries, pages, queries, search_appearance, search_appearance_page_queries, search_appearance_pages, search_appearance_queries };
|
|
2115
|
+
}>;
|
package/dist/duckdb.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ParquetCodec, QueryExecutor, Row } from "./storage.mjs";
|
|
2
|
-
interface DuckDBHandle {
|
|
2
|
+
export interface DuckDBHandle {
|
|
3
3
|
query: (sql: string, params?: unknown[]) => Promise<Row[]>;
|
|
4
4
|
registerFileBuffer: (name: string, bytes: Uint8Array) => Promise<void>;
|
|
5
5
|
copyFileToBuffer: (name: string) => Promise<Uint8Array>;
|
|
@@ -11,10 +11,10 @@ interface DuckDBHandle {
|
|
|
11
11
|
*/
|
|
12
12
|
makeTempPath: (ext: string) => string;
|
|
13
13
|
}
|
|
14
|
-
interface DuckDBFactory {
|
|
14
|
+
export interface DuckDBFactory {
|
|
15
15
|
getDuckDB: () => Promise<DuckDBHandle>;
|
|
16
16
|
}
|
|
17
|
-
interface DuckDBReadOptions {
|
|
17
|
+
export interface DuckDBReadOptions {
|
|
18
18
|
/**
|
|
19
19
|
* Maximum non-URI parquet reads held in flight while registering DuckDB
|
|
20
20
|
* buffers. Defaults to 16; callers handling unusually large files can lower
|
|
@@ -22,6 +22,5 @@ interface DuckDBReadOptions {
|
|
|
22
22
|
*/
|
|
23
23
|
bufferReadConcurrency?: number;
|
|
24
24
|
}
|
|
25
|
-
declare function createDuckDBCodec(factory: DuckDBFactory, options?: DuckDBReadOptions): ParquetCodec;
|
|
26
|
-
declare function createDuckDBExecutor(factory: DuckDBFactory, options?: DuckDBReadOptions): QueryExecutor;
|
|
27
|
-
export { DuckDBFactory, DuckDBHandle, DuckDBReadOptions, createDuckDBCodec, createDuckDBExecutor };
|
|
25
|
+
export declare function createDuckDBCodec(factory: DuckDBFactory, options?: DuckDBReadOptions): ParquetCodec;
|
|
26
|
+
export declare function createDuckDBExecutor(factory: DuckDBFactory, options?: DuckDBReadOptions): QueryExecutor;
|
package/dist/duckdb.mjs
CHANGED
|
@@ -156,11 +156,15 @@ function createDuckDBExecutor(factory, options = {}) {
|
|
|
156
156
|
const uri = dataSource.uri?.(key);
|
|
157
157
|
if (uri !== void 0) resolved.push(uri);
|
|
158
158
|
else {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
159
|
+
let buffered = bufferedByName.get(key);
|
|
160
|
+
if (!buffered) {
|
|
161
|
+
buffered = {
|
|
162
|
+
key,
|
|
163
|
+
name: db.makeTempPath("parquet")
|
|
164
|
+
};
|
|
165
|
+
bufferedByName.set(key, buffered);
|
|
166
|
+
}
|
|
167
|
+
resolved.push(buffered.name);
|
|
164
168
|
}
|
|
165
169
|
}
|
|
166
170
|
placeholders[name] = resolved;
|
package/dist/engine.d.mts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { DataSource } from "../storage.mjs";
|
|
2
2
|
import { TenantCtx } from "@gscdump/contracts";
|
|
3
|
-
interface EmptyTypesDoc {
|
|
3
|
+
export interface EmptyTypesDoc {
|
|
4
4
|
version: 1;
|
|
5
5
|
/** SearchType strings detected as empty for this (user, site). */
|
|
6
6
|
emptyTypes: string[];
|
|
7
7
|
/** When each type was last marked empty (unix ms). Helps debug stale skips. */
|
|
8
8
|
markedAt: Record<string, number>;
|
|
9
9
|
}
|
|
10
|
-
interface EmptyTypesStore {
|
|
10
|
+
export interface EmptyTypesStore {
|
|
11
11
|
load: (ctx: TenantCtx) => Promise<EmptyTypesDoc>;
|
|
12
12
|
/** Add types to the empty set, preserving existing markers. No-op if all already present. */
|
|
13
13
|
mark: (ctx: TenantCtx, types: readonly string[], now?: number) => Promise<EmptyTypesDoc>;
|
|
14
14
|
/** Remove types from the empty set. Returns the updated doc. */
|
|
15
15
|
clear: (ctx: TenantCtx, types: readonly string[]) => Promise<EmptyTypesDoc>;
|
|
16
16
|
}
|
|
17
|
-
interface CreateEmptyTypesStoreOptions {
|
|
17
|
+
export interface CreateEmptyTypesStoreOptions {
|
|
18
18
|
dataSource: DataSource;
|
|
19
19
|
now?: () => number;
|
|
20
20
|
}
|
|
21
|
-
declare function createEmptyTypesStore(opts: CreateEmptyTypesStoreOptions): EmptyTypesStore;
|
|
22
|
-
export { CreateEmptyTypesStoreOptions, EmptyTypesDoc, EmptyTypesStore, createEmptyTypesStore };
|
|
21
|
+
export declare function createEmptyTypesStore(opts: CreateEmptyTypesStoreOptions): EmptyTypesStore;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataSource } from "../storage.mjs";
|
|
2
2
|
import { TenantCtx } from "@gscdump/contracts";
|
|
3
|
-
interface IndexingMetadataRecord {
|
|
3
|
+
export interface IndexingMetadataRecord {
|
|
4
4
|
url: string;
|
|
5
5
|
capturedAt: string;
|
|
6
6
|
/** ISO-8601 notifyTime of the latest `URL_UPDATED` notification we've seen. */
|
|
@@ -9,18 +9,17 @@ interface IndexingMetadataRecord {
|
|
|
9
9
|
latestRemoveAt?: string;
|
|
10
10
|
raw?: unknown;
|
|
11
11
|
}
|
|
12
|
-
interface IndexingMetadataIndex {
|
|
12
|
+
export interface IndexingMetadataIndex {
|
|
13
13
|
version: 1;
|
|
14
14
|
records: Record<string, IndexingMetadataRecord>;
|
|
15
15
|
}
|
|
16
|
-
interface IndexingMetadataStore {
|
|
16
|
+
export interface IndexingMetadataStore {
|
|
17
17
|
writeBatch: (ctx: TenantCtx, records: readonly IndexingMetadataRecord[]) => Promise<void>;
|
|
18
18
|
loadIndex: (ctx: TenantCtx) => Promise<IndexingMetadataIndex>;
|
|
19
19
|
getLatest: (ctx: TenantCtx, url: string) => Promise<IndexingMetadataRecord | undefined>;
|
|
20
20
|
}
|
|
21
|
-
interface CreateIndexingMetadataStoreOptions {
|
|
21
|
+
export interface CreateIndexingMetadataStoreOptions {
|
|
22
22
|
dataSource: DataSource;
|
|
23
23
|
hash?: (url: string) => string;
|
|
24
24
|
}
|
|
25
|
-
declare function createIndexingMetadataStore(opts: CreateIndexingMetadataStoreOptions): IndexingMetadataStore;
|
|
26
|
-
export { CreateIndexingMetadataStoreOptions, IndexingMetadataIndex, IndexingMetadataRecord, IndexingMetadataStore, createIndexingMetadataStore };
|
|
25
|
+
export declare function createIndexingMetadataStore(opts: CreateIndexingMetadataStoreOptions): IndexingMetadataStore;
|