@gscdump/lakehouse 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/handler.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.bitreader.mjs +88 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.blocks.mjs +120 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.context.mjs +1805 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.contextmap.mjs +49 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.dictionary.mjs +984 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.huffman.mjs +266 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.mjs +340 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.prefix.mjs +109 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.streams.mjs +21 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/brotli.transform.mjs +190 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/compressors.mjs +14 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/gzip.huffman.mjs +121 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/gzip.mjs +176 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/index.mjs +7 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.1/node_modules/hyparquet-compressors/src/lz4.mjs +52 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/bloom.mjs +93 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/bytewriter.mjs +91 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/column.mjs +186 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/datapage.mjs +113 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/delta.mjs +111 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/dictionary.mjs +99 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/dremel.mjs +116 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/encoding.mjs +51 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/geospatial.mjs +84 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/index.mjs +7 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/indexes.mjs +31 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/metadata.mjs +138 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/node.mjs +7 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/parquet-writer.mjs +139 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/plain.mjs +68 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/schema.mjs +254 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/snappy.mjs +125 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/splitstream.mjs +38 -0
- package/dist/_virtual/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 → _virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/types.d.mts} +2 -2
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/unconvert.mjs +247 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/variant.mjs +391 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/wkb.mjs +79 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/write-rows.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/src/write.mjs +46 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/bytewriter.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/index.d.mts +10 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/node.d.mts +3 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/parquet-writer.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/schema.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/write-rows.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/write.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/assemble.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/bloom.mjs +69 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/column.mjs +8 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/constants.mjs +80 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/convert.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/datapage.mjs +6 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/delta.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/encoding.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/filter.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/geoparquet.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/index.mjs +7 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/indexes.mjs +5 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/metadata.mjs +7 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/node.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/plain.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/plan.mjs +5 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/query.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/read.mjs +6 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/rowgroup.mjs +7 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/schema.mjs +54 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/snappy.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/thrift.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/utils.mjs +19 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/variant.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/wkb.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/xxhash.mjs +68 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/index.d.mts +7 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/indexes.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/metadata.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/node.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/query.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/read.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/snappy.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/types/utils.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/assemble.mjs +144 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/bloom.mjs +124 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/column.mjs +127 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/constants.mjs +75 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/convert.mjs +118 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/datapage.mjs +144 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/delta.mjs +65 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/encoding.mjs +76 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/filter.mjs +98 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/geoparquet.mjs +24 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/index.mjs +7 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/indexes.mjs +16 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/metadata.mjs +235 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/node.mjs +7 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/plain.mjs +78 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/plan.mjs +147 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/query.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/read.mjs +106 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/rowgroup.mjs +154 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/schema.mjs +75 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/snappy.mjs +70 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/thrift.mjs +86 -0
- package/dist/{_chunks/libs/hyparquet.d.mts → _virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/types.d.mts} +2 -3
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/utils.mjs +127 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/variant.mjs +225 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/wkb.mjs +94 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/src/xxhash.mjs +68 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/index.d.mts +9 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/indexes.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/metadata.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/node.d.mts +3 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/query.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/read.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/snappy.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.26.2/node_modules/hyparquet/types/utils.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/avro/avro.metadata.mjs +53 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/avro/avro.read.mjs +136 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/avro/avro.write.mjs +148 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/catalog/file.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/catalog/loadTable.mjs +48 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/catalog/rest.mjs +159 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/create.mjs +67 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/delete.mjs +34 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/fetch.mjs +261 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/index.mjs +13 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/json.mjs +147 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/manifest.mjs +84 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/metadata.mjs +159 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/prune.mjs +4 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/puffin/deletion-vector.mjs +122 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/puffin/puffin.mjs +78 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/puffin/roaring.mjs +132 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/read.mjs +324 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/s3.mjs +91 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/schema.mjs +76 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sigv4.mjs +70 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sql/icebergDataSource.mjs +8 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sql/icebergQuery.mjs +5 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/sql/whereFilter.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/types.d.mts +255 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/utils.mjs +45 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/commit.mjs +392 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/conversions.mjs +59 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/delete-file.mjs +52 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/geospatial.mjs +72 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/manifest-list.mjs +152 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/manifest.mjs +256 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/parquet.mjs +305 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/partition.mjs +178 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/rewrite.mjs +174 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/serde.mjs +148 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/snapshot.mjs +107 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/sort.mjs +47 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stage-deletion-vector.mjs +295 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stage-position-delete.mjs +216 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stage.mjs +354 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/stats.mjs +153 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/transform.mjs +220 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/src/write/write.mjs +476 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/catalog/file.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/catalog/rest.d.mts +76 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/create.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/fetch.d.mts +36 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/index.d.mts +13 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/manifest.d.mts +30 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/metadata.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/read.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/s3.d.mts +36 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/sql/icebergDataSource.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/sql/icebergQuery.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.15_patch_hash=d1902372376af18885e7c7dce807f1ecab86c2f86a9d1ff65d51e3b63b64b057/node_modules/icebird/types/write/write.d.mts +79 -0
- package/dist/{_chunks/libs/ioredis.d.mts → _virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/Command.d.mts} +1 -1
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/DataHandler.d.mts +4 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/Pipeline.d.mts +4 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/Redis.d.mts +10 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/ScanStream.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/SubscriptionSet.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/cluster/ClusterOptions.d.mts +4 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/cluster/index.d.mts +9 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/cluster/util.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/connectors/AbstractConnector.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/connectors/ConnectorConstructor.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/connectors/SentinelConnector/index.d.mts +6 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/connectors/SentinelConnector/types.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/connectors/StandaloneConnector.d.mts +3 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/index.d.mts +13 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/redis/RedisOptions.d.mts +4 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/transaction.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/types.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/utils/Commander.d.mts +3 -0
- package/dist/_virtual/node_modules/.pnpm/ioredis@5.10.1_supports-color@10.2.2/node_modules/ioredis/built/utils/RedisCommander.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/lru-cache@11.5.0/node_modules/lru-cache/dist/esm/index.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/lru-cache@11.5.0/node_modules/lru-cache/dist/esm/perf.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/readdirp@5.0.0/node_modules/readdirp/index.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/ast.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/backend/dataSource.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/accumulator.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/aggregates.mjs +10 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/execute.mjs +15 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/join.mjs +5 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/scanColumn.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/sort.mjs +5 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/streamingAggregate.mjs +9 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/utils.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/window.mjs +5 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/execute/yield.mjs +17 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/alias.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/binary.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/date.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/evaluate.mjs +15 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/math.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/regexp.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/expression/strings.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/index.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/index.mjs +9 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/expression.mjs +6 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/extractTables.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/functions.mjs +5 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/joins.mjs +7 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/parse.mjs +10 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/primary.mjs +8 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/state.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/tokenize.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/parse/types.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/plan/columns.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/plan/plan.mjs +7 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/plan/types.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/bbox.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/equality.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/operations.mjs +5 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/pointRelations.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/primitives.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/segments.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/spatial.mjs +6 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/spatial/wkt.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/types.d.mts +3 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/aggregates.mjs +3 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/executionErrors.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/functions.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/keywords.mjs +1 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/parseErrors.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/squirreling@0.15.0/node_modules/squirreling/src/validation/tables.mjs +2 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/dist/index.d.mts +32 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/dist/index2.d.mts +33 -0
- package/dist/{_chunks/libs/unstorage.d.mts → _virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/dist/shared/unstorage.DqlWKU2I.d.mts} +9 -13
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/dist/shared/unstorage2.DqlWKU2I.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/azure-app-configuration.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/azure-cosmos.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/azure-key-vault.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/azure-storage-blob.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/azure-storage-table.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/capacitor-preferences.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/cloudflare-kv-binding.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/cloudflare-kv-http.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/cloudflare-r2-binding.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/db0.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/deno-kv-node.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/deno-kv.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/fs-lite.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/fs.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/github.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/http.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/indexedb.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/localstorage.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/localstorage2.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/lru-cache.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/mongodb.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/netlify-blobs.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/overlay.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/planetscale.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/redis.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/s3.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/session-storage.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/uploadthing.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/upstash.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/vercel-blob.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/vercel-kv.d.mts +1 -0
- package/dist/_virtual/node_modules/.pnpm/unstorage@1.17.5_aws4fetch@1.0.20_db0@0.3.4_ioredis@5.10.1_supports-color@10.2.2_/node_modules/unstorage/drivers/vercel-runtime-cache.d.mts +1 -0
- package/dist/catalog-cache.d.mts +32 -0
- package/dist/catalog-cache.mjs +31 -0
- package/dist/{_chunks/catalog.d.mts → catalog.d.mts} +9 -70
- package/dist/{_chunks/catalog.mjs → catalog.mjs} +15 -96
- package/dist/dataset-runtime.mjs +68 -0
- package/dist/dataset.d.mts +154 -0
- package/dist/dataset.mjs +312 -0
- package/dist/date.d.mts +8 -0
- package/dist/date.mjs +13 -0
- package/dist/index.d.mts +6 -159
- package/dist/index.mjs +6 -361
- package/dist/maintenance.d.mts +2 -93
- package/dist/maintenance.mjs +2 -139
- package/dist/orphan-sweep.d.mts +94 -0
- package/dist/orphan-sweep.mjs +141 -0
- package/dist/partition-prune.d.mts +35 -0
- package/dist/partition-prune.mjs +57 -0
- package/dist/provisioning/allocator.d.mts +44 -0
- package/dist/provisioning/allocator.mjs +24 -0
- package/dist/provisioning/index.d.mts +2 -44
- package/dist/provisioning/index.mjs +1 -23
- package/dist/schema.d.mts +77 -2
- package/dist/schema.mjs +9 -1
- package/dist/unsafe-raw.d.mts +6 -2
- package/dist/unsafe-raw.mjs +6 -2
- package/dist/vendor/hysnappy-purejs.mjs +10 -0
- package/package.json +11 -1
- package/dist/_chunks/libs/hyparquet-compressors.mjs +0 -2785
- package/dist/_chunks/libs/hyparquet-writer.mjs +0 -2516
- package/dist/_chunks/libs/hyparquet.mjs +0 -474
- package/dist/_chunks/libs/icebird.d.mts +0 -500
- package/dist/_chunks/libs/icebird.mjs +0 -3854
- package/dist/_chunks/schema.d.mts +0 -74
- /package/dist/{_chunks/libs/chokidar.d.mts → _virtual/node_modules/.pnpm/db0@0.3.4_drizzle-orm@1.0.0-rc.3_@cloudflare+workers-types@5.20260722.1_valibot@1.4.2_typescript@7.0.2__zod@4.4.3_/node_modules/db0/dist/index.d.mts} +0 -0
- /package/dist/{_chunks/libs/db0.d.mts → _virtual/node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.d.mts} +0 -0
- /package/dist/{_chunks/libs/fzstd.mjs → _virtual/node_modules/.pnpm/fzstd@0.1.1/node_modules/fzstd/esm/index.mjs} +0 -0
- /package/dist/{_chunks/libs/denque.d.mts → _virtual/node_modules/.pnpm/hyparquet-writer@0.16.1_patch_hash=7a5e451ac7634d7546ac56bcc5eadacf7715a6241640c2b5a5bc0cfc9763b8ec/node_modules/hyparquet-writer/types/wkb.d.mts} +0 -0
- /package/dist/{_chunks/libs/lru-cache.d.mts → _virtual/node_modules/.pnpm/hyparquet@1.26.1/node_modules/hyparquet/src/types.d.mts} +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { bytesToHex } from "../utils.mjs";
|
|
2
|
+
import { decimalRequiredBytes, decimalToFixedBytes, parseDecimalType, toUint8Array, uuidToBytes } from "./conversions.mjs";
|
|
3
|
+
import { applyTransform, transformResultType } from "./transform.mjs";
|
|
4
|
+
function groupByPartition(records, schema, partitionSpec) {
|
|
5
|
+
const sourceFields = partitionSpec.fields.map((pf) => {
|
|
6
|
+
const sourceId = pf["source-id"];
|
|
7
|
+
if (sourceId === void 0) throw new Error(`partition field ${pf.name} is missing source-id`);
|
|
8
|
+
const sourceField = schema.fields.find((f) => f.id === sourceId);
|
|
9
|
+
if (!sourceField) throw new Error(`partition source field id ${sourceId} not found in schema`);
|
|
10
|
+
return {
|
|
11
|
+
partitionName: pf.name,
|
|
12
|
+
sourceName: sourceField.name,
|
|
13
|
+
sourceType: sourceField.type,
|
|
14
|
+
sourceWriteDefault: sourceField["write-default"],
|
|
15
|
+
transform: pf.transform,
|
|
16
|
+
resultType: transformResultType(pf.transform, sourceField.type)
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
const groups = /* @__PURE__ */ new Map();
|
|
20
|
+
for (const record of records) {
|
|
21
|
+
const partition = {};
|
|
22
|
+
const keyParts = [];
|
|
23
|
+
for (const { partitionName, sourceName, sourceType, sourceWriteDefault, transform, resultType } of sourceFields) {
|
|
24
|
+
let v = record[sourceName];
|
|
25
|
+
if (v === void 0 && sourceWriteDefault !== void 0) v = sourceWriteDefault;
|
|
26
|
+
partition[partitionName] = applyTransform(transform, v === void 0 ? null : v, sourceType);
|
|
27
|
+
keyParts.push(partitionKeyPart(partition[partitionName], resultType));
|
|
28
|
+
}
|
|
29
|
+
const key = JSON.stringify(keyParts);
|
|
30
|
+
let group = groups.get(key);
|
|
31
|
+
if (!group) {
|
|
32
|
+
group = {
|
|
33
|
+
partition,
|
|
34
|
+
records: []
|
|
35
|
+
};
|
|
36
|
+
groups.set(key, group);
|
|
37
|
+
}
|
|
38
|
+
group.records.push(record);
|
|
39
|
+
}
|
|
40
|
+
return [...groups.values()];
|
|
41
|
+
}
|
|
42
|
+
function validatePartitionSpecForWrite(schema, partitionSpec, label = "partition spec") {
|
|
43
|
+
for (const pf of partitionSpec.fields) {
|
|
44
|
+
const sourceId = pf["source-id"];
|
|
45
|
+
if (sourceId === void 0) throw new Error(`${label}: partition field ${pf.name} is missing source-id`);
|
|
46
|
+
const sourceField = schema.fields.find((f) => f.id === sourceId);
|
|
47
|
+
if (!sourceField) throw new Error(`${label}: partition source field id ${sourceId} not found in schema`);
|
|
48
|
+
icebergTypeToAvro(transformResultType(pf.transform, sourceField.type), pf["field-id"]);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function partitionAvroSchema(schema, partitionSpec) {
|
|
52
|
+
return {
|
|
53
|
+
type: "record",
|
|
54
|
+
name: "r102",
|
|
55
|
+
fields: partitionSpec.fields.map((pf) => {
|
|
56
|
+
const sourceField = schema.fields.find((f) => f.id === pf["source-id"]);
|
|
57
|
+
if (!sourceField) throw new Error(`partition source field id ${pf["source-id"]} not found`);
|
|
58
|
+
const resultType = transformResultType(pf.transform, sourceField.type);
|
|
59
|
+
return {
|
|
60
|
+
name: pf.name,
|
|
61
|
+
"field-id": pf["field-id"],
|
|
62
|
+
default: null,
|
|
63
|
+
type: ["null", icebergTypeToAvro(resultType, pf["field-id"])]
|
|
64
|
+
};
|
|
65
|
+
})
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function partitionSpecJson(partitionSpec) {
|
|
69
|
+
return JSON.stringify(partitionSpec.fields);
|
|
70
|
+
}
|
|
71
|
+
function partitionToAvroRecord(partition, schema, partitionSpec) {
|
|
72
|
+
const out = {};
|
|
73
|
+
for (const pf of partitionSpec.fields) {
|
|
74
|
+
const sourceField = schema.fields.find((f) => f.id === pf["source-id"]);
|
|
75
|
+
if (!sourceField) throw new Error(`partition source field id ${pf["source-id"]} not found`);
|
|
76
|
+
const resultType = transformResultType(pf.transform, sourceField.type);
|
|
77
|
+
const value = partition[pf.name];
|
|
78
|
+
out[pf.name] = value == null ? null : coerceForAvro(value, resultType);
|
|
79
|
+
}
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
82
|
+
function partitionKeyPart(value, type) {
|
|
83
|
+
if (value === null || value === void 0) return "__null__";
|
|
84
|
+
const name = typeof type === "string" ? type : type.type;
|
|
85
|
+
if (name === "uuid") return `uuid:${bytesToHex(uuidToBytes(value, "uuid partition value"))}`;
|
|
86
|
+
if (typeof value === "number" && (name === "float" || name === "double")) return `${name}:${floatPartitionKey(value, name)}`;
|
|
87
|
+
if (name === "long") return `long:${BigInt(value)}`;
|
|
88
|
+
if (typeof value === "bigint") return `b:${value.toString()}`;
|
|
89
|
+
if (value instanceof Date) return `d:${value.getTime()}`;
|
|
90
|
+
if (value instanceof Uint8Array) return `x:${bytesToHex(value)}`;
|
|
91
|
+
return `${typeof value}:${String(value)}`;
|
|
92
|
+
}
|
|
93
|
+
function floatPartitionKey(value, type) {
|
|
94
|
+
if (Number.isNaN(value)) return "nan";
|
|
95
|
+
const bytes = new Uint8Array(type === "float" ? 4 : 8);
|
|
96
|
+
const view = new DataView(bytes.buffer);
|
|
97
|
+
if (type === "float") view.setFloat32(0, value, false);
|
|
98
|
+
else view.setFloat64(0, value, false);
|
|
99
|
+
return bytesToHex(bytes);
|
|
100
|
+
}
|
|
101
|
+
function icebergTypeToAvro(type, fieldId) {
|
|
102
|
+
const name = typeof type === "string" ? type : type.type;
|
|
103
|
+
const decimal = parseDecimalType(name);
|
|
104
|
+
if (decimal) return {
|
|
105
|
+
type: "fixed",
|
|
106
|
+
name: `r102_${fieldId}`,
|
|
107
|
+
size: decimalRequiredBytes(decimal.precision),
|
|
108
|
+
logicalType: "decimal",
|
|
109
|
+
precision: decimal.precision,
|
|
110
|
+
scale: decimal.scale
|
|
111
|
+
};
|
|
112
|
+
const fixed = /^fixed\[(\d+)\]$/.exec(name);
|
|
113
|
+
if (fixed) return {
|
|
114
|
+
type: "fixed",
|
|
115
|
+
name: `r102_${fieldId}`,
|
|
116
|
+
size: parseInt(fixed[1], 10)
|
|
117
|
+
};
|
|
118
|
+
switch (name) {
|
|
119
|
+
case "boolean": return "boolean";
|
|
120
|
+
case "int": return "int";
|
|
121
|
+
case "long": return "long";
|
|
122
|
+
case "float": return "float";
|
|
123
|
+
case "double": return "double";
|
|
124
|
+
case "string": return "string";
|
|
125
|
+
case "uuid": return {
|
|
126
|
+
type: "fixed",
|
|
127
|
+
name: `r102_${fieldId}`,
|
|
128
|
+
size: 16,
|
|
129
|
+
logicalType: "uuid"
|
|
130
|
+
};
|
|
131
|
+
case "binary": return "bytes";
|
|
132
|
+
case "date": return {
|
|
133
|
+
type: "int",
|
|
134
|
+
logicalType: "date"
|
|
135
|
+
};
|
|
136
|
+
case "time": return {
|
|
137
|
+
type: "long",
|
|
138
|
+
logicalType: "time-micros"
|
|
139
|
+
};
|
|
140
|
+
case "timestamp": return {
|
|
141
|
+
type: "long",
|
|
142
|
+
logicalType: "timestamp-micros",
|
|
143
|
+
"adjust-to-utc": false
|
|
144
|
+
};
|
|
145
|
+
case "timestamptz": return {
|
|
146
|
+
type: "long",
|
|
147
|
+
logicalType: "timestamp-micros",
|
|
148
|
+
"adjust-to-utc": true
|
|
149
|
+
};
|
|
150
|
+
case "timestamp_ns": return {
|
|
151
|
+
type: "long",
|
|
152
|
+
logicalType: "timestamp-nanos",
|
|
153
|
+
"adjust-to-utc": false
|
|
154
|
+
};
|
|
155
|
+
case "timestamptz_ns": return {
|
|
156
|
+
type: "long",
|
|
157
|
+
logicalType: "timestamp-nanos",
|
|
158
|
+
"adjust-to-utc": true
|
|
159
|
+
};
|
|
160
|
+
default: throw new Error(`unsupported partition source type: ${name}`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
function coerceForAvro(value, type) {
|
|
164
|
+
const name = typeof type === "string" ? type : type.type;
|
|
165
|
+
if (name === "long") return typeof value === "bigint" ? value : BigInt(value);
|
|
166
|
+
if (name === "uuid") return uuidToBytes(value, "uuid partition value");
|
|
167
|
+
const decimal = parseDecimalType(name);
|
|
168
|
+
if (decimal) return decimalToFixedBytes(value, decimal.precision, decimal.scale, `decimal(${decimal.precision},${decimal.scale}) partition value`);
|
|
169
|
+
const fixed = /^fixed\[(\d+)\]$/.exec(name);
|
|
170
|
+
if (fixed) {
|
|
171
|
+
const bytes = toUint8Array(value);
|
|
172
|
+
const expected = parseInt(fixed[1], 10);
|
|
173
|
+
if (bytes.length !== expected) throw new Error(`expected fixed[${expected}] partition value`);
|
|
174
|
+
return bytes;
|
|
175
|
+
}
|
|
176
|
+
return value;
|
|
177
|
+
}
|
|
178
|
+
export { groupByPartition, partitionAvroSchema, partitionSpecJson, partitionToAvroRecord, validatePartitionSpecForWrite };
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { uuid4 } from "../utils.mjs";
|
|
2
|
+
import { groupByPartition } from "./partition.mjs";
|
|
3
|
+
import { writeDataManifest } from "./manifest.mjs";
|
|
4
|
+
import { computeColumnStats } from "./stats.mjs";
|
|
5
|
+
import { buildPartitionSummaries, buildSnapshotUpdate, currentSnapshot, loadPriorManifests } from "./snapshot.mjs";
|
|
6
|
+
import { writeParquet } from "./parquet.mjs";
|
|
7
|
+
import { buildSortComparator } from "./sort.mjs";
|
|
8
|
+
import { checkWriteFormat, newSnapshotId, resolveParquetCodec } from "./stage.mjs";
|
|
9
|
+
import { icebergRead } from "../read.mjs";
|
|
10
|
+
async function icebergStageRewrite({ tableUrl, metadata, resolver, sortOrderId, partitionSpecId, targetFileRows }) {
|
|
11
|
+
if (!tableUrl) throw new Error("tableUrl is required");
|
|
12
|
+
if (!resolver?.writer) throw new Error("resolver.writer is required");
|
|
13
|
+
const writerFn = resolver.writer;
|
|
14
|
+
if (metadata["format-version"] !== 2 && metadata["format-version"] !== 3) throw new Error(`unsupported format-version: ${metadata["format-version"]}`);
|
|
15
|
+
const formatVersion = metadata["format-version"];
|
|
16
|
+
if (targetFileRows !== void 0 && !(targetFileRows > 0)) throw new Error("targetFileRows must be a positive number");
|
|
17
|
+
if (!currentSnapshot(metadata)) throw new Error("no current snapshot to rewrite");
|
|
18
|
+
const schema = metadata.schemas.find((s) => s["schema-id"] === metadata["current-schema-id"]);
|
|
19
|
+
if (!schema) throw new Error("current schema not found in metadata");
|
|
20
|
+
const specId = partitionSpecId ?? metadata["default-spec-id"];
|
|
21
|
+
const partitionSpec = metadata["partition-specs"].find((s) => s["spec-id"] === specId);
|
|
22
|
+
if (!partitionSpec) throw new Error(`partition spec ${specId} not found in metadata`);
|
|
23
|
+
const orderId = sortOrderId ?? metadata["default-sort-order-id"] ?? 0;
|
|
24
|
+
const sortOrder = (metadata["sort-orders"] ?? []).find((o) => o["order-id"] === orderId);
|
|
25
|
+
if (sortOrderId !== void 0 && !sortOrder) throw new Error(`sort order ${sortOrderId} not found in metadata`);
|
|
26
|
+
const comparator = buildSortComparator(sortOrder, schema);
|
|
27
|
+
const appliedSortOrderId = comparator ? orderId : 0;
|
|
28
|
+
checkWriteFormat(metadata.properties?.["write.format.default"]);
|
|
29
|
+
const codec = resolveParquetCodec(metadata.properties?.["write.parquet.compression-codec"]);
|
|
30
|
+
const liveRows = await icebergRead({
|
|
31
|
+
tableUrl,
|
|
32
|
+
metadata,
|
|
33
|
+
resolver
|
|
34
|
+
});
|
|
35
|
+
const sortedRows = comparator ? [...liveRows].sort(comparator) : liveRows;
|
|
36
|
+
const rowLineage = formatVersion >= 3;
|
|
37
|
+
const allLineage = rowLineage && liveRows.length > 0 && liveRows.every((r) => r._row_id != null && r._last_updated_sequence_number != null);
|
|
38
|
+
const minRowId = allLineage ? liveRows.reduce((min, r) => r._row_id < min ? r._row_id : min, liveRows[0]._row_id) : void 0;
|
|
39
|
+
const groups = partitionSpec.fields.length ? groupByPartition(sortedRows, schema, partitionSpec) : [{
|
|
40
|
+
partition: {},
|
|
41
|
+
records: sortedRows
|
|
42
|
+
}];
|
|
43
|
+
const snapshotId = newSnapshotId(metadata);
|
|
44
|
+
const manifestUuid = uuid4();
|
|
45
|
+
const writeSchema = rowLineage ? {
|
|
46
|
+
...schema,
|
|
47
|
+
fields: [
|
|
48
|
+
...schema.fields,
|
|
49
|
+
{
|
|
50
|
+
id: 2147483540,
|
|
51
|
+
name: "_row_id",
|
|
52
|
+
required: false,
|
|
53
|
+
type: "long"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 2147483539,
|
|
57
|
+
name: "_last_updated_sequence_number",
|
|
58
|
+
required: false,
|
|
59
|
+
type: "long"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
} : schema;
|
|
63
|
+
const writtenDataFiles = [];
|
|
64
|
+
for (const group of groups) {
|
|
65
|
+
const chunks = targetFileRows ? chunkRecords(group.records, targetFileRows) : [group.records];
|
|
66
|
+
for (const chunk of chunks) {
|
|
67
|
+
if (chunk.length === 0) continue;
|
|
68
|
+
const dataPath = `${tableUrl}/data/${uuid4()}.parquet`;
|
|
69
|
+
const dataWriter = writerFn(dataPath);
|
|
70
|
+
await writeParquet({
|
|
71
|
+
writer: dataWriter,
|
|
72
|
+
schema: writeSchema,
|
|
73
|
+
records: chunk,
|
|
74
|
+
codec
|
|
75
|
+
});
|
|
76
|
+
const stats = computeColumnStats(chunk, schema);
|
|
77
|
+
writtenDataFiles.push({
|
|
78
|
+
partition: group.partition,
|
|
79
|
+
dataFile: {
|
|
80
|
+
content: 0,
|
|
81
|
+
file_path: dataPath,
|
|
82
|
+
file_format: "parquet",
|
|
83
|
+
partition: group.partition,
|
|
84
|
+
record_count: BigInt(chunk.length),
|
|
85
|
+
file_size_in_bytes: BigInt(dataWriter.offset),
|
|
86
|
+
value_counts: stats.value_counts,
|
|
87
|
+
null_value_counts: stats.null_value_counts,
|
|
88
|
+
nan_value_counts: stats.nan_value_counts,
|
|
89
|
+
lower_bounds: stats.lower_bounds,
|
|
90
|
+
upper_bounds: stats.upper_bounds,
|
|
91
|
+
sort_order_id: appliedSortOrderId
|
|
92
|
+
},
|
|
93
|
+
path: dataPath
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const manifestPath = `${tableUrl}/metadata/${manifestUuid}-m0.avro`;
|
|
98
|
+
const manifestWriter = writerFn(manifestPath);
|
|
99
|
+
await writeDataManifest({
|
|
100
|
+
writer: manifestWriter,
|
|
101
|
+
schema,
|
|
102
|
+
partitionSpec,
|
|
103
|
+
snapshotId,
|
|
104
|
+
dataFiles: writtenDataFiles.map((f) => f.dataFile),
|
|
105
|
+
formatVersion
|
|
106
|
+
});
|
|
107
|
+
const manifestLength = BigInt(manifestWriter.offset);
|
|
108
|
+
const sequenceNumber = BigInt(metadata["last-sequence-number"] ?? 0) + 1n;
|
|
109
|
+
const timestampMs = Date.now();
|
|
110
|
+
const addedRowCount = writtenDataFiles.reduce((sum, f) => sum + f.dataFile.record_count, 0n);
|
|
111
|
+
const addedFilesSize = writtenDataFiles.reduce((sum, f) => sum + f.dataFile.file_size_in_bytes, 0n);
|
|
112
|
+
const partitions = buildPartitionSummaries(writtenDataFiles.map((f) => f.dataFile.partition), schema, partitionSpec);
|
|
113
|
+
const newManifest = {
|
|
114
|
+
manifest_path: manifestPath,
|
|
115
|
+
manifest_length: manifestLength,
|
|
116
|
+
partition_spec_id: partitionSpec["spec-id"],
|
|
117
|
+
content: 0,
|
|
118
|
+
sequence_number: sequenceNumber,
|
|
119
|
+
min_sequence_number: sequenceNumber,
|
|
120
|
+
added_snapshot_id: snapshotId,
|
|
121
|
+
added_files_count: writtenDataFiles.length,
|
|
122
|
+
existing_files_count: 0,
|
|
123
|
+
deleted_files_count: 0,
|
|
124
|
+
added_rows_count: addedRowCount,
|
|
125
|
+
existing_rows_count: 0n,
|
|
126
|
+
deleted_rows_count: 0n,
|
|
127
|
+
partitions
|
|
128
|
+
};
|
|
129
|
+
if (allLineage) newManifest.first_row_id = minRowId;
|
|
130
|
+
const priorManifests = await loadPriorManifests(metadata, resolver);
|
|
131
|
+
const skipPriorManifestPaths = new Set(priorManifests.map((m) => m.manifest_path));
|
|
132
|
+
let deletedDataFiles = 0;
|
|
133
|
+
let deletedRecords = 0n;
|
|
134
|
+
for (const m of priorManifests) {
|
|
135
|
+
if (m.content !== 0) continue;
|
|
136
|
+
deletedDataFiles += (m.added_files_count ?? 0) + (m.existing_files_count ?? 0);
|
|
137
|
+
deletedRecords += BigInt(m.added_rows_count ?? 0) + BigInt(m.existing_rows_count ?? 0);
|
|
138
|
+
}
|
|
139
|
+
const summary = {
|
|
140
|
+
operation: "replace",
|
|
141
|
+
"added-data-files": String(writtenDataFiles.length),
|
|
142
|
+
"added-records": String(addedRowCount),
|
|
143
|
+
"added-files-size": String(addedFilesSize),
|
|
144
|
+
"deleted-data-files": String(deletedDataFiles),
|
|
145
|
+
"deleted-records": String(deletedRecords),
|
|
146
|
+
"total-records": String(addedRowCount),
|
|
147
|
+
"total-files-size": String(addedFilesSize),
|
|
148
|
+
"total-data-files": String(writtenDataFiles.length),
|
|
149
|
+
"total-delete-files": "0",
|
|
150
|
+
"total-position-deletes": "0",
|
|
151
|
+
"total-equality-deletes": "0"
|
|
152
|
+
};
|
|
153
|
+
return await buildSnapshotUpdate({
|
|
154
|
+
tableUrl,
|
|
155
|
+
metadata,
|
|
156
|
+
resolver,
|
|
157
|
+
snapshotId,
|
|
158
|
+
sequenceNumber,
|
|
159
|
+
manifestUuid,
|
|
160
|
+
timestampMs,
|
|
161
|
+
formatVersion,
|
|
162
|
+
newManifests: [newManifest],
|
|
163
|
+
summary,
|
|
164
|
+
writtenFiles: [...writtenDataFiles.map((f) => f.path), manifestPath],
|
|
165
|
+
priorManifests,
|
|
166
|
+
skipPriorManifestPaths
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function chunkRecords(arr, size) {
|
|
170
|
+
const out = [];
|
|
171
|
+
for (let i = 0; i < arr.length; i += size) out.push(arr.slice(i, i + size));
|
|
172
|
+
return out;
|
|
173
|
+
}
|
|
174
|
+
export { icebergStageRewrite };
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { typeName } from "../schema.mjs";
|
|
2
|
+
function serializeValue(value, type) {
|
|
3
|
+
const name = typeName(type);
|
|
4
|
+
if (name.startsWith("decimal(")) {
|
|
5
|
+
const m = /^decimal\((\d+),\s*(\d+)\)$/.exec(name);
|
|
6
|
+
if (!m) return void 0;
|
|
7
|
+
const scale = parseInt(m[2], 10);
|
|
8
|
+
if (typeof value !== "number" && typeof value !== "bigint") return void 0;
|
|
9
|
+
const factor = 10n ** BigInt(scale);
|
|
10
|
+
return twosComplementMinBigEndian(typeof value === "bigint" ? value * factor : BigInt(Math.round(value * Number(factor))));
|
|
11
|
+
}
|
|
12
|
+
if (name.startsWith("fixed[")) return value instanceof Uint8Array ? value : void 0;
|
|
13
|
+
switch (name) {
|
|
14
|
+
case "boolean": return new Uint8Array([value ? 1 : 0]);
|
|
15
|
+
case "int": {
|
|
16
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(4);
|
|
17
|
+
new DataView(buf).setInt32(0, value, true);
|
|
18
|
+
return new Uint8Array(buf);
|
|
19
|
+
}
|
|
20
|
+
case "long": {
|
|
21
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(8);
|
|
22
|
+
new DataView(buf).setBigInt64(0, typeof value === "bigint" ? value : BigInt(value), true);
|
|
23
|
+
return new Uint8Array(buf);
|
|
24
|
+
}
|
|
25
|
+
case "float": {
|
|
26
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(4);
|
|
27
|
+
new DataView(buf).setFloat32(0, value, true);
|
|
28
|
+
return new Uint8Array(buf);
|
|
29
|
+
}
|
|
30
|
+
case "double": {
|
|
31
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(8);
|
|
32
|
+
new DataView(buf).setFloat64(0, value, true);
|
|
33
|
+
return new Uint8Array(buf);
|
|
34
|
+
}
|
|
35
|
+
case "date": {
|
|
36
|
+
const days = value instanceof Date ? Math.floor(value.getTime() / 864e5) : Number(value);
|
|
37
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(4);
|
|
38
|
+
new DataView(buf).setInt32(0, days, true);
|
|
39
|
+
return new Uint8Array(buf);
|
|
40
|
+
}
|
|
41
|
+
case "time": {
|
|
42
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(8);
|
|
43
|
+
new DataView(buf).setBigInt64(0, typeof value === "bigint" ? value : BigInt(value), true);
|
|
44
|
+
return new Uint8Array(buf);
|
|
45
|
+
}
|
|
46
|
+
case "timestamp":
|
|
47
|
+
case "timestamptz": {
|
|
48
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(8);
|
|
49
|
+
new DataView(buf).setBigInt64(0, timestampToMicros(value), true);
|
|
50
|
+
return new Uint8Array(buf);
|
|
51
|
+
}
|
|
52
|
+
case "timestamp_ns":
|
|
53
|
+
case "timestamptz_ns": {
|
|
54
|
+
const buf = /* @__PURE__ */ new ArrayBuffer(8);
|
|
55
|
+
new DataView(buf).setBigInt64(0, timestampToNanos(value), true);
|
|
56
|
+
return new Uint8Array(buf);
|
|
57
|
+
}
|
|
58
|
+
case "string": return new TextEncoder().encode(value);
|
|
59
|
+
case "binary": return value instanceof Uint8Array ? value : void 0;
|
|
60
|
+
case "uuid":
|
|
61
|
+
if (value instanceof Uint8Array && value.length === 16) return value;
|
|
62
|
+
if (typeof value === "string") return uuidStringToBytes(value);
|
|
63
|
+
return;
|
|
64
|
+
default: return;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function compare(a, b, type) {
|
|
68
|
+
switch (typeName(type)) {
|
|
69
|
+
case "boolean": return (a ? 1 : 0) - (b ? 1 : 0);
|
|
70
|
+
case "int": return a < b ? -1 : a > b ? 1 : 0;
|
|
71
|
+
case "float":
|
|
72
|
+
case "double": return compareFloating(a, b);
|
|
73
|
+
case "long": {
|
|
74
|
+
const ai = typeof a === "bigint" ? a : BigInt(a);
|
|
75
|
+
const bi = typeof b === "bigint" ? b : BigInt(b);
|
|
76
|
+
return ai < bi ? -1 : ai > bi ? 1 : 0;
|
|
77
|
+
}
|
|
78
|
+
case "date": {
|
|
79
|
+
const ad = dateToDays(a);
|
|
80
|
+
const bd = dateToDays(b);
|
|
81
|
+
if (Number.isNaN(ad) || Number.isNaN(bd)) return NaN;
|
|
82
|
+
return ad < bd ? -1 : ad > bd ? 1 : 0;
|
|
83
|
+
}
|
|
84
|
+
case "timestamp":
|
|
85
|
+
case "timestamptz": return compareBigInt(timestampToMicros(a), timestampToMicros(b));
|
|
86
|
+
case "timestamp_ns":
|
|
87
|
+
case "timestamptz_ns": return compareBigInt(timestampToNanos(a), timestampToNanos(b));
|
|
88
|
+
case "string": return a < b ? -1 : a > b ? 1 : 0;
|
|
89
|
+
case "binary":
|
|
90
|
+
case "uuid": return compareBytes(a, b);
|
|
91
|
+
default:
|
|
92
|
+
if (typeName(type).startsWith("fixed[")) return compareBytes(a, b);
|
|
93
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function compareFloating(a, b) {
|
|
97
|
+
if (Object.is(a, b)) return 0;
|
|
98
|
+
if (a === 0 && b === 0) return Object.is(a, -0) ? -1 : 1;
|
|
99
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
100
|
+
}
|
|
101
|
+
function compareBigInt(a, b) {
|
|
102
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
103
|
+
}
|
|
104
|
+
function dateToDays(value) {
|
|
105
|
+
if (value instanceof Date) return Math.floor(value.getTime() / 864e5);
|
|
106
|
+
if (typeof value === "bigint") return Number(value);
|
|
107
|
+
if (typeof value === "number") return value;
|
|
108
|
+
if (typeof value === "string") {
|
|
109
|
+
const ms = Date.parse(value);
|
|
110
|
+
return Number.isNaN(ms) ? NaN : Math.floor(ms / 864e5);
|
|
111
|
+
}
|
|
112
|
+
return NaN;
|
|
113
|
+
}
|
|
114
|
+
function timestampToMicros(value) {
|
|
115
|
+
return typeof value === "bigint" ? value : value instanceof Date ? BigInt(value.getTime()) * 1000n : BigInt(value);
|
|
116
|
+
}
|
|
117
|
+
function timestampToNanos(value) {
|
|
118
|
+
return typeof value === "bigint" ? value : value instanceof Date ? BigInt(value.getTime()) * 1000000n : BigInt(value);
|
|
119
|
+
}
|
|
120
|
+
function compareBytes(a, b) {
|
|
121
|
+
const len = Math.min(a.length, b.length);
|
|
122
|
+
for (let i = 0; i < len; i++) if (a[i] !== b[i]) return a[i] - b[i];
|
|
123
|
+
return a.length - b.length;
|
|
124
|
+
}
|
|
125
|
+
function twosComplementMinBigEndian(value) {
|
|
126
|
+
const bytes = [];
|
|
127
|
+
let v = value;
|
|
128
|
+
while (true) {
|
|
129
|
+
const byte = Number(v & 255n);
|
|
130
|
+
bytes.unshift(byte);
|
|
131
|
+
v >>= 8n;
|
|
132
|
+
const sign = byte & 128;
|
|
133
|
+
if (!sign && v === 0n || sign && v === -1n) break;
|
|
134
|
+
}
|
|
135
|
+
return new Uint8Array(bytes);
|
|
136
|
+
}
|
|
137
|
+
function uuidStringToBytes(s) {
|
|
138
|
+
const hex = s.replace(/-/g, "");
|
|
139
|
+
if (hex.length !== 32) return void 0;
|
|
140
|
+
const out = /* @__PURE__ */ new Uint8Array(16);
|
|
141
|
+
for (let i = 0; i < 16; i++) {
|
|
142
|
+
const byte = parseInt(hex.slice(i * 2, i * 2 + 2), 16);
|
|
143
|
+
if (Number.isNaN(byte)) return void 0;
|
|
144
|
+
out[i] = byte;
|
|
145
|
+
}
|
|
146
|
+
return out;
|
|
147
|
+
}
|
|
148
|
+
export { compare, compareBigInt, compareBytes, compareFloating, dateToDays, serializeValue, timestampToMicros, timestampToNanos, twosComplementMinBigEndian, uuidStringToBytes };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { fetchAvroRecords } from "../fetch.mjs";
|
|
2
|
+
import { transformResultType } from "./transform.mjs";
|
|
3
|
+
import { writeManifestList } from "./manifest-list.mjs";
|
|
4
|
+
import { computeFieldSummary } from "./stats.mjs";
|
|
5
|
+
function currentSnapshot(metadata) {
|
|
6
|
+
const id = metadata["current-snapshot-id"];
|
|
7
|
+
if (id === void 0) return void 0;
|
|
8
|
+
return metadata.snapshots?.find((s) => s["snapshot-id"] === id);
|
|
9
|
+
}
|
|
10
|
+
async function loadPriorManifests(metadata, resolver) {
|
|
11
|
+
const snap = currentSnapshot(metadata);
|
|
12
|
+
if (!snap?.["manifest-list"]) return [];
|
|
13
|
+
return await fetchAvroRecords(snap["manifest-list"], resolver);
|
|
14
|
+
}
|
|
15
|
+
async function buildSnapshotUpdate({ tableUrl, metadata, resolver, snapshotId, sequenceNumber, manifestUuid, timestampMs, formatVersion, newManifests, summary, writtenFiles, priorManifests, skipPriorManifestPaths }) {
|
|
16
|
+
const writerFn = resolver.writer;
|
|
17
|
+
if (!writerFn) throw new Error("resolver.writer is required");
|
|
18
|
+
const rowLineage = formatVersion >= 3;
|
|
19
|
+
const firstRowId = rowLineage ? BigInt(metadata["next-row-id"] ?? 0) : 0n;
|
|
20
|
+
priorManifests ??= await loadPriorManifests(metadata, resolver);
|
|
21
|
+
if (skipPriorManifestPaths?.size) priorManifests = priorManifests.filter((manifest) => !skipPriorManifestPaths.has(manifest.manifest_path));
|
|
22
|
+
const allManifests = [...priorManifests, ...newManifests];
|
|
23
|
+
const addedRows = rowLineage ? assignFirstRowIds(allManifests, firstRowId) : 0n;
|
|
24
|
+
const manifestListPath = `${tableUrl}/metadata/snap-${snapshotId}-1-${manifestUuid}.avro`;
|
|
25
|
+
await writeManifestList({
|
|
26
|
+
writer: writerFn(manifestListPath),
|
|
27
|
+
snapshotId,
|
|
28
|
+
sequenceNumber,
|
|
29
|
+
manifests: allManifests,
|
|
30
|
+
formatVersion
|
|
31
|
+
});
|
|
32
|
+
const snapshot = {
|
|
33
|
+
"snapshot-id": Number(snapshotId),
|
|
34
|
+
"sequence-number": Number(sequenceNumber),
|
|
35
|
+
"timestamp-ms": timestampMs,
|
|
36
|
+
"manifest-list": manifestListPath,
|
|
37
|
+
summary,
|
|
38
|
+
"schema-id": metadata["current-schema-id"]
|
|
39
|
+
};
|
|
40
|
+
if (rowLineage) {
|
|
41
|
+
snapshot["first-row-id"] = toMetadataLong(firstRowId);
|
|
42
|
+
snapshot["added-rows"] = toMetadataLong(addedRows);
|
|
43
|
+
}
|
|
44
|
+
const rawCurrentSnapshotId = metadata["current-snapshot-id"];
|
|
45
|
+
const currentSnapshotId = rawCurrentSnapshotId === void 0 || rawCurrentSnapshotId === null || rawCurrentSnapshotId === -1 ? null : rawCurrentSnapshotId;
|
|
46
|
+
if (currentSnapshotId !== null) snapshot["parent-snapshot-id"] = currentSnapshotId;
|
|
47
|
+
const requirements = [{
|
|
48
|
+
type: "assert-table-uuid",
|
|
49
|
+
uuid: metadata["table-uuid"]
|
|
50
|
+
}, {
|
|
51
|
+
type: "assert-ref-snapshot-id",
|
|
52
|
+
ref: "main",
|
|
53
|
+
"snapshot-id": currentSnapshotId
|
|
54
|
+
}];
|
|
55
|
+
if (rowLineage) requirements.push({
|
|
56
|
+
type: "assert-next-row-id",
|
|
57
|
+
"next-row-id": toMetadataLong(metadata["next-row-id"] ?? 0)
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
snapshot,
|
|
61
|
+
requirements,
|
|
62
|
+
updates: [{
|
|
63
|
+
action: "add-snapshot",
|
|
64
|
+
snapshot
|
|
65
|
+
}, {
|
|
66
|
+
action: "set-snapshot-ref",
|
|
67
|
+
"ref-name": "main",
|
|
68
|
+
type: "branch",
|
|
69
|
+
"snapshot-id": snapshot["snapshot-id"]
|
|
70
|
+
}],
|
|
71
|
+
writtenFiles: [...writtenFiles, manifestListPath]
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function buildPartitionSummaries(partitions, schema, partitionSpec) {
|
|
75
|
+
return partitionSpec.fields.map((pf) => {
|
|
76
|
+
const sourceField = schema.fields.find((f) => f.id === pf["source-id"]);
|
|
77
|
+
if (!sourceField) throw new Error(`partition source field id ${pf["source-id"]} not found`);
|
|
78
|
+
const resultType = transformResultType(pf.transform, sourceField.type);
|
|
79
|
+
return computeFieldSummary(partitions.map((p) => p[pf.name]), resultType);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function assignFirstRowIds(manifests, firstRowId) {
|
|
83
|
+
let nextFirstRowId = firstRowId;
|
|
84
|
+
let assignedRows = 0n;
|
|
85
|
+
for (const manifest of manifests) {
|
|
86
|
+
if (manifest.content !== 0) {
|
|
87
|
+
manifest.first_row_id = void 0;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
const rowIdRange = BigInt(manifest.added_rows_count ?? 0) + BigInt(manifest.existing_rows_count ?? 0);
|
|
91
|
+
if (manifest.first_row_id == null) {
|
|
92
|
+
manifest.first_row_id = nextFirstRowId;
|
|
93
|
+
nextFirstRowId += rowIdRange;
|
|
94
|
+
assignedRows += rowIdRange;
|
|
95
|
+
} else {
|
|
96
|
+
const manifestEnd = BigInt(manifest.first_row_id) + rowIdRange;
|
|
97
|
+
if (manifestEnd > nextFirstRowId) nextFirstRowId = manifestEnd;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return assignedRows;
|
|
101
|
+
}
|
|
102
|
+
function toMetadataLong(value) {
|
|
103
|
+
const out = Number(value);
|
|
104
|
+
if (!Number.isSafeInteger(out)) throw new Error(`metadata long exceeds JavaScript safe integer range: ${value}`);
|
|
105
|
+
return out;
|
|
106
|
+
}
|
|
107
|
+
export { buildPartitionSummaries, buildSnapshotUpdate, currentSnapshot, loadPriorManifests };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { applyTransform, transformResultType } from "./transform.mjs";
|
|
2
|
+
import { compare } from "./serde.mjs";
|
|
3
|
+
function buildSortComparator(sortOrder, schema) {
|
|
4
|
+
if (!sortOrder?.fields?.length) return void 0;
|
|
5
|
+
const fields = sortOrder.fields.map((sf) => {
|
|
6
|
+
const sourceId = sf["source-id"] ?? sf["source-ids"]?.[0];
|
|
7
|
+
const sourceField = schema.fields.find((f) => f.id === sourceId);
|
|
8
|
+
if (!sourceField) throw new Error(`sort source field id ${sourceId} not found in schema`);
|
|
9
|
+
return {
|
|
10
|
+
name: sourceField.name,
|
|
11
|
+
transform: sf.transform,
|
|
12
|
+
sourceType: sourceField.type,
|
|
13
|
+
resultType: transformResultType(sf.transform, sourceField.type),
|
|
14
|
+
desc: sf.direction === "desc",
|
|
15
|
+
nullsFirst: sf["null-order"] === "nulls-first"
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
return (a, b) => {
|
|
19
|
+
for (const f of fields) {
|
|
20
|
+
const c = compareKeys(sortKey(a[f.name], f.transform, f.sourceType), sortKey(b[f.name], f.transform, f.sourceType), f.resultType, f.desc, f.nullsFirst);
|
|
21
|
+
if (c !== 0) return c;
|
|
22
|
+
}
|
|
23
|
+
return 0;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function sortKey(value, transform, sourceType) {
|
|
27
|
+
if (value === null || value === void 0) return null;
|
|
28
|
+
if (transform === "identity") return value;
|
|
29
|
+
return applyTransform(transform, value, sourceType);
|
|
30
|
+
}
|
|
31
|
+
function compareKeys(ka, kb, resultType, desc, nullsFirst) {
|
|
32
|
+
const aNull = ka === null || ka === void 0;
|
|
33
|
+
const bNull = kb === null || kb === void 0;
|
|
34
|
+
if (aNull && bNull) return 0;
|
|
35
|
+
if (aNull) return nullsFirst ? -1 : 1;
|
|
36
|
+
if (bNull) return nullsFirst ? 1 : -1;
|
|
37
|
+
const aNaN = typeof ka === "number" && Number.isNaN(ka);
|
|
38
|
+
const bNaN = typeof kb === "number" && Number.isNaN(kb);
|
|
39
|
+
if (aNaN || bNaN) {
|
|
40
|
+
if (aNaN && bNaN) return 0;
|
|
41
|
+
const c = aNaN ? 1 : -1;
|
|
42
|
+
return desc ? -c : c;
|
|
43
|
+
}
|
|
44
|
+
const c = compare(ka, kb, resultType);
|
|
45
|
+
return desc ? -c : c;
|
|
46
|
+
}
|
|
47
|
+
export { buildSortComparator };
|