@gscdump/engine 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/duckdb-node.d.mts +7 -0
- package/dist/adapters/duckdb-node.mjs +94 -0
- package/dist/adapters/filesystem.d.mts +1 -1
- package/dist/adapters/filesystem.mjs +1 -1
- package/dist/adapters/hyparquet.d.mts +4 -3
- package/dist/adapters/hyparquet.mjs +7 -3
- package/dist/adapters/node-harness.d.mts +38 -0
- package/dist/adapters/node-harness.mjs +47 -0
- package/dist/adapters/node.d.mts +4 -100
- package/dist/adapters/node.mjs +4 -240
- package/dist/adapters/parquet-attach.d.mts +23 -0
- package/dist/adapters/parquet-attach.mjs +21 -0
- package/dist/adapters/r2-manifest.d.mts +82 -0
- package/dist/adapters/r2-manifest.mjs +364 -0
- package/dist/adapters/r2.d.mts +1 -1
- package/dist/adapters/read-optional.mjs +15 -0
- package/dist/adapters/snapshot-attach.d.mts +38 -0
- package/dist/adapters/snapshot-attach.mjs +85 -0
- package/dist/analysis-types.d.mts +56 -1
- package/dist/analyzer/define.d.mts +48 -0
- package/dist/analyzer/define.mjs +60 -0
- package/dist/analyzer/dispatch.d.mts +17 -0
- package/dist/analyzer/index.d.mts +4 -14
- package/dist/analyzer/index.mjs +4 -112
- package/dist/analyzer/registry.d.mts +33 -0
- package/dist/analyzer/registry.mjs +49 -0
- package/dist/analyzer/types.d.mts +95 -0
- package/dist/analyzer/types.mjs +5 -0
- package/dist/coerce.d.mts +4 -0
- package/dist/compaction.d.mts +14 -0
- package/dist/{_chunks/parquet-plan.mjs → compaction.mjs} +2 -138
- package/dist/contracts.d.mts +1 -2
- package/dist/{_chunks/schema.d.mts → drizzle-schema.d.mts} +2 -34
- package/dist/{_chunks/schema.mjs → drizzle-schema.mjs} +2 -78
- package/dist/{_chunks/snapshot.d.mts → duckdb.d.mts} +1 -14
- package/dist/duckdb.mjs +207 -0
- package/dist/engine.d.mts +4 -0
- package/dist/engine.mjs +385 -0
- package/dist/entities.d.mts +3 -52
- package/dist/entities.mjs +867 -2
- package/dist/errors.d.mts +114 -1
- package/dist/gc.mjs +92 -0
- package/dist/iceberg/append-sink.d.mts +14 -0
- package/dist/iceberg/append-sink.mjs +142 -0
- package/dist/iceberg/catalog.d.mts +71 -0
- package/dist/iceberg/catalog.mjs +109 -0
- package/dist/iceberg/index.d.mts +4 -13
- package/dist/iceberg/index.mjs +3 -244
- package/dist/iceberg/overwrite-writer.d.mts +161 -0
- package/dist/iceberg/overwrite-writer.mjs +102 -0
- package/dist/iceberg/pyiceberg-runtime.mjs +34 -0
- package/dist/iceberg/schema.d.mts +69 -0
- package/dist/{_chunks/schema2.mjs → iceberg/schema.mjs} +3 -2
- package/dist/index.d.mts +14 -190
- package/dist/index.mjs +10 -645
- package/dist/ingest-accumulator.d.mts +1 -1
- package/dist/ingest.d.mts +1 -1
- package/dist/layout.d.mts +31 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.bitreader.mjs +88 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.blocks.mjs +120 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.context.mjs +1805 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.contextmap.mjs +49 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.dictionary.mjs +984 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.huffman.mjs +266 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.mjs +340 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.prefix.mjs +109 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.streams.mjs +21 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.transform.mjs +190 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/compressors.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/gzip.huffman.mjs +121 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/gzip.mjs +176 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/index.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/lz4.mjs +52 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/bloom.mjs +93 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/bytewriter.mjs +91 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/column.mjs +186 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/datapage.mjs +113 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/delta.mjs +111 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/dictionary.mjs +99 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/dremel.mjs +116 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/encoding.mjs +51 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/geospatial.mjs +84 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/index.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/indexes.mjs +31 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/metadata.mjs +138 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/node.mjs +8 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/parquet-writer.mjs +139 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/plain.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/schema.mjs +254 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/snappy.mjs +125 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/splitstream.mjs +38 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/thrift.mjs +79 -0
- package/dist/{_chunks/libs/hyparquet-writer.d.mts → node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/types.d.mts} +2 -2
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/unconvert.mjs +247 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/variant.mjs +321 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/wkb.mjs +79 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/write-rows.mjs +122 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/write.mjs +5 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/bytewriter.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/index.d.mts +10 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/node.d.mts +3 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/parquet-writer.d.mts +2 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/schema.d.mts +2 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/wkb.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/write-rows.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/write.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/assemble.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/bloom.mjs +69 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/column.mjs +8 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/constants.mjs +80 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/convert.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/datapage.mjs +6 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/delta.mjs +2 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/encoding.mjs +2 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/filter.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/geoparquet.mjs +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/index.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/indexes.mjs +5 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/metadata.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/node.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/plain.mjs +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/plan.mjs +5 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/query.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/read.mjs +6 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/rowgroup.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/schema.mjs +54 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/snappy.mjs +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/thrift.mjs +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/types.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/utils.mjs +19 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/variant.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/wkb.mjs +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/xxhash.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/index.d.mts +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/indexes.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/metadata.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/node.d.mts +2 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/query.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/read.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/snappy.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/utils.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/assemble.mjs +144 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/bloom.mjs +124 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/column.mjs +127 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/constants.mjs +75 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/convert.mjs +118 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/datapage.mjs +144 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/delta.mjs +65 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/encoding.mjs +76 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/filter.mjs +98 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/geoparquet.mjs +24 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/index.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/indexes.mjs +16 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/metadata.mjs +235 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/node.mjs +7 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/plain.mjs +78 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/plan.mjs +147 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/query.mjs +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/read.mjs +106 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/rowgroup.mjs +154 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/schema.mjs +75 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/snappy.mjs +70 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/thrift.mjs +86 -0
- package/dist/{_chunks/libs/hyparquet.d.mts → node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/types.d.mts} +6 -8
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/utils.mjs +31 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/variant.mjs +225 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/wkb.mjs +94 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/xxhash.mjs +68 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/index.d.mts +10 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/indexes.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/metadata.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/node.d.mts +3 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/query.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/read.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/snappy.d.mts +1 -0
- package/dist/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/utils.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/avro/avro.metadata.mjs +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/avro/avro.read.mjs +4 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/avro/avro.write.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/catalog/file.mjs +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/catalog/loadTable.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/catalog/rest.mjs +73 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/create.mjs +67 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/delete.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/fetch.mjs +8 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/index.mjs +13 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/json.mjs +147 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/manifest.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/metadata.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/prune.mjs +4 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/puffin/deletion-vector.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/puffin/puffin.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/puffin/roaring.mjs +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/read.mjs +9 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/s3.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/schema.mjs +76 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sigv4.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sql/icebergDataSource.mjs +8 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sql/icebergQuery.mjs +5 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sql/whereFilter.mjs +1 -0
- package/dist/{_chunks/libs/icebird.d.mts → node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/types.d.mts} +5 -33
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/utils.mjs +8 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/commit.mjs +5 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/conversions.mjs +19 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/delete-file.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/geospatial.mjs +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/manifest-list.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/manifest.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/parquet.mjs +5 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/partition.mjs +75 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/rewrite.mjs +10 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/serde.mjs +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/snapshot.mjs +5 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/sort.mjs +3 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stage-deletion-vector.mjs +11 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stage-position-delete.mjs +8 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stage.mjs +10 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stats.mjs +4 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/transform.mjs +60 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/write.mjs +45 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/catalog/file.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/catalog/rest.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/create.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/fetch.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/index.d.mts +13 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/manifest.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/metadata.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/read.d.mts +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/s3.d.mts +1 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/sql/icebergDataSource.d.mts +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/sql/icebergQuery.d.mts +2 -0
- package/dist/node_modules/.pnpm/icebird@0.8.15_patch_hash_d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/write/write.d.mts +32 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/ast.d.mts +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/backend/dataSource.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/accumulator.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/aggregates.mjs +10 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/execute.mjs +15 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/join.mjs +5 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/scanColumn.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/sort.mjs +5 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/streamingAggregate.mjs +9 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/utils.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/window.mjs +5 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/yield.mjs +17 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/alias.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/binary.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/date.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/evaluate.mjs +15 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/math.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/regexp.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/strings.mjs +3 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/index.d.mts +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/index.mjs +9 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/expression.mjs +6 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/extractTables.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/functions.mjs +5 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/joins.mjs +7 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/parse.mjs +10 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/primary.mjs +8 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/state.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/tokenize.mjs +3 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/types.d.mts +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/plan/columns.mjs +3 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/plan/plan.mjs +7 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/plan/types.d.mts +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/bbox.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/equality.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/operations.mjs +5 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/pointRelations.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/primitives.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/segments.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/spatial.mjs +6 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/wkt.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/types.d.mts +3 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/aggregates.mjs +3 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/executionErrors.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/functions.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/keywords.mjs +1 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/parseErrors.mjs +2 -0
- package/dist/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/tables.mjs +2 -0
- package/dist/parquet-plan.d.mts +15 -0
- package/dist/parquet-plan.mjs +139 -0
- package/dist/parquet-pushdown.mjs +58 -0
- package/dist/period/index.d.mts +52 -1
- package/dist/planner.d.mts +2 -14
- package/dist/planner.mjs +2 -1
- package/dist/profile.d.mts +21 -0
- package/dist/profile.mjs +27 -0
- package/dist/query-dim.d.mts +54 -0
- package/dist/query-dim.mjs +91 -0
- package/dist/report/define.d.mts +8 -0
- package/dist/report/define.mjs +15 -0
- package/dist/report/hash.d.mts +13 -0
- package/dist/report/hash.mjs +29 -0
- package/dist/report/index.d.mts +4 -170
- package/dist/report/index.mjs +3 -55
- package/dist/report/registry.d.mts +18 -0
- package/dist/report/registry.mjs +14 -0
- package/dist/report/types.d.mts +139 -0
- package/dist/resolver/adapter.d.mts +13 -0
- package/dist/resolver/adapter.mjs +27 -0
- package/dist/resolver/canonical-source.d.mts +5 -0
- package/dist/resolver/canonical-source.mjs +14 -0
- package/dist/resolver/compile.d.mts +15 -0
- package/dist/resolver/compile.mjs +396 -0
- package/dist/resolver/datasets.d.mts +16 -0
- package/dist/resolver/datasets.mjs +159 -0
- package/dist/resolver/extras-overlay.d.mts +37 -0
- package/dist/resolver/extras-overlay.mjs +17 -0
- package/dist/resolver/filter-utils.d.mts +10 -0
- package/dist/resolver/filter-utils.mjs +59 -0
- package/dist/resolver/fragments.d.mts +60 -0
- package/dist/resolver/fragments.mjs +206 -0
- package/dist/resolver/index.d.mts +11 -371
- package/dist/resolver/index.mjs +10 -1
- package/dist/resolver/pg-adapter.d.mts +56 -0
- package/dist/resolver/pg-adapter.mjs +110 -0
- package/dist/resolver/run-query.d.mts +172 -0
- package/dist/resolver/run-query.mjs +241 -0
- package/dist/resolver/schema-drift.d.mts +15 -0
- package/dist/resolver/schema-drift.mjs +12 -0
- package/dist/rollups.d.mts +4 -4
- package/dist/rollups.mjs +3 -2
- package/dist/schedule.mjs +100 -0
- package/dist/schema.d.mts +34 -1
- package/dist/schema.mjs +78 -1
- package/dist/sink-node.d.mts +1 -159
- package/dist/sink-node.mjs +1 -133
- package/dist/sink.d.mts +125 -0
- package/dist/sinks/in-memory-sink.d.mts +25 -0
- package/dist/sinks/in-memory-sink.mjs +61 -0
- package/dist/sinks/index.d.mts +2 -0
- package/dist/sinks/index.mjs +2 -0
- package/dist/snapshot.d.mts +14 -0
- package/dist/source/attached-table.d.mts +45 -0
- package/dist/source/attached-table.mjs +55 -0
- package/dist/source/create-sql-query-source.d.mts +24 -0
- package/dist/source/create-sql-query-source.mjs +28 -0
- package/dist/source/index.d.mts +6 -66
- package/dist/source/index.mjs +9 -82
- package/dist/source/source-types.d.mts +49 -0
- package/dist/{_chunks/storage.d.mts → storage.d.mts} +4 -14
- package/dist/sync-config.d.mts +36 -0
- package/dist/sync-config.mjs +98 -0
- package/dist/vendor/hysnappy-purejs.mjs +12 -1
- package/package.json +4 -4
- package/dist/_chunks/analysis-types.d.mts +0 -57
- package/dist/_chunks/contracts.d.mts +0 -1
- package/dist/_chunks/engine.mjs +0 -731
- package/dist/_chunks/entities.mjs +0 -967
- package/dist/_chunks/errors.d.mts +0 -115
- package/dist/_chunks/index.d.mts +0 -53
- package/dist/_chunks/libs/hyparquet-compressors.mjs +0 -2796
- package/dist/_chunks/libs/hyparquet-writer.mjs +0 -2524
- package/dist/_chunks/libs/hyparquet.mjs +0 -2596
- package/dist/_chunks/libs/icebird.mjs +0 -564
- package/dist/_chunks/registry.d.mts +0 -213
- package/dist/_chunks/resolver.mjs +0 -1220
- package/dist/_chunks/sink.d.mts +0 -257
- /package/dist/{_chunks → analyzer}/dispatch.mjs +0 -0
- /package/dist/{_chunks/coerce.mjs → coerce.mjs} +0 -0
- /package/dist/{_chunks/layout.mjs → layout.mjs} +0 -0
- /package/dist/{_chunks/manifest-store-utils.mjs → manifest-store-utils.mjs} +0 -0
- /package/dist/{_chunks/libs/fzstd.mjs → node_modules/.pnpm/fzstd@0.1.1/node_modules/fzstd/esm/index.mjs} +0 -0
- /package/dist/{_chunks → resolver}/types.d.mts +0 -0
- /package/dist/{_chunks/schedule.d.mts → schedule.d.mts} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { uuid4 } from "./utils.mjs";
|
|
2
|
+
import { stringifyIcebergJson } from "./json.mjs";
|
|
3
|
+
import { maxFieldId, validateSchemaForVersion } from "./schema.mjs";
|
|
4
|
+
import { validatePartitionSpecForWrite } from "./write/partition.mjs";
|
|
5
|
+
async function icebergCreate({ tableUrl, resolver, schema, formatVersion, partitionSpec, sortOrder, properties, conditionalCommits }) {
|
|
6
|
+
if (!tableUrl) throw new Error("tableUrl is required");
|
|
7
|
+
if (formatVersion === void 0) {
|
|
8
|
+
const propVersion = properties?.["format-version"];
|
|
9
|
+
formatVersion = propVersion !== void 0 ? Number(propVersion) : 2;
|
|
10
|
+
}
|
|
11
|
+
if (formatVersion !== 2 && formatVersion !== 3) throw new Error(`unsupported format-version: ${formatVersion}`);
|
|
12
|
+
const metadataVersion = 1;
|
|
13
|
+
const metadataUrl = `${tableUrl}/metadata/v${metadataVersion}.metadata.json`;
|
|
14
|
+
const initialSchema = schema ?? {
|
|
15
|
+
type: "struct",
|
|
16
|
+
"schema-id": 0,
|
|
17
|
+
fields: []
|
|
18
|
+
};
|
|
19
|
+
validateSchemaForVersion(initialSchema, formatVersion);
|
|
20
|
+
const initialPartitionSpec = partitionSpec ?? {
|
|
21
|
+
"spec-id": 0,
|
|
22
|
+
fields: []
|
|
23
|
+
};
|
|
24
|
+
validatePartitionSpecForWrite(initialSchema, initialPartitionSpec);
|
|
25
|
+
const initialSortOrder = sortOrder ?? {
|
|
26
|
+
"order-id": 0,
|
|
27
|
+
fields: []
|
|
28
|
+
};
|
|
29
|
+
const metadata = {
|
|
30
|
+
"format-version": formatVersion,
|
|
31
|
+
"table-uuid": uuid4(),
|
|
32
|
+
location: tableUrl,
|
|
33
|
+
"last-sequence-number": 0,
|
|
34
|
+
"last-updated-ms": Date.now(),
|
|
35
|
+
"last-column-id": maxFieldId(initialSchema.fields),
|
|
36
|
+
"current-schema-id": initialSchema["schema-id"] ?? 0,
|
|
37
|
+
schemas: [initialSchema],
|
|
38
|
+
"default-spec-id": initialPartitionSpec["spec-id"],
|
|
39
|
+
"partition-specs": [initialPartitionSpec],
|
|
40
|
+
"last-partition-id": maxPartitionFieldId(initialPartitionSpec.fields),
|
|
41
|
+
"sort-orders": [initialSortOrder],
|
|
42
|
+
"default-sort-order-id": initialSortOrder["order-id"]
|
|
43
|
+
};
|
|
44
|
+
if (properties) metadata.properties = properties;
|
|
45
|
+
if (formatVersion >= 3) metadata["next-row-id"] = 0;
|
|
46
|
+
if (!resolver.writer) throw new Error("resolver.writer is required");
|
|
47
|
+
const metadataWriter = conditionalCommits ? resolver.writer(metadataUrl, { ifNoneMatch: "*" }) : resolver.writer(metadataUrl);
|
|
48
|
+
const metadataBytes = new TextEncoder().encode(stringifyIcebergJson(metadata));
|
|
49
|
+
metadataWriter.appendBytes(metadataBytes);
|
|
50
|
+
await metadataWriter.finish();
|
|
51
|
+
const versionHintUrl = `${tableUrl}/metadata/version-hint.text`;
|
|
52
|
+
try {
|
|
53
|
+
const versionHintWriter = resolver.writer(versionHintUrl);
|
|
54
|
+
const versionHintBytes = new TextEncoder().encode(String(metadataVersion));
|
|
55
|
+
versionHintWriter.appendBytes(versionHintBytes);
|
|
56
|
+
await versionHintWriter.finish();
|
|
57
|
+
} catch (err) {
|
|
58
|
+
if (!conditionalCommits) throw err;
|
|
59
|
+
}
|
|
60
|
+
return metadata;
|
|
61
|
+
}
|
|
62
|
+
function maxPartitionFieldId(partitionFields = []) {
|
|
63
|
+
let max = 0;
|
|
64
|
+
for (const pf of partitionFields) if (max < pf["field-id"]) max = pf["field-id"];
|
|
65
|
+
return max;
|
|
66
|
+
}
|
|
67
|
+
export { icebergCreate };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "../../../../hyparquet@1.26.2/node_modules/hyparquet/src/node.mjs";
|
|
2
|
+
import "../../../../hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/node.mjs";
|
|
3
|
+
import "../../../../hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/index.mjs";
|
|
4
|
+
import "./avro/avro.metadata.mjs";
|
|
5
|
+
import "./avro/avro.read.mjs";
|
|
6
|
+
import "./puffin/puffin.mjs";
|
|
7
|
+
import "./utils.mjs";
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./fetch.mjs";
|
|
2
|
+
import "./metadata.mjs";
|
|
3
|
+
import "./catalog/rest.mjs";
|
|
4
|
+
import "./create.mjs";
|
|
5
|
+
import "./manifest.mjs";
|
|
6
|
+
import "./read.mjs";
|
|
7
|
+
import { icebergCreateTable } from "./write/write.mjs";
|
|
8
|
+
import "./catalog/file.mjs";
|
|
9
|
+
import "./s3.mjs";
|
|
10
|
+
import "../../../../squirreling@0.15.0/node_modules/squirreling/src/index.mjs";
|
|
11
|
+
import "./sql/icebergDataSource.mjs";
|
|
12
|
+
import "./sql/icebergQuery.mjs";
|
|
13
|
+
export { icebergCreateTable };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
|
|
2
|
+
function parseIcebergJson(text) {
|
|
3
|
+
let i = 0;
|
|
4
|
+
function skipWs() {
|
|
5
|
+
while (i < text.length) {
|
|
6
|
+
const c = text.charCodeAt(i);
|
|
7
|
+
if (c !== 32 && c !== 9 && c !== 10 && c !== 13) break;
|
|
8
|
+
i++;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function parseString() {
|
|
12
|
+
if (text[i] !== "\"") throw new Error(`expected " at ${i}`);
|
|
13
|
+
i++;
|
|
14
|
+
let s = "";
|
|
15
|
+
while (i < text.length) {
|
|
16
|
+
const c = text[i++];
|
|
17
|
+
if (c === "\"") return s;
|
|
18
|
+
if (c !== "\\") {
|
|
19
|
+
s += c;
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
const e = text[i++];
|
|
23
|
+
if (e === "u") {
|
|
24
|
+
s += String.fromCharCode(parseInt(text.slice(i, i + 4), 16));
|
|
25
|
+
i += 4;
|
|
26
|
+
} else if (e === "n") s += "\n";
|
|
27
|
+
else if (e === "t") s += " ";
|
|
28
|
+
else if (e === "r") s += "\r";
|
|
29
|
+
else if (e === "b") s += "\b";
|
|
30
|
+
else if (e === "f") s += "\f";
|
|
31
|
+
else s += e;
|
|
32
|
+
}
|
|
33
|
+
throw new Error("unterminated string");
|
|
34
|
+
}
|
|
35
|
+
function parseNumber() {
|
|
36
|
+
const start = i;
|
|
37
|
+
if (text[i] === "-") i++;
|
|
38
|
+
while (text[i] >= "0" && text[i] <= "9") i++;
|
|
39
|
+
const intEnd = i;
|
|
40
|
+
let isFloat = false;
|
|
41
|
+
if (text[i] === ".") {
|
|
42
|
+
isFloat = true;
|
|
43
|
+
i++;
|
|
44
|
+
while (text[i] >= "0" && text[i] <= "9") i++;
|
|
45
|
+
}
|
|
46
|
+
if (text[i] === "e" || text[i] === "E") {
|
|
47
|
+
isFloat = true;
|
|
48
|
+
i++;
|
|
49
|
+
if (text[i] === "+" || text[i] === "-") i++;
|
|
50
|
+
while (text[i] >= "0" && text[i] <= "9") i++;
|
|
51
|
+
}
|
|
52
|
+
if (isFloat) return Number(text.slice(start, i));
|
|
53
|
+
const intStr = text.slice(start, intEnd);
|
|
54
|
+
if (intStr.length >= 16) {
|
|
55
|
+
const n = BigInt(intStr);
|
|
56
|
+
if (n > MAX_SAFE || n < -MAX_SAFE) return n;
|
|
57
|
+
}
|
|
58
|
+
return Number(intStr);
|
|
59
|
+
}
|
|
60
|
+
function parseLiteral(lit, val) {
|
|
61
|
+
if (text.slice(i, i + lit.length) !== lit) throw new Error(`bad literal at ${i}`);
|
|
62
|
+
i += lit.length;
|
|
63
|
+
return val;
|
|
64
|
+
}
|
|
65
|
+
function parseValue() {
|
|
66
|
+
skipWs();
|
|
67
|
+
const ch = text[i];
|
|
68
|
+
if (ch === "\"") return parseString();
|
|
69
|
+
if (ch === "{") return parseObject();
|
|
70
|
+
if (ch === "[") return parseArray();
|
|
71
|
+
if (ch === "t") return parseLiteral("true", true);
|
|
72
|
+
if (ch === "f") return parseLiteral("false", false);
|
|
73
|
+
if (ch === "n") return parseLiteral("null", null);
|
|
74
|
+
return parseNumber();
|
|
75
|
+
}
|
|
76
|
+
function parseObject() {
|
|
77
|
+
i++;
|
|
78
|
+
skipWs();
|
|
79
|
+
const obj = {};
|
|
80
|
+
if (text[i] === "}") {
|
|
81
|
+
i++;
|
|
82
|
+
return obj;
|
|
83
|
+
}
|
|
84
|
+
while (true) {
|
|
85
|
+
skipWs();
|
|
86
|
+
const key = parseString();
|
|
87
|
+
skipWs();
|
|
88
|
+
if (text[i] !== ":") throw new Error(`expected : at ${i}`);
|
|
89
|
+
i++;
|
|
90
|
+
obj[key] = parseValue();
|
|
91
|
+
skipWs();
|
|
92
|
+
if (text[i] === ",") {
|
|
93
|
+
i++;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (text[i] === "}") {
|
|
97
|
+
i++;
|
|
98
|
+
return obj;
|
|
99
|
+
}
|
|
100
|
+
throw new Error(`expected , or } at ${i}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function parseArray() {
|
|
104
|
+
i++;
|
|
105
|
+
skipWs();
|
|
106
|
+
const arr = [];
|
|
107
|
+
if (text[i] === "]") {
|
|
108
|
+
i++;
|
|
109
|
+
return arr;
|
|
110
|
+
}
|
|
111
|
+
while (true) {
|
|
112
|
+
arr.push(parseValue());
|
|
113
|
+
skipWs();
|
|
114
|
+
if (text[i] === ",") {
|
|
115
|
+
i++;
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (text[i] === "]") {
|
|
119
|
+
i++;
|
|
120
|
+
return arr;
|
|
121
|
+
}
|
|
122
|
+
throw new Error(`expected , or ] at ${i}`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const value = parseValue();
|
|
126
|
+
skipWs();
|
|
127
|
+
if (i !== text.length) throw new Error(`unexpected trailing input at ${i}`);
|
|
128
|
+
return value;
|
|
129
|
+
}
|
|
130
|
+
function stringifyIcebergJson(value, indent = 2) {
|
|
131
|
+
const pad = " ".repeat(indent);
|
|
132
|
+
function serialize(val, depth) {
|
|
133
|
+
if (typeof val === "bigint") return val.toString();
|
|
134
|
+
if (val === null || typeof val !== "object") return JSON.stringify(val);
|
|
135
|
+
const inner = pad.repeat(depth + 1);
|
|
136
|
+
const outer = pad.repeat(depth);
|
|
137
|
+
if (Array.isArray(val)) {
|
|
138
|
+
if (val.length === 0) return "[]";
|
|
139
|
+
return `[\n${val.map((v) => inner + serialize(v === void 0 ? null : v, depth + 1)).join(",\n")}\n${outer}]`;
|
|
140
|
+
}
|
|
141
|
+
const keys = Object.keys(val).filter((k) => val[k] !== void 0);
|
|
142
|
+
if (keys.length === 0) return "{}";
|
|
143
|
+
return `{\n${keys.map((k) => `${inner}${JSON.stringify(k)}: ${serialize(val[k], depth + 1)}`).join(",\n")}\n${outer}}`;
|
|
144
|
+
}
|
|
145
|
+
return serialize(value, 0);
|
|
146
|
+
}
|
|
147
|
+
export { parseIcebergJson, stringifyIcebergJson };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../../../../hyparquet@1.26.2/node_modules/hyparquet/src/utils.mjs";
|
|
2
|
+
import "../../../../hyparquet@1.26.2/node_modules/hyparquet/src/node.mjs";
|
|
3
|
+
import "../../../../hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/index.mjs";
|
|
4
|
+
import "./utils.mjs";
|
|
5
|
+
import "./fetch.mjs";
|
|
6
|
+
import "./metadata.mjs";
|
|
7
|
+
import "./delete.mjs";
|
|
8
|
+
import "./manifest.mjs";
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
function validateSchemaForVersion(schema, formatVersion) {
|
|
2
|
+
for (const field of schema.fields) validateFieldForVersion(field, formatVersion, field.name);
|
|
3
|
+
}
|
|
4
|
+
function maxFieldId(fields = []) {
|
|
5
|
+
let max = 0;
|
|
6
|
+
for (const field of fields) {
|
|
7
|
+
if (max < field.id) max = field.id;
|
|
8
|
+
const nested = maxNestedFieldId(field.type);
|
|
9
|
+
if (max < nested) max = nested;
|
|
10
|
+
}
|
|
11
|
+
return max;
|
|
12
|
+
}
|
|
13
|
+
function maxNestedFieldId(type) {
|
|
14
|
+
if (typeof type === "string") return 0;
|
|
15
|
+
if (type.type === "list") {
|
|
16
|
+
const elementId = type["element-id"] ?? 0;
|
|
17
|
+
return Math.max(elementId, maxNestedFieldId(type.element));
|
|
18
|
+
}
|
|
19
|
+
if (type.type === "map") {
|
|
20
|
+
const keyId = type["key-id"] ?? 0;
|
|
21
|
+
const valueId = type["value-id"] ?? 0;
|
|
22
|
+
return Math.max(keyId, valueId, maxNestedFieldId(type.key), maxNestedFieldId(type.value));
|
|
23
|
+
}
|
|
24
|
+
if (type.type === "struct") return maxFieldId(type.fields);
|
|
25
|
+
return 0;
|
|
26
|
+
}
|
|
27
|
+
const MAX_USER_FIELD_ID = 2147483447;
|
|
28
|
+
function validateFieldForVersion(field, formatVersion, path) {
|
|
29
|
+
if (typeof field.id === "number" && field.id > MAX_USER_FIELD_ID) throw new Error(`field id ${field.id} is in the reserved range (> ${MAX_USER_FIELD_ID}) (field: ${path})`);
|
|
30
|
+
if (formatVersion < 3) {
|
|
31
|
+
checkTypeForV2(field.type, path);
|
|
32
|
+
if (field["initial-default"] !== void 0) throw new Error(`initial-default requires format-version 3 (field: ${path})`);
|
|
33
|
+
if (field["write-default"] !== void 0) throw new Error(`write-default requires format-version 3 (field: ${path})`);
|
|
34
|
+
} else checkV3Default(field, path);
|
|
35
|
+
checkNestedFieldsForVersion(field.type, formatVersion, path);
|
|
36
|
+
}
|
|
37
|
+
function checkTypeForV2(type, path) {
|
|
38
|
+
if (typeof type === "string") {
|
|
39
|
+
if (type === "unknown" || type === "variant" || type === "timestamp_ns" || type === "timestamptz_ns" || type === "geometry" || type.startsWith("geometry(") || type === "geography" || type.startsWith("geography(")) throw new Error(`type ${type} requires format-version 3 (field: ${path})`);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (type.type === "struct") for (const f of type.fields) checkTypeForV2(f.type, `${path}.${f.name}`);
|
|
43
|
+
else if (type.type === "list") checkTypeForV2(type.element, `${path}.element`);
|
|
44
|
+
else if (type.type === "map") {
|
|
45
|
+
checkTypeForV2(type.key, `${path}.key`);
|
|
46
|
+
checkTypeForV2(type.value, `${path}.value`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function checkV3Default(field, path) {
|
|
50
|
+
const type = typeName(field.type);
|
|
51
|
+
if (!requiresNullDefault(type)) return;
|
|
52
|
+
for (const key of ["initial-default", "write-default"]) if (field[key] != null) throw new Error(`${key} for field ${path} of type ${type} must default to null`);
|
|
53
|
+
}
|
|
54
|
+
function checkNestedFieldsForVersion(type, formatVersion, path) {
|
|
55
|
+
if (typeof type === "string") return;
|
|
56
|
+
if (type.type === "struct") for (const f of type.fields) validateFieldForVersion(f, formatVersion, `${path}.${f.name}`);
|
|
57
|
+
else if (type.type === "list") {
|
|
58
|
+
checkReservedFieldId(type["element-id"], `${path}.element`);
|
|
59
|
+
checkNestedFieldsForVersion(type.element, formatVersion, `${path}.element`);
|
|
60
|
+
} else if (type.type === "map") {
|
|
61
|
+
checkReservedFieldId(type["key-id"], `${path}.key`);
|
|
62
|
+
checkReservedFieldId(type["value-id"], `${path}.value`);
|
|
63
|
+
checkNestedFieldsForVersion(type.key, formatVersion, `${path}.key`);
|
|
64
|
+
checkNestedFieldsForVersion(type.value, formatVersion, `${path}.value`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function checkReservedFieldId(id, path) {
|
|
68
|
+
if (typeof id === "number" && id > MAX_USER_FIELD_ID) throw new Error(`field id ${id} is in the reserved range (> ${MAX_USER_FIELD_ID}) (field: ${path})`);
|
|
69
|
+
}
|
|
70
|
+
function typeName(type) {
|
|
71
|
+
return typeof type === "string" ? type : type.type;
|
|
72
|
+
}
|
|
73
|
+
function requiresNullDefault(type) {
|
|
74
|
+
return type === "unknown" || type === "variant" || type === "geometry" || type.startsWith("geometry(") || type === "geography" || type.startsWith("geography(");
|
|
75
|
+
}
|
|
76
|
+
export { maxFieldId, typeName, validateSchemaForVersion };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { AsyncBuffer } from "
|
|
2
|
-
import
|
|
1
|
+
import { AsyncBuffer } from "../../../../hyparquet@1.26.2/node_modules/hyparquet/types/index.mjs";
|
|
2
|
+
import "../../../../hyparquet@1.26.2/node_modules/hyparquet/types/node.mjs";
|
|
3
|
+
import { Writer } from "../../../../hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/index.mjs";
|
|
4
|
+
import "../../../../hyparquet-writer@0.16.1_patch_hash_7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/node.mjs";
|
|
3
5
|
interface WriterOptions {
|
|
4
6
|
/**
|
|
5
7
|
* If `'*'`, the writer must create the object only if it does not already
|
|
@@ -211,34 +213,4 @@ interface FieldSummary {
|
|
|
211
213
|
lower_bound?: Uint8Array | null;
|
|
212
214
|
upper_bound?: Uint8Array | null;
|
|
213
215
|
}
|
|
214
|
-
|
|
215
|
-
* Create a new table. REST: delegates to the catalog's create endpoint.
|
|
216
|
-
* File: writes the initial `v1.metadata.json` and `version-hint.text` under
|
|
217
|
-
* `tableUrl` via `catalog.resolver`.
|
|
218
|
-
*
|
|
219
|
-
* @param {object} options
|
|
220
|
-
* @param {Catalog} options.catalog
|
|
221
|
-
* @param {string | string[]} [options.namespace] - REST catalog only.
|
|
222
|
-
* @param {string} [options.table] - REST catalog only.
|
|
223
|
-
* @param {string} [options.tableUrl] - File catalog only; also passed as `location` for REST.
|
|
224
|
-
* @param {Schema} [options.schema]
|
|
225
|
-
* @param {PartitionSpec} [options.partitionSpec]
|
|
226
|
-
* @param {SortOrder} [options.sortOrder]
|
|
227
|
-
* @param {Record<string, string>} [options.properties]
|
|
228
|
-
* @param {2 | 3} [options.formatVersion] - File catalog only.
|
|
229
|
-
* @param {boolean} [options.stageCreate] - REST catalog only.
|
|
230
|
-
* @returns {Promise<TableMetadata>}
|
|
231
|
-
*/
|
|
232
|
-
declare function icebergCreateTable({ catalog, namespace, table, tableUrl, schema, partitionSpec, sortOrder, properties, formatVersion, stageCreate }: {
|
|
233
|
-
catalog: Catalog;
|
|
234
|
-
namespace?: string | string[];
|
|
235
|
-
table?: string;
|
|
236
|
-
tableUrl?: string;
|
|
237
|
-
schema?: Schema;
|
|
238
|
-
partitionSpec?: PartitionSpec;
|
|
239
|
-
sortOrder?: SortOrder;
|
|
240
|
-
properties?: Record<string, string>;
|
|
241
|
-
formatVersion?: 2 | 3;
|
|
242
|
-
stageCreate?: boolean;
|
|
243
|
-
}): Promise<TableMetadata>;
|
|
244
|
-
export { icebergCreateTable };
|
|
216
|
+
export { Catalog, Field, FileCatalog, IcebergNestedType, IcebergType, Lister, Manifest, PartitionSpec, PartitionTransform, Resolver, RestCatalogContext, Schema, Snapshot, SnapshotRef, SortOrder, TableMetadata, WriterOptions };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
function uuid4() {
|
|
2
|
+
if (globalThis.crypto?.randomUUID) return globalThis.crypto.randomUUID();
|
|
3
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
4
|
+
const r = Math.random() * 16 | 0;
|
|
5
|
+
return (c === "x" ? r : r & 3 | 8).toString(16);
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export { uuid4 };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function parseDecimalType(type) {
|
|
2
|
+
const m = /^decimal\((\d+),\s*(\d+)\)$/.exec(type);
|
|
3
|
+
if (!m) return void 0;
|
|
4
|
+
return {
|
|
5
|
+
precision: parseInt(m[1], 10),
|
|
6
|
+
scale: parseInt(m[2], 10)
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function decimalRequiredBytes(precision) {
|
|
10
|
+
const limit = 10n ** BigInt(precision);
|
|
11
|
+
let n = 1;
|
|
12
|
+
let bound = 128n;
|
|
13
|
+
while (limit > bound) {
|
|
14
|
+
n++;
|
|
15
|
+
bound <<= 8n;
|
|
16
|
+
}
|
|
17
|
+
return n;
|
|
18
|
+
}
|
|
19
|
+
export { decimalRequiredBytes, parseDecimalType };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import "../utils.mjs";
|
|
2
|
+
import { decimalRequiredBytes, parseDecimalType } from "./conversions.mjs";
|
|
3
|
+
import { transformResultType } from "./transform.mjs";
|
|
4
|
+
function validatePartitionSpecForWrite(schema, partitionSpec, label = "partition spec") {
|
|
5
|
+
for (const pf of partitionSpec.fields) {
|
|
6
|
+
const sourceId = pf["source-id"];
|
|
7
|
+
if (sourceId === void 0) throw new Error(`${label}: partition field ${pf.name} is missing source-id`);
|
|
8
|
+
const sourceField = schema.fields.find((f) => f.id === sourceId);
|
|
9
|
+
if (!sourceField) throw new Error(`${label}: partition source field id ${sourceId} not found in schema`);
|
|
10
|
+
icebergTypeToAvro(transformResultType(pf.transform, sourceField.type), pf["field-id"]);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function icebergTypeToAvro(type, fieldId) {
|
|
14
|
+
const name = typeof type === "string" ? type : type.type;
|
|
15
|
+
const decimal = parseDecimalType(name);
|
|
16
|
+
if (decimal) return {
|
|
17
|
+
type: "fixed",
|
|
18
|
+
name: `r102_${fieldId}`,
|
|
19
|
+
size: decimalRequiredBytes(decimal.precision),
|
|
20
|
+
logicalType: "decimal",
|
|
21
|
+
precision: decimal.precision,
|
|
22
|
+
scale: decimal.scale
|
|
23
|
+
};
|
|
24
|
+
const fixed = /^fixed\[(\d+)\]$/.exec(name);
|
|
25
|
+
if (fixed) return {
|
|
26
|
+
type: "fixed",
|
|
27
|
+
name: `r102_${fieldId}`,
|
|
28
|
+
size: parseInt(fixed[1], 10)
|
|
29
|
+
};
|
|
30
|
+
switch (name) {
|
|
31
|
+
case "boolean": return "boolean";
|
|
32
|
+
case "int": return "int";
|
|
33
|
+
case "long": return "long";
|
|
34
|
+
case "float": return "float";
|
|
35
|
+
case "double": return "double";
|
|
36
|
+
case "string": return "string";
|
|
37
|
+
case "uuid": return {
|
|
38
|
+
type: "fixed",
|
|
39
|
+
name: `r102_${fieldId}`,
|
|
40
|
+
size: 16,
|
|
41
|
+
logicalType: "uuid"
|
|
42
|
+
};
|
|
43
|
+
case "binary": return "bytes";
|
|
44
|
+
case "date": return {
|
|
45
|
+
type: "int",
|
|
46
|
+
logicalType: "date"
|
|
47
|
+
};
|
|
48
|
+
case "time": return {
|
|
49
|
+
type: "long",
|
|
50
|
+
logicalType: "time-micros"
|
|
51
|
+
};
|
|
52
|
+
case "timestamp": return {
|
|
53
|
+
type: "long",
|
|
54
|
+
logicalType: "timestamp-micros",
|
|
55
|
+
"adjust-to-utc": false
|
|
56
|
+
};
|
|
57
|
+
case "timestamptz": return {
|
|
58
|
+
type: "long",
|
|
59
|
+
logicalType: "timestamp-micros",
|
|
60
|
+
"adjust-to-utc": true
|
|
61
|
+
};
|
|
62
|
+
case "timestamp_ns": return {
|
|
63
|
+
type: "long",
|
|
64
|
+
logicalType: "timestamp-nanos",
|
|
65
|
+
"adjust-to-utc": false
|
|
66
|
+
};
|
|
67
|
+
case "timestamptz_ns": return {
|
|
68
|
+
type: "long",
|
|
69
|
+
logicalType: "timestamp-nanos",
|
|
70
|
+
"adjust-to-utc": true
|
|
71
|
+
};
|
|
72
|
+
default: throw new Error(`unsupported partition source type: ${name}`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export { validatePartitionSpecForWrite };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../puffin/deletion-vector.mjs";
|
|
2
|
+
import "../puffin/puffin.mjs";
|
|
3
|
+
import "../utils.mjs";
|
|
4
|
+
import "../fetch.mjs";
|
|
5
|
+
import "../schema.mjs";
|
|
6
|
+
import "../delete.mjs";
|
|
7
|
+
import "./manifest.mjs";
|
|
8
|
+
import "./snapshot.mjs";
|
|
9
|
+
import "./stage.mjs";
|
|
10
|
+
import "./stage-position-delete.mjs";
|
|
11
|
+
export {};
|