@gscdump/engine 3.5.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -18
- package/dist/THIRD-PARTY-LICENSES.md +2 -2
- package/dist/adapters/duckdb-node.d.mts +4 -4
- package/dist/adapters/duckdb-node.mjs +103 -77
- package/dist/adapters/filesystem.d.mts +6 -7
- package/dist/adapters/filesystem.mjs +11 -6
- package/dist/adapters/hyparquet.d.mts +9 -10
- package/dist/adapters/hyparquet.mjs +84 -44
- package/dist/adapters/node-harness.d.mts +3 -4
- package/dist/adapters/parquet-attach.d.mts +4 -5
- package/dist/adapters/parquet-attach.mjs +7 -2
- package/dist/adapters/r2-manifest.d.mts +4 -5
- package/dist/adapters/r2.d.mts +2 -3
- package/dist/adapters/snapshot-attach.d.mts +7 -8
- package/dist/adapters/snapshot-attach.mjs +7 -2
- package/dist/analysis-range.d.mts +2 -3
- package/dist/analysis-types.d.mts +4 -5
- package/dist/analyzer/define.d.mts +6 -7
- package/dist/analyzer/dispatch.d.mts +2 -3
- package/dist/analyzer/registry.d.mts +4 -5
- package/dist/analyzer/types.d.mts +11 -12
- package/dist/arrow-utils.d.mts +4 -5
- package/dist/arrow-utils.mjs +10 -0
- package/dist/coerce.d.mts +1 -2
- package/dist/compaction.d.mts +2 -3
- package/dist/drizzle-schema.d.mts +14 -15
- package/dist/duckdb.d.mts +5 -6
- package/dist/duckdb.mjs +9 -5
- package/dist/engine.d.mts +1 -2
- package/dist/entities/empty-types.d.mts +4 -5
- package/dist/entities/indexing-metadata.d.mts +5 -6
- package/dist/entities/inspection.d.mts +9 -10
- package/dist/entities/query-dim.d.mts +7 -7
- package/dist/entities/sitemap-shared.d.mts +26 -27
- package/dist/entities/sitemap-write.d.mts +1 -2
- package/dist/entities/sitemap.d.mts +1 -2
- package/dist/entity-keys.d.mts +28 -29
- package/dist/errors.d.mts +5 -6
- package/dist/iceberg/append-sink.d.mts +2 -3
- package/dist/iceberg/catalog.d.mts +10 -10
- package/dist/iceberg/catalog.mjs +2 -2
- package/dist/iceberg/overwrite-writer.d.mts +17 -18
- package/dist/iceberg/schema.d.mts +16 -16
- package/dist/ingest-accumulator.d.mts +8 -9
- package/dist/ingest.d.mts +15 -12
- package/dist/ingest.mjs +22 -6
- package/dist/layout.d.mts +4 -5
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/datapage.mjs +1 -1
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/indexes.mjs +1 -1
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/metadata.mjs +1 -1
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/types.d.mts +2 -3
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/types/index.d.mts +2 -3
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/assemble.mjs +3 -144
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/bloom.mjs +3 -58
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/column.mjs +8 -129
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/convert.mjs +3 -118
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/datapage.mjs +6 -144
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/delta.mjs +2 -65
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/encoding.mjs +2 -76
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/filter.mjs +4 -212
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/geoparquet.mjs +1 -24
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/index.mjs +3 -3
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/indexes.mjs +5 -32
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/metadata.mjs +7 -241
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/node.mjs +1 -5
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/plain.mjs +1 -79
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/plan.mjs +6 -375
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/read.mjs +6 -77
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/rowgroup.mjs +7 -175
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/scan.mjs +5 -73
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/schema.mjs +1 -22
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/snappy.mjs +1 -68
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/thrift.mjs +1 -86
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/types.d.mts +2 -28
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/utils.mjs +1 -31
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/variant.mjs +3 -228
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/wkb.mjs +1 -94
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/types/index.d.mts +2 -52
- package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/types/node.d.mts +2 -2
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/assemble.mjs +144 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/bloom.mjs +124 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/column.mjs +129 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/constants.mjs +80 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/convert.mjs +118 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/datapage.mjs +144 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/delta.mjs +65 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/encoding.mjs +76 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/filter.mjs +212 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/geoparquet.mjs +24 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/index.mjs +8 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/indexes.mjs +32 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/metadata.mjs +241 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/node.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/plain.mjs +79 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/plan.mjs +375 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/query.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/read.mjs +81 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/rowgroup.mjs +175 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/scan.mjs +74 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/schema.mjs +75 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/snappy.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/thrift.mjs +86 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/types.d.mts +25 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/utils.mjs +32 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/variant.mjs +228 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/wkb.mjs +94 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/xxhash.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/index.d.mts +58 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/node.d.mts +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/scan.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/utils.d.mts +1 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/index.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/read.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/icebergDataSource.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/icebergQuery.mjs +1 -1
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/types.d.mts +17 -18
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/create.d.mts +1 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/index.d.mts +1 -1
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/manifest.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/metadata.d.mts +1 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/read.d.mts +1 -1
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/s3.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergDataSource.d.mts +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergQuery.d.mts +2 -0
- package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/write/write.d.mts +2 -3
- package/dist/node_modules/.pnpm/squirreling@0.16.4/node_modules/squirreling/src/ast.d.mts +1 -0
- package/dist/parquet-plan.d.mts +5 -6
- package/dist/period/index.d.mts +8 -8
- package/dist/profile.d.mts +3 -3
- package/dist/report/define.d.mts +1 -2
- package/dist/report/hash.d.mts +3 -4
- package/dist/report/registry.d.mts +3 -4
- package/dist/report/types.d.mts +22 -23
- package/dist/resolver/adapter.d.mts +2 -3
- package/dist/resolver/canonical-source.d.mts +1 -2
- package/dist/resolver/compile.d.mts +12 -8
- package/dist/resolver/compile.mjs +7 -3
- package/dist/resolver/datasets.d.mts +9 -9
- package/dist/resolver/extras-overlay.d.mts +2 -3
- package/dist/resolver/filter-utils.d.mts +7 -7
- package/dist/resolver/fragments.d.mts +3 -4
- package/dist/resolver/pg-adapter.d.mts +7 -8
- package/dist/resolver/run-query.d.mts +16 -17
- package/dist/resolver/run-query.mjs +16 -15
- package/dist/resolver/schema-drift.d.mts +2 -3
- package/dist/resolver/types.d.mts +8 -9
- package/dist/rollups/canonical.d.mts +4 -5
- package/dist/rollups/core.d.mts +12 -13
- package/dist/rollups/defaults.d.mts +2 -3
- package/dist/rollups/hourly.d.mts +3 -4
- package/dist/rollups/indexing.d.mts +5 -6
- package/dist/rollups/traffic.d.mts +5 -6
- package/dist/rollups/windows.d.mts +7 -8
- package/dist/schedule.d.mts +6 -7
- package/dist/schema.d.mts +9 -9
- package/dist/scope.d.mts +6 -7
- package/dist/sink.d.mts +9 -10
- package/dist/sinks/in-memory-sink.d.mts +3 -4
- package/dist/snapshot.d.mts +2 -3
- package/dist/source/attached-table.d.mts +4 -5
- package/dist/source/create-sql-query-source.d.mts +2 -3
- package/dist/source/index.d.mts +6 -6
- package/dist/source/source-types.d.mts +7 -8
- package/dist/sql-bind.d.mts +3 -4
- package/dist/sql-fragments.d.mts +5 -6
- package/dist/storage.d.mts +37 -37
- package/dist/sync-config.d.mts +20 -21
- package/dist/vendor/hysnappy-purejs.d.mts +2 -3
- package/dist/vendor/hysnappy-purejs.mjs +1 -1
- package/package.json +12 -10
- package/dist/node_modules/.pnpm/icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergDataSource.d.mts +0 -2
- package/dist/node_modules/.pnpm/icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergQuery.d.mts +0 -2
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/create.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/indexes.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird → hyparquet@1.30.0/node_modules/hyparquet}/types/metadata.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/manifest.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/query.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/s3.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/read.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3/node_modules/squirreling/src/ast.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/snappy.d.mts} +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.metadata.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.read.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.write.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/file.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/loadTable.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/rest.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/create.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/delete.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/fetch.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/json.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/manifest.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/metadata.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/prune.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/deletion-vector.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/puffin.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/roaring.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/s3.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/schema.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sigv4.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/whereFilter.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/utils.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/commit.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/conversions.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/delete-file.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/geospatial.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/manifest-list.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/manifest.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/parquet.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/partition.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/rewrite.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/serde.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/snapshot.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/sort.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage-deletion-vector.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage-position-delete.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stats.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/transform.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/write.mjs +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/catalog/file.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/catalog/rest.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/fetch.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/batch.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/batchAdapters.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/dataSource.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/accumulator.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/aggregates.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/batchResults.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/batches.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/execute.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/fold.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/join.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/rowScope.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/scanColumn.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/sort.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/streamingAggregate.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/utils.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/window.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/yield.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/alias.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/batch.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/binary.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/date.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/evaluate.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/math.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/regexp.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/scalar.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/strings.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/index.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/index.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/expression.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/extractTables.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/functions.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/joins.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/parse.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/primary.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/state.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/tokenize.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/types.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/columns.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/plan.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/types.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/bbox.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/equality.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/operations.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/pointRelations.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/primitives.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/segments.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/spatial.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/wkt.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/types.d.mts +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/aggregates.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/executionErrors.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/functions.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/keywords.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/parseErrors.mjs +0 -0
- /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/tables.mjs +0 -0
package/README.md
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
[](https://npm.chart.dev/@gscdump/engine)
|
|
5
5
|
[](https://github.com/harlan-zw/gscdump/blob/main/LICENSE)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Store Search Console data in Parquet files and query it with DuckDB.
|
|
8
|
+
This package also provides Source contracts, SQL resolution, and runtime adapters.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Choose an export for your runtime.
|
|
11
|
+
Node filesystem and DuckDB helpers live on dedicated subpaths.
|
|
10
12
|
|
|
11
13
|
## Install
|
|
12
14
|
|
|
@@ -14,10 +16,9 @@ Owns the storage runtime, planner, schema, and adapters that were previously bun
|
|
|
14
16
|
npm install @gscdump/engine
|
|
15
17
|
```
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- `hyparquet`, `hyparquet-writer` — pure-JS Parquet codec for environments without a native build.
|
|
19
|
+
`@duckdb/node-api` is an optional peer for the Node runtime.
|
|
20
|
+
The CLI installs this peer. Browser consumers use `@gscdump/engine-duckdb-wasm`.
|
|
21
|
+
The package includes `hyparquet` and `hyparquet-writer` for JavaScript Parquet encoding and decoding.
|
|
21
22
|
|
|
22
23
|
## Subpath exports
|
|
23
24
|
|
|
@@ -31,39 +32,48 @@ Optional peers (install only what your runtime needs):
|
|
|
31
32
|
| `@gscdump/engine/ingest-accumulator` | Stateful ingest flushing behind injected storage and recovery hooks. |
|
|
32
33
|
| `@gscdump/engine/sql` | SQL literal binding helpers (`bindLiterals`, `formatLiteral`). |
|
|
33
34
|
| `@gscdump/engine/sql-fragments` | Reusable SQL fragments shared across analyzers. |
|
|
34
|
-
| `@gscdump/engine/rollups` | Pre-aggregated rollup contracts
|
|
35
|
+
| `@gscdump/engine/rollups` | Pre-aggregated rollup contracts and helpers. |
|
|
35
36
|
| `@gscdump/engine/entities` | Parquet-backed entity stores and their record contracts. |
|
|
36
37
|
| `@gscdump/engine/entity-keys` | Pure entity object-key and URL-hash helpers, with no Parquet runtime. |
|
|
37
38
|
| `@gscdump/engine/resolver` | Dialect-neutral SQL composition: `ResolverAdapter`, `pgResolverAdapter`, `resolveToSQL`. |
|
|
38
39
|
| `@gscdump/engine/scope` | Multi-tenant scope predicates. |
|
|
39
40
|
| `@gscdump/engine/arrow` | Apache Arrow utilities for engine result conversion. |
|
|
40
41
|
| `@gscdump/engine/node` | Node-only DuckDB handle. |
|
|
41
|
-
| `@gscdump/engine/filesystem` | Node-only `DataSource`
|
|
42
|
+
| `@gscdump/engine/filesystem` | Node-only `DataSource` and `ManifestStore` adapters. |
|
|
42
43
|
| `@gscdump/engine/hyparquet` | Pure-JS `ParquetCodec`. |
|
|
43
|
-
| `@gscdump/engine/r2` | Cloudflare R2 `DataSource` (structurally typed against `R2Bucket`). |
|
|
44
|
+
| `@gscdump/engine/r2` | Cloudflare R2 `DataSource` and `createR2ManifestStore` (structurally typed against `R2Bucket`). |
|
|
44
45
|
| `@gscdump/engine/iceberg` | Edge-safe GSC dataset schemas, catalog wrappers, and append sink. Generic Iceberg APIs live in `@gscdump/lakehouse`. |
|
|
45
46
|
| `@gscdump/engine/sink-node` | Node-only Iceberg overwrite/delete recovery writer. |
|
|
46
|
-
| `@gscdump/engine/source` |
|
|
47
|
+
| `@gscdump/engine/source` | Source contracts and factories. |
|
|
48
|
+
| `@gscdump/engine/analyzer` | Analyzer contracts, registry construction, and dispatch. |
|
|
49
|
+
| `@gscdump/engine/report` | Report definitions and contracts. |
|
|
50
|
+
| `@gscdump/engine/period` | Date windows and comparison ranges. |
|
|
51
|
+
| `@gscdump/engine/analysis-types` | Analysis parameters and results. |
|
|
52
|
+
| `@gscdump/engine/analysis-range` | Analysis date-range resolution. |
|
|
53
|
+
| `@gscdump/engine/errors` | Tagged Engine failures. |
|
|
54
|
+
| `@gscdump/engine/profile` | Query timing and profiling helpers. |
|
|
55
|
+
| `@gscdump/engine/sync-config` | Sync limits and table/search-type configuration. |
|
|
56
|
+
| `@gscdump/engine/vendor/hysnappy` | Worker-compatible compression alias. |
|
|
47
57
|
|
|
48
58
|
## Stability
|
|
49
59
|
|
|
50
60
|
| Surface | Stability |
|
|
51
61
|
|---|---|
|
|
52
62
|
| `createStorageEngine` and storage contracts (`StorageEngine`, `Row`, `WriteCtx`, ...) | Public |
|
|
53
|
-
| Adapters (`/node`, `/filesystem`, `/hyparquet`, `/r2
|
|
63
|
+
| Adapters (`/node`, `/filesystem`, `/hyparquet`, `/r2`) | Public |
|
|
54
64
|
| Planner (`resolveToSQL`, `enumeratePartitions`) | Public |
|
|
55
65
|
| Schema (`SCHEMAS`, `allTables`, ...) | Public |
|
|
56
|
-
|
|
|
66
|
+
| Files outside the declared package exports | Private |
|
|
57
67
|
|
|
58
68
|
## Related
|
|
59
69
|
|
|
60
|
-
- [`gscdump`](../gscdump)
|
|
61
|
-
- [`@gscdump/analysis`](../analysis)
|
|
62
|
-
- [`@gscdump/engine-duckdb-wasm`](../engine-duckdb-wasm)
|
|
63
|
-
- [`@gscdump/engine-sqlite`](../engine-sqlite)
|
|
64
|
-
- [`@gscdump/lakehouse`](../lakehouse)
|
|
70
|
+
- [`gscdump`](../gscdump) : REST client and query builder (edge-safe peer dep).
|
|
71
|
+
- [`@gscdump/analysis`](../analysis) : analyzers; consumes storage through `AnalysisQuerySource` adapters.
|
|
72
|
+
- [`@gscdump/engine-duckdb-wasm`](../engine-duckdb-wasm) : DuckDB-WASM browser adapter.
|
|
73
|
+
- [`@gscdump/engine-sqlite`](../engine-sqlite) : SQLite / D1 adapter.
|
|
74
|
+
- [`@gscdump/lakehouse`](../lakehouse) : dataset-agnostic Iceberg catalog and
|
|
65
75
|
dataset registry APIs.
|
|
66
|
-
- [`@gscdump/cli`](../cli)
|
|
76
|
+
- [`@gscdump/cli`](../cli) : CLI wrapping engine and analysis.
|
|
67
77
|
|
|
68
78
|
## License
|
|
69
79
|
|
|
@@ -35,11 +35,11 @@ Repository: https://github.com/101arrowz/fzstd
|
|
|
35
35
|
|
|
36
36
|
---------------------------------------
|
|
37
37
|
|
|
38
|
-
## hyparquet, hyparquet-compressors, hyparquet-writer, icebird, squirreling
|
|
38
|
+
## hyparquet, hyparquet, hyparquet-compressors, hyparquet-writer, icebird, squirreling
|
|
39
39
|
|
|
40
40
|
License: MIT
|
|
41
41
|
By: Hyperparam
|
|
42
|
-
Repositories: https://github.com/hyparam/hyparquet, https://github.com/hyparam/hyparquet-compressors, https://github.com/hyparam/hyparquet-writer, https://github.com/hyparam/icebird, https://github.com/hyparam/squirreling
|
|
42
|
+
Repositories: https://github.com/hyparam/hyparquet, https://github.com/hyparam/hyparquet, https://github.com/hyparam/hyparquet-compressors, https://github.com/hyparam/hyparquet-writer, https://github.com/hyparam/icebird, https://github.com/hyparam/squirreling
|
|
43
43
|
|
|
44
44
|
> The MIT License (MIT)
|
|
45
45
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DuckDBHandle } from "../duckdb.mjs";
|
|
2
|
-
interface NodeDuckDBOptions {
|
|
2
|
+
export interface NodeDuckDBOptions {
|
|
3
3
|
verbose?: boolean;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
declare function
|
|
7
|
-
export
|
|
5
|
+
/** Node uses one native connection. Browser and Worker adapters own their WASM runtimes. */
|
|
6
|
+
export declare function createNodeDuckDBHandle(opts?: NodeDuckDBOptions): DuckDBHandle;
|
|
7
|
+
export declare function resetNodeDuckDB(): void;
|
|
@@ -1,98 +1,124 @@
|
|
|
1
|
-
import { arrowToRows } from "../arrow-utils.mjs";
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
1
|
import process from "node:process";
|
|
4
|
-
import {
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
import { mkdtempSync, rmSync } from "node:fs";
|
|
4
|
+
import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
|
-
import { join } from "node:path";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
6
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
7
|
+
import { DuckDBInstance, blobValue, timestampValue } from "@duckdb/node-api";
|
|
8
|
+
let singleton;
|
|
9
|
+
function getRuntime() {
|
|
10
|
+
if (singleton) return singleton;
|
|
11
|
+
const directory = mkdtempSync(join(tmpdir(), "gscdump-duckdb-"));
|
|
12
|
+
const onExit = () => rmSync(directory, {
|
|
13
|
+
recursive: true,
|
|
14
|
+
force: true
|
|
15
|
+
});
|
|
16
|
+
process.once("exit", onExit);
|
|
17
|
+
singleton = {
|
|
18
|
+
directory,
|
|
19
|
+
onExit,
|
|
20
|
+
tail: Promise.resolve(),
|
|
21
|
+
state: { _tag: "Unopened" }
|
|
22
22
|
};
|
|
23
|
+
return singleton;
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return {
|
|
29
|
-
db,
|
|
30
|
-
conn: db.connect()
|
|
31
|
-
};
|
|
25
|
+
function enqueue(runtime, operation) {
|
|
26
|
+
const result = runtime.tail.then(operation);
|
|
27
|
+
runtime.tail = result.then(() => void 0, () => void 0);
|
|
28
|
+
return result;
|
|
32
29
|
}
|
|
33
|
-
function
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
async function connect(runtime, opts) {
|
|
31
|
+
if (runtime.state._tag === "Opened") return runtime.state.connection;
|
|
32
|
+
const instance = await DuckDBInstance.create(":memory:", { temp_directory: join(runtime.directory, "spill") });
|
|
33
|
+
try {
|
|
34
|
+
const connection = await instance.connect();
|
|
35
|
+
runtime.state = {
|
|
36
|
+
_tag: "Opened",
|
|
37
|
+
instance,
|
|
38
|
+
connection
|
|
39
|
+
};
|
|
40
|
+
await connection.run("SET file_search_path = $1", [runtime.directory]);
|
|
41
|
+
if (opts.verbose) console.warn("[gscdump] Native DuckDB initialized");
|
|
42
|
+
return connection;
|
|
43
|
+
} catch (error) {
|
|
44
|
+
if (runtime.state._tag === "Opened") runtime.state.connection.closeSync();
|
|
45
|
+
runtime.state = { _tag: "Unopened" };
|
|
46
|
+
instance.closeSync();
|
|
47
|
+
throw error;
|
|
37
48
|
}
|
|
38
|
-
|
|
49
|
+
}
|
|
50
|
+
function temporaryPath(runtime, name) {
|
|
51
|
+
const path = resolve(runtime.directory, name);
|
|
52
|
+
const child = relative(runtime.directory, path);
|
|
53
|
+
if (!child || child === ".." || child.startsWith(`..${sep}`) || isAbsolute(child)) throw new TypeError("DuckDB temporary files must stay inside the temporary directory.");
|
|
54
|
+
return path;
|
|
55
|
+
}
|
|
56
|
+
function parameter(value) {
|
|
57
|
+
if (value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "bigint") return value;
|
|
58
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
59
|
+
if (value instanceof Date && Number.isFinite(value.getTime())) return timestampValue(BigInt(value.getTime()) * 1000n);
|
|
60
|
+
if (value instanceof Uint8Array) return blobValue(value);
|
|
61
|
+
throw new TypeError("DuckDB parameters must be finite scalars, dates, byte arrays, or null.");
|
|
62
|
+
}
|
|
63
|
+
function rowValue(value) {
|
|
64
|
+
if (value instanceof Date) return value.getTime();
|
|
65
|
+
if (Array.isArray(value)) return value.map(rowValue);
|
|
66
|
+
if (value instanceof Uint8Array) return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
|
|
67
|
+
if (value !== null && typeof value === "object") return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, rowValue(item)]));
|
|
68
|
+
return value;
|
|
39
69
|
}
|
|
40
70
|
function createNodeDuckDBHandle(opts = {}) {
|
|
41
|
-
if (singleton && opts.verbose !== void 0 && opts.verbose !== (singletonOpts?.verbose ?? false)) console.warn(`[gscdump] createNodeDuckDBHandle: ignoring verbose=${opts.verbose} — a shared DuckDB instance was already initialized with verbose=${singletonOpts?.verbose ?? false}. Call resetNodeDuckDB() before re-initializing to change it.`);
|
|
42
|
-
getSingleton(opts);
|
|
43
71
|
return {
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
const result =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
try {
|
|
52
|
-
const result = stmt.query(...params);
|
|
53
|
-
return arrowToRows(result);
|
|
54
|
-
} finally {
|
|
55
|
-
stmt.close();
|
|
56
|
-
}
|
|
72
|
+
query(sql, params) {
|
|
73
|
+
const runtime = getRuntime();
|
|
74
|
+
return enqueue(runtime, async () => {
|
|
75
|
+
const result = await (await connect(runtime, opts)).runAndReadAll(sql, params?.length ? params.map(parameter) : void 0);
|
|
76
|
+
const names = result.columnNames();
|
|
77
|
+
return result.getRowsJS().map((values) => Object.fromEntries(names.map((name, index) => [name, rowValue(values[index])])));
|
|
78
|
+
});
|
|
57
79
|
},
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
80
|
+
registerFileBuffer(name, bytes) {
|
|
81
|
+
const runtime = getRuntime();
|
|
82
|
+
return enqueue(runtime, async () => {
|
|
83
|
+
const path = temporaryPath(runtime, name);
|
|
84
|
+
await mkdir(dirname(path), { recursive: true });
|
|
85
|
+
await writeFile(path, bytes);
|
|
86
|
+
});
|
|
61
87
|
},
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
return
|
|
88
|
+
copyFileToBuffer(name) {
|
|
89
|
+
const runtime = getRuntime();
|
|
90
|
+
return enqueue(runtime, () => readFile(temporaryPath(runtime, name)));
|
|
65
91
|
},
|
|
66
|
-
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
} catch (error) {
|
|
72
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
73
|
-
if (!/not found|does not exist|unknown file/i.test(message)) throw error;
|
|
74
|
-
}
|
|
75
|
-
try {
|
|
76
|
-
unlinkSync(name);
|
|
77
|
-
} catch (error) {
|
|
78
|
-
if (error.code !== "ENOENT") throw error;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
92
|
+
dropFiles(names) {
|
|
93
|
+
const runtime = getRuntime();
|
|
94
|
+
return enqueue(runtime, async () => {
|
|
95
|
+
for (const name of names) await rm(temporaryPath(runtime, name), { force: true });
|
|
96
|
+
});
|
|
81
97
|
},
|
|
82
98
|
makeTempPath(ext) {
|
|
83
|
-
return
|
|
99
|
+
return temporaryPath(getRuntime(), `${randomUUID()}.${ext}`);
|
|
84
100
|
}
|
|
85
101
|
};
|
|
86
102
|
}
|
|
87
103
|
function resetNodeDuckDB() {
|
|
88
|
-
const
|
|
89
|
-
singleton =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
const runtime = singleton;
|
|
105
|
+
singleton = void 0;
|
|
106
|
+
if (!runtime) return;
|
|
107
|
+
enqueue(runtime, async () => {
|
|
108
|
+
try {
|
|
109
|
+
if (runtime.state._tag === "Opened") {
|
|
110
|
+
runtime.state.connection.closeSync();
|
|
111
|
+
runtime.state.instance.closeSync();
|
|
112
|
+
}
|
|
113
|
+
} finally {
|
|
114
|
+
await rm(runtime.directory, {
|
|
115
|
+
recursive: true,
|
|
116
|
+
force: true
|
|
117
|
+
});
|
|
118
|
+
process.removeListener("exit", runtime.onExit);
|
|
119
|
+
}
|
|
120
|
+
}).catch((error) => {
|
|
121
|
+
console.warn("[gscdump] Failed to release DuckDB resources", error);
|
|
96
122
|
});
|
|
97
123
|
}
|
|
98
124
|
export { createNodeDuckDBHandle, resetNodeDuckDB };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { DataSource, ManifestStore } from "../storage.mjs";
|
|
2
|
-
interface FilesystemDataSourceOptions {
|
|
2
|
+
export interface FilesystemDataSourceOptions {
|
|
3
3
|
rootDir: string;
|
|
4
4
|
}
|
|
5
|
-
declare function createFilesystemDataSource(opts: FilesystemDataSourceOptions): DataSource;
|
|
6
|
-
interface FilesystemManifestStoreOptions {
|
|
5
|
+
export declare function createFilesystemDataSource(opts: FilesystemDataSourceOptions): DataSource;
|
|
6
|
+
export interface FilesystemManifestStoreOptions {
|
|
7
7
|
path: string;
|
|
8
8
|
}
|
|
9
|
-
declare function createFilesystemManifestStore(opts: FilesystemManifestStoreOptions): ManifestStore;
|
|
10
|
-
declare function filesystemStats(rootDir: string): Promise<{
|
|
9
|
+
export declare function createFilesystemManifestStore(opts: FilesystemManifestStoreOptions): ManifestStore;
|
|
10
|
+
export declare function filesystemStats(rootDir: string): Promise<{
|
|
11
11
|
files: number;
|
|
12
12
|
bytes: number;
|
|
13
|
-
}>;
|
|
14
|
-
export { FilesystemDataSourceOptions, FilesystemManifestStoreOptions, createFilesystemDataSource, createFilesystemManifestStore, filesystemStats };
|
|
13
|
+
}>;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { manifestEntryKey, matchesManifestEntryFilter, matchesSyncStateFilter, matchesWatermarkFilter, mergeSyncState, syncStateKey, watermarkKey } from "../manifest-store-utils.mjs";
|
|
2
|
-
import { dirname, join, resolve } from "node:path";
|
|
3
|
-
import { Buffer } from "node:buffer";
|
|
4
2
|
import { randomBytes } from "node:crypto";
|
|
5
3
|
import { mkdir, open, readFile, readdir, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
|
|
4
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
5
|
+
import { Buffer } from "node:buffer";
|
|
6
|
+
import { normalize } from "pathe";
|
|
6
7
|
import { lock } from "proper-lockfile";
|
|
8
|
+
function portablePath(path) {
|
|
9
|
+
return sep === "\\" ? normalize(path) : path;
|
|
10
|
+
}
|
|
7
11
|
function createFilesystemDataSource(opts) {
|
|
8
12
|
const root = resolve(opts.rootDir);
|
|
9
13
|
const readyDirectories = /* @__PURE__ */ new Map();
|
|
10
14
|
function pathFor(key) {
|
|
11
15
|
const resolved = resolve(root, key);
|
|
12
|
-
|
|
16
|
+
const child = relative(root, resolved);
|
|
17
|
+
if (child === ".." || child.startsWith(`..${sep}`) || isAbsolute(child)) throw new Error(`path escapes root: ${key}`);
|
|
13
18
|
return resolved;
|
|
14
19
|
}
|
|
15
20
|
async function ensureDirectory(path) {
|
|
@@ -72,11 +77,11 @@ function createFilesystemDataSource(opts) {
|
|
|
72
77
|
const full = pathFor(prefix);
|
|
73
78
|
const out = [];
|
|
74
79
|
await walk(full, out);
|
|
75
|
-
return out.map((p) =>
|
|
80
|
+
return out.map((p) => portablePath(relative(root, p)));
|
|
76
81
|
},
|
|
77
82
|
async *streamList(prefix) {
|
|
78
83
|
const full = pathFor(prefix);
|
|
79
|
-
for await (const p of walkStream(full)) yield
|
|
84
|
+
for await (const p of walkStream(full)) yield portablePath(relative(root, p));
|
|
80
85
|
},
|
|
81
86
|
async head(key) {
|
|
82
87
|
const path = pathFor(key);
|
|
@@ -86,7 +91,7 @@ function createFilesystemDataSource(opts) {
|
|
|
86
91
|
});
|
|
87
92
|
},
|
|
88
93
|
uri(key) {
|
|
89
|
-
return pathFor(key);
|
|
94
|
+
return portablePath(pathFor(key));
|
|
90
95
|
}
|
|
91
96
|
};
|
|
92
97
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ParquetQueryFilter } from "../node_modules/.pnpm/hyparquet@1.
|
|
2
|
-
import "../node_modules/.pnpm/hyparquet@1.
|
|
1
|
+
import { ParquetQueryFilter } from "../node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/index.mjs";
|
|
2
|
+
import "../node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/node.mjs";
|
|
3
3
|
import { CodecCtx, DataSource, ParquetCodec, Row, TableName } from "../storage.mjs";
|
|
4
4
|
import { ColumnDef } from "../schema.mjs";
|
|
5
|
-
declare function encodeRowsToParquet(table: TableName, rows: readonly Row[]): Uint8Array;
|
|
6
|
-
interface EncodeFlexOptions {
|
|
5
|
+
export declare function encodeRowsToParquet(table: TableName, rows: readonly Row[]): Uint8Array;
|
|
6
|
+
export interface EncodeFlexOptions {
|
|
7
7
|
/** Columns defining the output schema + order. */
|
|
8
8
|
columns: readonly ColumnDef[];
|
|
9
9
|
/** Sort key columns (subset of `columns` by name). Empty = preserve input order. */
|
|
@@ -18,8 +18,8 @@ interface EncodeFlexOptions {
|
|
|
18
18
|
* the canonical encoder so DuckDB `read_parquet(union_by_name = true)`
|
|
19
19
|
* merges cleanly with fact-table reads.
|
|
20
20
|
*/
|
|
21
|
-
declare function encodeRowsToParquetFlex(rows: readonly Row[], opts: EncodeFlexOptions): Uint8Array;
|
|
22
|
-
interface DecodeParquetOptions {
|
|
21
|
+
export declare function encodeRowsToParquetFlex(rows: readonly Row[], opts: EncodeFlexOptions): Uint8Array;
|
|
22
|
+
export interface DecodeParquetOptions {
|
|
23
23
|
/** First physical row to decode, inclusive. */
|
|
24
24
|
rowStart?: number;
|
|
25
25
|
/** Last physical row to decode, exclusive. */
|
|
@@ -44,8 +44,8 @@ interface DecodeParquetOptions {
|
|
|
44
44
|
*/
|
|
45
45
|
columns?: readonly string[];
|
|
46
46
|
}
|
|
47
|
-
declare function decodeParquetToRows(bytes: Uint8Array, opts?: DecodeParquetOptions): Promise<Row[]>;
|
|
48
|
-
interface HyparquetCodecOptions {
|
|
47
|
+
export declare function decodeParquetToRows(bytes: Uint8Array, opts?: DecodeParquetOptions): Promise<Row[]>;
|
|
48
|
+
export interface HyparquetCodecOptions {
|
|
49
49
|
/**
|
|
50
50
|
* Override `readRows`. Useful when reads should be delegated to a faster
|
|
51
51
|
* engine (e.g. DuckDB-WASM via httpfs) while writes + compaction stay on
|
|
@@ -58,5 +58,4 @@ interface HyparquetCodecOptions {
|
|
|
58
58
|
*/
|
|
59
59
|
compactionReadConcurrency?: number;
|
|
60
60
|
}
|
|
61
|
-
declare function createHyparquetCodec(options?: HyparquetCodecOptions): ParquetCodec;
|
|
62
|
-
export { DecodeParquetOptions, EncodeFlexOptions, HyparquetCodecOptions, createHyparquetCodec, decodeParquetToRows, encodeRowsToParquet, encodeRowsToParquetFlex };
|
|
61
|
+
export declare function createHyparquetCodec(options?: HyparquetCodecOptions): ParquetCodec;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TABLE_METADATA } from "../drizzle-schema.mjs";
|
|
2
2
|
import { SCHEMAS } from "../schema.mjs";
|
|
3
|
-
import { parquetMetadataAsync, parquetSchema } from "../node_modules/.pnpm/hyparquet@1.
|
|
4
|
-
import { parquetReadObjects } from "../node_modules/.pnpm/hyparquet@1.
|
|
5
|
-
import "../node_modules/.pnpm/hyparquet@1.
|
|
3
|
+
import { parquetMetadataAsync, parquetSchema } from "../node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/metadata.mjs";
|
|
4
|
+
import { parquetReadObjects } from "../node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/read.mjs";
|
|
5
|
+
import "../node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/node.mjs";
|
|
6
6
|
import { ByteWriter } from "../node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/bytewriter.mjs";
|
|
7
7
|
import { parquetWriteRows } from "../node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/write-rows.mjs";
|
|
8
8
|
import "../node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/node.mjs";
|
|
@@ -124,14 +124,37 @@ function sortRowsByClusterKey(table, rows) {
|
|
|
124
124
|
});
|
|
125
125
|
return copy;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
127
|
+
function naturalKeyHash(key, row) {
|
|
128
|
+
let hash = 2166136261;
|
|
129
|
+
for (const column of key) {
|
|
130
|
+
const value = String(row[column] ?? "");
|
|
131
|
+
for (let i = 0; i < value.length; i++) hash = Math.imul(hash ^ value.charCodeAt(i), 16777619);
|
|
132
|
+
hash = Math.imul(hash, 16777619);
|
|
133
133
|
}
|
|
134
|
-
return
|
|
134
|
+
return hash & 1073741823;
|
|
135
|
+
}
|
|
136
|
+
function sameNaturalKey(key, a, b) {
|
|
137
|
+
return key.every((column) => String(a[column] ?? "") === String(b[column] ?? ""));
|
|
138
|
+
}
|
|
139
|
+
function naturalKeyTuple(key, row) {
|
|
140
|
+
return JSON.stringify(key.map((column) => String(row[column] ?? "")));
|
|
141
|
+
}
|
|
142
|
+
function indexRow(index, key, row) {
|
|
143
|
+
const hash = naturalKeyHash(key, row);
|
|
144
|
+
const existing = index.get(hash);
|
|
145
|
+
if (existing === void 0) index.set(hash, row);
|
|
146
|
+
else if (existing instanceof Map) existing.set(naturalKeyTuple(key, row), row);
|
|
147
|
+
else if (Array.isArray(existing)) {
|
|
148
|
+
const match = existing.findIndex((candidate) => sameNaturalKey(key, candidate, row));
|
|
149
|
+
if (match >= 0) existing[match] = row;
|
|
150
|
+
else if (existing.length < 8) existing.push(row);
|
|
151
|
+
else {
|
|
152
|
+
const bucket = new Map(existing.map((candidate) => [naturalKeyTuple(key, candidate), candidate]));
|
|
153
|
+
bucket.set(naturalKeyTuple(key, row), row);
|
|
154
|
+
index.set(hash, bucket);
|
|
155
|
+
}
|
|
156
|
+
} else if (sameNaturalKey(key, existing, row)) index.set(hash, row);
|
|
157
|
+
else index.set(hash, [existing, row]);
|
|
135
158
|
}
|
|
136
159
|
function encodeOrderedRows(rows, columns, rowGroupSize) {
|
|
137
160
|
const schema = buildWriteSchema(columns);
|
|
@@ -189,44 +212,57 @@ function asyncBufferFromBytes(bytes) {
|
|
|
189
212
|
};
|
|
190
213
|
}
|
|
191
214
|
async function decodeParquetToRows(bytes, opts = {}) {
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
return normalizeDecodedDates(await parquetReadObjects({
|
|
196
|
-
file,
|
|
197
|
-
...opts.rowStart === void 0 ? {} : { rowStart: opts.rowStart },
|
|
198
|
-
...opts.rowEnd === void 0 ? {} : { rowEnd: opts.rowEnd },
|
|
199
|
-
...opts.rowStart !== void 0 || opts.rowEnd !== void 0 ? { useOffsetIndex: true } : {},
|
|
200
|
-
...projection ? {
|
|
201
|
-
metadata: projection.metadata,
|
|
202
|
-
columns: projection.columns
|
|
203
|
-
} : {},
|
|
204
|
-
...opts.filter ? {
|
|
205
|
-
filter: opts.filter,
|
|
206
|
-
useBloomFilters: true,
|
|
207
|
-
usePageIndex: true
|
|
208
|
-
} : {}
|
|
209
|
-
}));
|
|
215
|
+
const rows = [];
|
|
216
|
+
for await (const group of decodeParquetGroups(bytes, opts)) for (const row of group) rows.push(row);
|
|
217
|
+
return rows;
|
|
210
218
|
}
|
|
211
|
-
async function
|
|
219
|
+
async function* decodeParquetGroups(bytes, opts = {}) {
|
|
220
|
+
if (bytes.byteLength === 0) return;
|
|
221
|
+
const file = asyncBufferFromBytes(bytes);
|
|
212
222
|
const metadata = await parquetMetadataAsync(file);
|
|
213
223
|
const present = new Set(parquetSchema(metadata).children.map((child) => child.element.name));
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
224
|
+
const columns = opts.columns?.filter((name) => present.has(name));
|
|
225
|
+
let groupStart = 0;
|
|
226
|
+
for (const group of metadata.row_groups) {
|
|
227
|
+
const groupEnd = groupStart + Number(group.num_rows);
|
|
228
|
+
const rowStart = Math.max(groupStart, opts.rowStart ?? 0);
|
|
229
|
+
const rowEnd = Math.min(groupEnd, opts.rowEnd ?? Infinity);
|
|
230
|
+
if (rowStart < rowEnd) yield normalizeDecodedDates(await parquetReadObjects({
|
|
231
|
+
file,
|
|
232
|
+
metadata: {
|
|
233
|
+
...metadata,
|
|
234
|
+
row_groups: [group],
|
|
235
|
+
num_rows: group.num_rows
|
|
236
|
+
},
|
|
237
|
+
columns,
|
|
238
|
+
rowStart: rowStart - groupStart,
|
|
239
|
+
rowEnd: rowEnd - groupStart,
|
|
240
|
+
useOffsetIndex: rowStart > groupStart || rowEnd < groupEnd,
|
|
241
|
+
...opts.filter ? {
|
|
242
|
+
filter: opts.filter,
|
|
243
|
+
useBloomFilters: true,
|
|
244
|
+
usePageIndex: true
|
|
245
|
+
} : {}
|
|
246
|
+
}));
|
|
247
|
+
groupStart = groupEnd;
|
|
248
|
+
}
|
|
218
249
|
}
|
|
219
250
|
function normalizeDecodedDates(rows) {
|
|
220
|
-
|
|
221
|
-
const dateCols = [];
|
|
222
|
-
const first = rows[0];
|
|
223
|
-
for (const k in first) if (first[k] instanceof Date) dateCols.push(k);
|
|
224
|
-
if (dateCols.length === 0) return rows;
|
|
251
|
+
const dates = /* @__PURE__ */ new Map();
|
|
225
252
|
for (const row of rows) {
|
|
226
253
|
const r = row;
|
|
227
|
-
for (const k
|
|
254
|
+
for (const k in r) {
|
|
228
255
|
const v = r[k];
|
|
229
|
-
if (v instanceof Date)
|
|
256
|
+
if (v instanceof Date) {
|
|
257
|
+
const day = Math.floor(v.getTime() / EPOCH_DAY_MS);
|
|
258
|
+
let iso = dates.get(day);
|
|
259
|
+
if (iso === void 0) {
|
|
260
|
+
iso = isoFromDate(v);
|
|
261
|
+
if (dates.size >= 1024) dates.clear();
|
|
262
|
+
dates.set(day, iso);
|
|
263
|
+
}
|
|
264
|
+
r[k] = iso;
|
|
265
|
+
}
|
|
230
266
|
}
|
|
231
267
|
}
|
|
232
268
|
return rows;
|
|
@@ -256,16 +292,20 @@ function createHyparquetCodec(options = {}) {
|
|
|
256
292
|
rowCount: 0
|
|
257
293
|
};
|
|
258
294
|
}
|
|
295
|
+
const key = TABLE_METADATA[ctx.table].sortKey;
|
|
259
296
|
const byNaturalKey = /* @__PURE__ */ new Map();
|
|
260
297
|
for (let offset = 0; offset < inputKeys.length; offset += compactionReadConcurrency) {
|
|
261
298
|
const batch = inputKeys.slice(offset, offset + compactionReadConcurrency);
|
|
262
299
|
const inputs = await Promise.all(batch.map((key) => dataSource.read(key)));
|
|
263
|
-
|
|
264
|
-
const
|
|
265
|
-
for (
|
|
300
|
+
while (inputs.length > 0) {
|
|
301
|
+
const input = inputs.shift();
|
|
302
|
+
for await (const rows of decodeParquetGroups(input)) for (const row of rows) indexRow(byNaturalKey, key, row);
|
|
266
303
|
}
|
|
267
304
|
}
|
|
268
|
-
const rows = [
|
|
305
|
+
const rows = [];
|
|
306
|
+
for (const entry of byNaturalKey.values()) if (entry instanceof Map || Array.isArray(entry)) for (const row of entry.values()) rows.push(row);
|
|
307
|
+
else rows.push(entry);
|
|
308
|
+
byNaturalKey.clear();
|
|
269
309
|
const bytes = encodeRowsToParquet(ctx.table, rows);
|
|
270
310
|
await dataSource.write(outputKey, bytes);
|
|
271
311
|
return {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { DataSource, StorageEngine } from "../storage.mjs";
|
|
2
2
|
import { Row, TableName, TenantCtx } from "@gscdump/contracts";
|
|
3
3
|
import { SearchType } from "gscdump/query";
|
|
4
|
-
interface NodeHarnessOptions {
|
|
4
|
+
export interface NodeHarnessOptions {
|
|
5
5
|
dataDir: string;
|
|
6
6
|
/** Tenant user id. Defaults to `'local'` for single-user CLI installs. */
|
|
7
7
|
userId?: string;
|
|
8
8
|
/** Name of the manifest file under `dataDir`. Defaults to `manifest.json`. */
|
|
9
9
|
manifestFilename?: string;
|
|
10
10
|
}
|
|
11
|
-
interface NodeHarness {
|
|
11
|
+
export interface NodeHarness {
|
|
12
12
|
engine: StorageEngine;
|
|
13
13
|
/**
|
|
14
14
|
* Underlying filesystem-backed DataSource. Exposed so commands that write
|
|
@@ -35,5 +35,4 @@ interface NodeHarness {
|
|
|
35
35
|
keys: string[];
|
|
36
36
|
}>;
|
|
37
37
|
}
|
|
38
|
-
declare function createNodeHarness(opts: NodeHarnessOptions): NodeHarness;
|
|
39
|
-
export { NodeHarness, NodeHarnessOptions, createNodeHarness };
|
|
38
|
+
export declare function createNodeHarness(opts: NodeHarnessOptions): NodeHarness;
|