@gscdump/lakehouse 7.6.0 → 7.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5/node_modules/hyparquet-compressors/src/gzip.mjs +196 -0
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.31.1/node_modules/hyparquet/src/column.mjs +1 -1
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.31.1/node_modules/hyparquet/src/datapage.mjs +1 -1
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.31.1/node_modules/hyparquet/src/index.mjs +1 -1
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.31.1/node_modules/hyparquet/src/indexes.mjs +1 -1
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.31.1/node_modules/hyparquet/src/metadata.mjs +1 -1
- package/dist/_virtual/node_modules/.pnpm/hyparquet@1.31.1/node_modules/hyparquet/src/node.mjs +1 -1
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471/node_modules/icebird/src/avro/avro.budget.mjs +115 -0
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471/node_modules/icebird/src/avro/avro.metadata.mjs +97 -0
- package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/avro/avro.read.mjs +67 -26
- package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/fetch.mjs +39 -40
- package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/manifest.mjs +49 -27
- package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/read.mjs +2 -2
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471/node_modules/icebird/types/fetch.d.mts +2 -0
- package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/index.d.mts +1 -1
- package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/manifest.d.mts +18 -2
- package/dist/catalog.d.mts +13 -5
- package/dist/catalog.mjs +28 -13
- package/dist/dataset-runtime.mjs +2 -2
- package/dist/dataset.d.mts +4 -0
- package/dist/dataset.mjs +4 -1
- package/dist/index.d.mts +3 -1
- package/dist/manifest-merge.mjs +6 -6
- package/dist/manifest-read-limits.d.mts +2 -0
- package/dist/manifest-read-limits.mjs +26 -0
- package/dist/orphan-sweep.mjs +3 -3
- package/dist/resolver-byte-cache.mjs +85 -0
- package/dist/unsafe-raw.d.mts +6 -6
- package/dist/unsafe-raw.mjs +5 -5
- package/package.json +1 -1
- package/dist/_virtual/node_modules/.pnpm/hyparquet-compressors@1.1.2/node_modules/hyparquet-compressors/src/gzip.mjs +0 -173
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/avro/avro.metadata.mjs +0 -65
- package/dist/_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/types/fetch.d.mts +0 -36
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/brotli.bitreader.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/brotli.blocks.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/brotli.context.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/brotli.contextmap.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/brotli.dictionary.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/brotli.huffman.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/brotli.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/brotli.prefix.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/brotli.streams.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/brotli.transform.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/compressors.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/gzip.huffman.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/index.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{hyparquet-compressors@1.1.2 → hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5}/node_modules/hyparquet-compressors/src/lz4.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/avro/avro.write.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/catalog/file.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/catalog/loadTable.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/catalog/rest.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/create.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/delete.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/index.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/json.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/metadata.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/prune.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/puffin/deletion-vector.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/puffin/puffin.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/puffin/roaring.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/s3.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/schema.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/sigv4.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/sql/icebergDataSource.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/sql/icebergQuery.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/sql/whereFilter.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/types.d.mts +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/utils.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/commit.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/conversions.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/delete-file.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/geospatial.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/manifest-list.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/manifest.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/parquet.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/partition.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/rewrite.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/serde.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/snapshot.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/sort.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/stage-deletion-vector.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/stage-position-delete.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/stage.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/stats.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/transform.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/src/write/write.mjs +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/catalog/file.d.mts +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/catalog/rest.d.mts +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/create.d.mts +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/metadata.d.mts +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/read.d.mts +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/s3.d.mts +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/sql/icebergDataSource.d.mts +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/sql/icebergQuery.d.mts +0 -0
- /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f → icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471}/node_modules/icebird/types/write/write.d.mts +0 -0
|
@@ -1,36 +1,54 @@
|
|
|
1
|
+
import { boundedBytes } from "./avro.budget.mjs";
|
|
2
|
+
import { checkBlockEnd, readBlockEnd, readZigZag, readZigZagBigInt } from "./avro.metadata.mjs";
|
|
3
|
+
import { gunzip } from "../../../../../hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5/node_modules/hyparquet-compressors/src/gzip.mjs";
|
|
4
|
+
import "../../../../../hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5/node_modules/hyparquet-compressors/src/index.mjs";
|
|
1
5
|
import { parseDecimal } from "../../../../../hyparquet@1.31.1/node_modules/hyparquet/src/convert.mjs";
|
|
2
|
-
import { gunzip } from "../../../../../hyparquet-compressors@1.1.2/node_modules/hyparquet-compressors/src/gzip.mjs";
|
|
3
|
-
import "../../../../../hyparquet-compressors@1.1.2/node_modules/hyparquet-compressors/src/index.mjs";
|
|
4
|
-
import { readZigZag, readZigZagBigInt } from "./avro.metadata.mjs";
|
|
5
6
|
const textDecoder = new TextDecoder();
|
|
6
|
-
function avroRead({ reader, metadata, syncMarker }) {
|
|
7
|
-
const
|
|
7
|
+
function avroRead({ reader, metadata, syncMarker, recordKind = "entries" }) {
|
|
8
|
+
const budget = reader.budget;
|
|
9
|
+
const decode = compileType(metadata["avro.schema"], budget);
|
|
8
10
|
const blocks = [];
|
|
9
11
|
while (reader.offset < reader.view.byteLength) {
|
|
10
12
|
let recordCount = readZigZag(reader);
|
|
13
|
+
if (budget && recordCount <= 0) budget.fail(/* @__PURE__ */ new RangeError("Invalid Avro record count"));
|
|
11
14
|
if (recordCount === 0) break;
|
|
12
15
|
if (recordCount < 0) recordCount = -recordCount;
|
|
16
|
+
budget?.records(recordCount, recordKind);
|
|
17
|
+
budget?.availableValues(recordCount);
|
|
13
18
|
const blockSize = readZigZag(reader);
|
|
14
|
-
let data =
|
|
19
|
+
let data = boundedBytes(reader, blockSize, budget?.limits.maxObjectBytes);
|
|
15
20
|
reader.offset += blockSize;
|
|
16
|
-
const blockSync =
|
|
21
|
+
const blockSync = boundedBytes(reader, 16, 16);
|
|
17
22
|
reader.offset += 16;
|
|
18
23
|
for (let i = 0; i < 16; i++) if (blockSync[i] !== syncMarker[i]) throw new Error("sync marker does not match");
|
|
19
24
|
const codec = metadata["avro.codec"];
|
|
20
|
-
if (codec === "deflate") data = gunzip(data
|
|
25
|
+
if (codec === "deflate") data = budget ? gunzip(data, void 0, 0, 0, {
|
|
26
|
+
raw: true,
|
|
27
|
+
maxOutputBytes: budget.inflateLimit()
|
|
28
|
+
}) : gunzip(data);
|
|
21
29
|
else if (codec !== "null") throw new Error(`unsupported codec: ${codec}`);
|
|
30
|
+
budget?.inflated(data.byteLength);
|
|
22
31
|
const dataReader = {
|
|
23
32
|
view: new DataView(data.buffer, data.byteOffset, data.byteLength),
|
|
24
|
-
offset: 0
|
|
33
|
+
offset: 0,
|
|
34
|
+
...budget ? { budget } : {}
|
|
25
35
|
};
|
|
26
36
|
for (let i = 0; i < recordCount; i++) blocks.push(decode(dataReader));
|
|
37
|
+
if (budget && dataReader.offset !== data.byteLength) budget.fail(/* @__PURE__ */ new RangeError("Avro block length mismatch"));
|
|
27
38
|
}
|
|
28
39
|
return blocks;
|
|
29
40
|
}
|
|
30
41
|
function readType(reader, type) {
|
|
42
|
+
reader.budget?.values(1);
|
|
43
|
+
return readTypeValue(reader, type);
|
|
44
|
+
}
|
|
45
|
+
function readTypeValue(reader, type) {
|
|
31
46
|
if (type === "null") return;
|
|
32
|
-
else if (Array.isArray(type))
|
|
33
|
-
|
|
47
|
+
else if (Array.isArray(type)) {
|
|
48
|
+
const unionIndex = readZigZag(reader);
|
|
49
|
+
reader.budget?.bound(unionIndex, type.length - 1, "unionIndex");
|
|
50
|
+
return readType(reader, type[unionIndex]);
|
|
51
|
+
} else if (typeof type === "object" && type.type === "record") {
|
|
34
52
|
const obj = {};
|
|
35
53
|
for (const subField of type.fields) obj[subField.name] = readType(reader, subField.type);
|
|
36
54
|
return obj;
|
|
@@ -39,11 +57,14 @@ function readType(reader, type) {
|
|
|
39
57
|
while (true) {
|
|
40
58
|
let count = readZigZag(reader);
|
|
41
59
|
if (count === 0) break;
|
|
60
|
+
let end;
|
|
42
61
|
if (count < 0) {
|
|
43
62
|
count = -count;
|
|
44
|
-
|
|
63
|
+
end = readBlockEnd(reader);
|
|
45
64
|
}
|
|
65
|
+
reader.budget?.availableValues(count);
|
|
46
66
|
for (let i = 0; i < count; i++) arr.push(readType(reader, type.items));
|
|
67
|
+
checkBlockEnd(reader, end);
|
|
47
68
|
}
|
|
48
69
|
return arr;
|
|
49
70
|
} else if (typeof type === "object" && type.type === "map") {
|
|
@@ -51,18 +72,24 @@ function readType(reader, type) {
|
|
|
51
72
|
while (true) {
|
|
52
73
|
let count = readZigZag(reader);
|
|
53
74
|
if (count === 0) break;
|
|
75
|
+
let end;
|
|
54
76
|
if (count < 0) {
|
|
55
77
|
count = -count;
|
|
56
|
-
|
|
78
|
+
end = readBlockEnd(reader);
|
|
57
79
|
}
|
|
80
|
+
reader.budget?.availableValues(count);
|
|
58
81
|
for (let i = 0; i < count; i++) {
|
|
59
82
|
const key = readType(reader, "string");
|
|
60
83
|
map[key] = readType(reader, type.values);
|
|
61
84
|
}
|
|
85
|
+
checkBlockEnd(reader, end);
|
|
62
86
|
}
|
|
63
87
|
return map;
|
|
64
|
-
} else if (typeof type === "object" && type.type === "enum")
|
|
65
|
-
|
|
88
|
+
} else if (typeof type === "object" && type.type === "enum") {
|
|
89
|
+
const index = readZigZag(reader);
|
|
90
|
+
reader.budget?.bound(index, type.symbols.length - 1, "enumIndex");
|
|
91
|
+
return type.symbols[index];
|
|
92
|
+
} else if (typeof type === "object" && "logicalType" in type && type.logicalType) {
|
|
66
93
|
if (type.logicalType === "date" && type.type === "int") {
|
|
67
94
|
const value = readZigZag(reader);
|
|
68
95
|
return /* @__PURE__ */ new Date(value * 864e5);
|
|
@@ -103,12 +130,12 @@ function readType(reader, type) {
|
|
|
103
130
|
return value;
|
|
104
131
|
} else if (type === "bytes") {
|
|
105
132
|
const length = readZigZag(reader);
|
|
106
|
-
const bytes =
|
|
133
|
+
const bytes = boundedBytes(reader, length);
|
|
107
134
|
reader.offset += length;
|
|
108
135
|
return bytes;
|
|
109
136
|
} else if (type === "string") {
|
|
110
137
|
const length = readZigZag(reader);
|
|
111
|
-
const bytes =
|
|
138
|
+
const bytes = boundedBytes(reader, length);
|
|
112
139
|
const text = textDecoder.decode(bytes);
|
|
113
140
|
reader.offset += length;
|
|
114
141
|
return text;
|
|
@@ -116,7 +143,7 @@ function readType(reader, type) {
|
|
|
116
143
|
else throw new Error(`unsupported type: ${JSON.stringify(type)}`);
|
|
117
144
|
}
|
|
118
145
|
function readFixed(reader, size) {
|
|
119
|
-
const bytes =
|
|
146
|
+
const bytes = boundedBytes(reader, size);
|
|
120
147
|
reader.offset += size;
|
|
121
148
|
return bytes;
|
|
122
149
|
}
|
|
@@ -128,39 +155,53 @@ function bytesToUuid(bytes) {
|
|
|
128
155
|
}
|
|
129
156
|
return hex;
|
|
130
157
|
}
|
|
131
|
-
function compileType(type) {
|
|
158
|
+
function compileType(type, budget) {
|
|
159
|
+
const decode = compileTypeValue(type, budget);
|
|
160
|
+
return budget ? (reader) => {
|
|
161
|
+
budget.values(1);
|
|
162
|
+
return decode(reader);
|
|
163
|
+
} : decode;
|
|
164
|
+
}
|
|
165
|
+
function compileTypeValue(type, budget) {
|
|
132
166
|
if (type === "null") return () => void 0;
|
|
133
167
|
if (type === "int") return readZigZag;
|
|
134
168
|
if (type === "long") return readZigZagBigInt;
|
|
135
169
|
if (type === "string" || type === "bytes") return (reader) => {
|
|
136
170
|
const length = readZigZag(reader);
|
|
137
|
-
const bytes =
|
|
171
|
+
const bytes = boundedBytes(reader, length);
|
|
138
172
|
reader.offset += length;
|
|
139
173
|
return type === "string" ? textDecoder.decode(bytes) : bytes;
|
|
140
174
|
};
|
|
141
175
|
if (Array.isArray(type)) {
|
|
142
|
-
const readers = type.map(compileType);
|
|
143
|
-
return (reader) =>
|
|
176
|
+
const readers = type.map((item) => compileType(item, budget));
|
|
177
|
+
return (reader) => {
|
|
178
|
+
const index = readZigZag(reader);
|
|
179
|
+
budget?.bound(index, readers.length - 1, "unionIndex");
|
|
180
|
+
return readers[index](reader);
|
|
181
|
+
};
|
|
144
182
|
}
|
|
145
183
|
if (typeof type === "object" && type.type === "array") {
|
|
146
|
-
const item = compileType(type.items);
|
|
184
|
+
const item = compileType(type.items, budget);
|
|
147
185
|
return (reader) => {
|
|
148
186
|
const arr = [];
|
|
149
187
|
while (true) {
|
|
150
188
|
let count = readZigZag(reader);
|
|
151
189
|
if (count === 0) return arr;
|
|
190
|
+
let end;
|
|
152
191
|
if (count < 0) {
|
|
153
192
|
count = -count;
|
|
154
|
-
|
|
193
|
+
end = readBlockEnd(reader);
|
|
155
194
|
}
|
|
195
|
+
budget?.availableValues(count);
|
|
156
196
|
for (let i = 0; i < count; i++) arr.push(item(reader));
|
|
197
|
+
checkBlockEnd(reader, end);
|
|
157
198
|
}
|
|
158
199
|
};
|
|
159
200
|
}
|
|
160
201
|
if (typeof type === "object" && type.type === "record") {
|
|
161
202
|
const fields = type.fields.map((field) => ({
|
|
162
203
|
name: field.name,
|
|
163
|
-
read: compileType(field.type)
|
|
204
|
+
read: compileType(field.type, budget)
|
|
164
205
|
}));
|
|
165
206
|
if (fields.length === 2) {
|
|
166
207
|
const [{ name: firstName, read: firstRead }, { name: secondName, read: secondRead }] = fields;
|
|
@@ -177,6 +218,6 @@ function compileType(type) {
|
|
|
177
218
|
return obj;
|
|
178
219
|
};
|
|
179
220
|
}
|
|
180
|
-
return (reader) =>
|
|
221
|
+
return (reader) => readTypeValue(reader, type);
|
|
181
222
|
}
|
|
182
223
|
export { avroRead };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { avroMetadata } from "./avro/avro.metadata.mjs";
|
|
2
|
+
import { compressors } from "../../../../hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5/node_modules/hyparquet-compressors/src/compressors.mjs";
|
|
3
|
+
import "../../../../hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5/node_modules/hyparquet-compressors/src/index.mjs";
|
|
4
|
+
import { avroRead } from "./avro/avro.read.mjs";
|
|
1
5
|
import { parquetMetadataAsync } from "../../../../hyparquet@1.31.1/node_modules/hyparquet/src/metadata.mjs";
|
|
2
6
|
import { asyncBufferFromUrl, cachedAsyncBuffer } from "../../../../hyparquet@1.31.1/node_modules/hyparquet/src/utils.mjs";
|
|
3
7
|
import { parquetReadObjects } from "../../../../hyparquet@1.31.1/node_modules/hyparquet/src/read.mjs";
|
|
4
8
|
import "../../../../hyparquet@1.31.1/node_modules/hyparquet/src/node.mjs";
|
|
5
|
-
import { compressors } from "../../../../hyparquet-compressors@1.1.2/node_modules/hyparquet-compressors/src/compressors.mjs";
|
|
6
|
-
import "../../../../hyparquet-compressors@1.1.2/node_modules/hyparquet-compressors/src/index.mjs";
|
|
7
9
|
import { ByteWriter } from "../../../../hyparquet-writer@0.16.10_patch_hash=d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/bytewriter.mjs";
|
|
8
10
|
import "../../../../hyparquet-writer@0.16.10_patch_hash=d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/node.mjs";
|
|
9
|
-
import { avroMetadata } from "./avro/avro.metadata.mjs";
|
|
10
|
-
import { avroRead } from "./avro/avro.read.mjs";
|
|
11
11
|
import { sanitize } from "./utils.mjs";
|
|
12
12
|
import { isDeletionVector } from "./delete.mjs";
|
|
13
13
|
import { puffinReadDeletionVector } from "./puffin/puffin.mjs";
|
|
@@ -68,40 +68,6 @@ function urlResolver({ requestInit } = {}) {
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
-
function cachingResolver(base) {
|
|
72
|
-
const cache = /* @__PURE__ */ new Map();
|
|
73
|
-
const out = { reader(path, byteLength) {
|
|
74
|
-
let buf = cache.get(path);
|
|
75
|
-
if (!buf) {
|
|
76
|
-
buf = (async () => cachedAsyncBuffer(await base.reader(path, byteLength)))();
|
|
77
|
-
cache.set(path, buf);
|
|
78
|
-
buf.catch(() => {
|
|
79
|
-
if (cache.get(path) === buf) cache.delete(path);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
return buf;
|
|
83
|
-
} };
|
|
84
|
-
if (base.writer) {
|
|
85
|
-
const baseWriter = base.writer;
|
|
86
|
-
out.writer = (path, options) => {
|
|
87
|
-
const w = baseWriter(path, options);
|
|
88
|
-
const origFinish = w.finish.bind(w);
|
|
89
|
-
w.finish = async function() {
|
|
90
|
-
await origFinish();
|
|
91
|
-
cache.delete(path);
|
|
92
|
-
};
|
|
93
|
-
return w;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
if (base.deleter) {
|
|
97
|
-
const baseDeleter = base.deleter;
|
|
98
|
-
out.deleter = async (path) => {
|
|
99
|
-
await baseDeleter(path);
|
|
100
|
-
cache.delete(path);
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
return out;
|
|
104
|
-
}
|
|
105
71
|
function s3Lister({ requestInit } = {}) {
|
|
106
72
|
return async function list(url) {
|
|
107
73
|
const s3parts = s3ParseUrl(url);
|
|
@@ -251,7 +217,8 @@ async function decompressGzip(buf) {
|
|
|
251
217
|
const stream = new Blob([buf]).stream().pipeThrough(new DecompressionStream("gzip"));
|
|
252
218
|
return await new Response(stream).arrayBuffer();
|
|
253
219
|
}
|
|
254
|
-
async function fetchAvroRecords(url, resolver, byteLength) {
|
|
220
|
+
async function fetchAvroRecords(url, resolver, byteLength, budget, recordKind) {
|
|
221
|
+
if (budget) return (await fetchBoundedAvroObject(url, resolver, byteLength, budget, recordKind)).records;
|
|
255
222
|
const lengthHint = byteLength !== void 0 && Number.isFinite(byteLength) ? byteLength : void 0;
|
|
256
223
|
const ab = await resolver.reader(url, lengthHint);
|
|
257
224
|
const buffer = await ab.slice(0, ab.byteLength);
|
|
@@ -266,4 +233,36 @@ async function fetchAvroRecords(url, resolver, byteLength) {
|
|
|
266
233
|
syncMarker
|
|
267
234
|
});
|
|
268
235
|
}
|
|
269
|
-
|
|
236
|
+
async function fetchBoundedAvroObject(url, resolver, byteLength, budget, recordKind = "entries") {
|
|
237
|
+
try {
|
|
238
|
+
budget.check();
|
|
239
|
+
if (byteLength !== void 0) budget.bound(byteLength, budget.limits.maxObjectBytes, "lengthHint");
|
|
240
|
+
const ab = await resolver.reader(url, byteLength);
|
|
241
|
+
budget.check();
|
|
242
|
+
const length = ab.byteLength;
|
|
243
|
+
budget.object(length);
|
|
244
|
+
if (byteLength !== void 0 && byteLength !== length) throw new Error("Manifest object length changed");
|
|
245
|
+
const buffer = await ab.slice(0, length);
|
|
246
|
+
budget.check();
|
|
247
|
+
if (buffer.byteLength !== length) throw new Error("Manifest object range length changed");
|
|
248
|
+
const reader = {
|
|
249
|
+
view: new DataView(buffer),
|
|
250
|
+
offset: 0,
|
|
251
|
+
budget
|
|
252
|
+
};
|
|
253
|
+
const { metadata, syncMarker } = avroMetadata(reader);
|
|
254
|
+
return {
|
|
255
|
+
metadata,
|
|
256
|
+
records: avroRead({
|
|
257
|
+
reader,
|
|
258
|
+
metadata,
|
|
259
|
+
syncMarker,
|
|
260
|
+
recordKind
|
|
261
|
+
}),
|
|
262
|
+
byteLength: length
|
|
263
|
+
};
|
|
264
|
+
} catch (error) {
|
|
265
|
+
return budget.fail(error);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
export { fetchAvroRecords, fetchBoundedAvroObject, fetchDeleteMaps, readParquetMetadata, resolveText, s3Lister, s3ParseUrl, translateS3Url, urlResolver };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { createAvroBudget } from "./avro/avro.budget.mjs";
|
|
1
2
|
import { avroMetadata } from "./avro/avro.metadata.mjs";
|
|
2
3
|
import { avroRead } from "./avro/avro.read.mjs";
|
|
3
|
-
import { fetchAvroRecords, urlResolver } from "./fetch.mjs";
|
|
4
|
+
import { fetchAvroRecords, fetchBoundedAvroObject, urlResolver } from "./fetch.mjs";
|
|
4
5
|
const MANIFEST_FETCH_CONCURRENCY = 8;
|
|
5
6
|
function memoRead(cache, key, read, retain = true) {
|
|
6
7
|
if (!cache) return read();
|
|
@@ -15,7 +16,10 @@ function memoRead(cache, key, read, retain = true) {
|
|
|
15
16
|
});
|
|
16
17
|
return pending;
|
|
17
18
|
}
|
|
18
|
-
async function icebergManifests({ metadata, resolver, snapshotId, partitionFilter, manifestCache }) {
|
|
19
|
+
async function icebergManifests({ metadata, resolver, snapshotId, partitionFilter, manifestCache, readLimits }) {
|
|
20
|
+
const budget = createAvroBudget(readLimits);
|
|
21
|
+
if (budget && manifestCache !== void 0) throw new TypeError("Bounded manifest reads require an uncached walk");
|
|
22
|
+
const inlineEntries = budget ? /* @__PURE__ */ new Map() : void 0;
|
|
19
23
|
resolver ??= urlResolver();
|
|
20
24
|
const rawTarget = snapshotId ?? metadata["current-snapshot-id"];
|
|
21
25
|
if (rawTarget == null || rawTarget < 0) throw new Error("No current snapshot id found in table metadata");
|
|
@@ -25,8 +29,8 @@ async function icebergManifests({ metadata, resolver, snapshotId, partitionFilte
|
|
|
25
29
|
let manifests;
|
|
26
30
|
if (snapshot["manifest-list"]) {
|
|
27
31
|
const manifestListUrl = snapshot["manifest-list"];
|
|
28
|
-
manifests = await memoRead(manifestCache?.lists, manifestListUrl, () => fetchAvroRecords(manifestListUrl, resolver));
|
|
29
|
-
} else if (snapshot.manifests) manifests = await memoRead(manifestCache?.lists, `inline:${targetId}`, () => resolveInlineManifests(snapshot, resolver));
|
|
32
|
+
manifests = await memoRead(manifestCache?.lists, manifestListUrl, () => fetchAvroRecords(manifestListUrl, resolver, void 0, budget, "manifests"));
|
|
33
|
+
} else if (snapshot.manifests) manifests = await memoRead(manifestCache?.lists, `inline:${targetId}`, () => resolveInlineManifests(snapshot, resolver, budget, inlineEntries));
|
|
30
34
|
else throw new Error("No manifest information found in snapshot");
|
|
31
35
|
if (partitionFilter) manifests = manifests.filter((manifest) => {
|
|
32
36
|
try {
|
|
@@ -35,22 +39,35 @@ async function icebergManifests({ metadata, resolver, snapshotId, partitionFilte
|
|
|
35
39
|
return true;
|
|
36
40
|
}
|
|
37
41
|
});
|
|
38
|
-
return await fetchManifests(manifests, resolver, manifestCache);
|
|
42
|
+
return await fetchManifests(manifests, resolver, manifestCache, budget, inlineEntries);
|
|
39
43
|
}
|
|
40
|
-
async function resolveInlineManifests(snapshot, resolver) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
async function resolveInlineManifests(snapshot, resolver, budget, inlineEntries) {
|
|
45
|
+
const inline = snapshot.manifests ?? [];
|
|
46
|
+
budget?.records(inline.length, "manifests");
|
|
47
|
+
return await mapWithConcurrency(inline, async (manifestPath) => {
|
|
48
|
+
budget?.check();
|
|
49
|
+
let metadata, entries, byteLength;
|
|
50
|
+
if (budget) {
|
|
51
|
+
const object = await fetchBoundedAvroObject(manifestPath, resolver, void 0, budget);
|
|
52
|
+
metadata = object.metadata;
|
|
53
|
+
entries = object.records;
|
|
54
|
+
byteLength = object.byteLength;
|
|
55
|
+
inlineEntries.set(manifestPath, entries);
|
|
56
|
+
} else {
|
|
57
|
+
const ab = await resolver.reader(manifestPath);
|
|
58
|
+
const buffer = await ab.slice(0, ab.byteLength);
|
|
59
|
+
const reader = {
|
|
60
|
+
view: new DataView(buffer),
|
|
61
|
+
offset: 0
|
|
62
|
+
};
|
|
63
|
+
const header = await avroMetadata(reader);
|
|
64
|
+
metadata = header.metadata;
|
|
65
|
+
byteLength = ab.byteLength;
|
|
66
|
+
entries = await avroRead({
|
|
67
|
+
reader,
|
|
68
|
+
...header
|
|
69
|
+
});
|
|
70
|
+
}
|
|
54
71
|
const counts = [
|
|
55
72
|
0,
|
|
56
73
|
0,
|
|
@@ -67,7 +84,7 @@ async function resolveInlineManifests(snapshot, resolver) {
|
|
|
67
84
|
}
|
|
68
85
|
return {
|
|
69
86
|
manifest_path: manifestPath,
|
|
70
|
-
manifest_length: BigInt(
|
|
87
|
+
manifest_length: BigInt(byteLength),
|
|
71
88
|
partition_spec_id: Number(metadata["partition-spec-id"] ?? 0),
|
|
72
89
|
content: 0,
|
|
73
90
|
added_snapshot_id: BigInt(snapshot["snapshot-id"]),
|
|
@@ -78,11 +95,12 @@ async function resolveInlineManifests(snapshot, resolver) {
|
|
|
78
95
|
existing_rows_count: rows[0],
|
|
79
96
|
deleted_rows_count: rows[2]
|
|
80
97
|
};
|
|
81
|
-
});
|
|
98
|
+
}, budget);
|
|
82
99
|
}
|
|
83
|
-
async function fetchOneManifest(manifest, resolver) {
|
|
100
|
+
async function fetchOneManifest(manifest, resolver, budget, inlineEntries) {
|
|
101
|
+
budget?.check();
|
|
84
102
|
const url = manifest.manifest_path;
|
|
85
|
-
const entries = await fetchAvroRecords(url, resolver, Number(manifest.manifest_length));
|
|
103
|
+
const entries = inlineEntries?.get(url) ?? await fetchAvroRecords(url, resolver, Number(manifest.manifest_length), budget, "entries");
|
|
86
104
|
for (const entry of entries) {
|
|
87
105
|
entry.partition_spec_id = manifest.partition_spec_id ?? 0;
|
|
88
106
|
if (entry.snapshot_id == null) entry.snapshot_id = manifest.added_snapshot_id;
|
|
@@ -98,16 +116,20 @@ async function fetchOneManifest(manifest, resolver) {
|
|
|
98
116
|
entries
|
|
99
117
|
};
|
|
100
118
|
}
|
|
101
|
-
async function fetchManifests(manifests, resolver, manifestCache) {
|
|
102
|
-
return await mapWithConcurrency(manifests, (manifest) => memoRead(manifestCache?.entries, manifest.manifest_path, () => fetchOneManifest(manifest, resolver), false));
|
|
119
|
+
async function fetchManifests(manifests, resolver, manifestCache, budget, inlineEntries) {
|
|
120
|
+
return await mapWithConcurrency(manifests, (manifest) => memoRead(manifestCache?.entries, manifest.manifest_path, () => fetchOneManifest(manifest, resolver, budget, inlineEntries), false), budget);
|
|
103
121
|
}
|
|
104
|
-
async function mapWithConcurrency(items, fn) {
|
|
122
|
+
async function mapWithConcurrency(items, fn, budget) {
|
|
105
123
|
const results = new Array(items.length);
|
|
106
124
|
let next = 0;
|
|
107
125
|
async function worker() {
|
|
108
|
-
while (next < items.length) {
|
|
126
|
+
while (next < items.length) try {
|
|
127
|
+
budget?.check();
|
|
109
128
|
const index = next++;
|
|
110
129
|
results[index] = await fn(items[index]);
|
|
130
|
+
} catch (error) {
|
|
131
|
+
if (budget) return budget.fail(error);
|
|
132
|
+
throw error;
|
|
111
133
|
}
|
|
112
134
|
}
|
|
113
135
|
const poolSize = Math.min(MANIFEST_FETCH_CONCURRENCY, items.length);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { compressors } from "../../../../hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5/node_modules/hyparquet-compressors/src/compressors.mjs";
|
|
2
|
+
import "../../../../hyparquet-compressors@1.1.2_patch_hash=3f8f44805c034b2563763dcd5d37050ea6b1d5d45b46ea37adc4a721e748a1c5/node_modules/hyparquet-compressors/src/index.mjs";
|
|
1
3
|
import { isListLike, isMapLike } from "../../../../hyparquet@1.31.1/node_modules/hyparquet/src/schema.mjs";
|
|
2
4
|
import { parquetSchema } from "../../../../hyparquet@1.31.1/node_modules/hyparquet/src/metadata.mjs";
|
|
3
5
|
import { cachedAsyncBuffer } from "../../../../hyparquet@1.31.1/node_modules/hyparquet/src/utils.mjs";
|
|
@@ -5,8 +7,6 @@ import { columnsNeededForFilter, matchFilter } from "../../../../hyparquet@1.31.
|
|
|
5
7
|
import { parquetScan } from "../../../../hyparquet@1.31.1/node_modules/hyparquet/src/scan.mjs";
|
|
6
8
|
import { parquetReadObjects } from "../../../../hyparquet@1.31.1/node_modules/hyparquet/src/read.mjs";
|
|
7
9
|
import "../../../../hyparquet@1.31.1/node_modules/hyparquet/src/node.mjs";
|
|
8
|
-
import { compressors } from "../../../../hyparquet-compressors@1.1.2/node_modules/hyparquet-compressors/src/compressors.mjs";
|
|
9
|
-
import "../../../../hyparquet-compressors@1.1.2/node_modules/hyparquet-compressors/src/index.mjs";
|
|
10
10
|
import { equalityMatch, sanitize } from "./utils.mjs";
|
|
11
11
|
import { applicablePositionDeletes, deleteFileAppliesToDataEntry } from "./delete.mjs";
|
|
12
12
|
import { readParquetMetadata } from "./fetch.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { icebergManifests } from "./manifest.mjs";
|
|
2
2
|
import { icebergAppend, icebergCreateTable, icebergDropTable } from "./write/write.mjs";
|
|
3
3
|
import { restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable } from "./catalog/rest.mjs";
|
|
4
|
-
import { cachingResolver } from "./fetch.mjs";
|
|
5
4
|
import "./create.mjs";
|
|
6
5
|
import "./catalog/file.mjs";
|
|
6
|
+
import "./fetch.mjs";
|
|
7
7
|
import { s3SignedResolver } from "./s3.mjs";
|
|
8
8
|
import "../../../../squirreling@0.16.6/node_modules/squirreling/src/index.mjs";
|
|
9
9
|
import "./read.mjs";
|
|
@@ -28,10 +28,26 @@ export type ManifestPartitionFilter = (partitions: Manifest['partitions'], parti
|
|
|
28
28
|
* @param {number | bigint} [options.snapshotId] - Optional snapshot id; defaults to `current-snapshot-id`.
|
|
29
29
|
* @returns {Promise<ManifestList>}
|
|
30
30
|
*/
|
|
31
|
-
export declare function icebergManifests({ metadata, resolver, snapshotId, partitionFilter, manifestCache }: {
|
|
31
|
+
export declare function icebergManifests({ metadata, resolver, snapshotId, partitionFilter, manifestCache, readLimits }: {
|
|
32
32
|
metadata: TableMetadata;
|
|
33
33
|
resolver?: Resolver;
|
|
34
34
|
snapshotId?: number | bigint;
|
|
35
35
|
partitionFilter?: ManifestPartitionFilter;
|
|
36
36
|
manifestCache?: ManifestReadCache;
|
|
37
|
-
|
|
37
|
+
/** Strict uncached Avro read admission. Omitted preserves existing behavior. */
|
|
38
|
+
readLimits?: ManifestReadLimits;
|
|
39
|
+
}): Promise<ManifestList>;
|
|
40
|
+
/** Per-walk source, expansion and materialization-work bounds; not total JS heap. */
|
|
41
|
+
export interface ManifestReadLimits {
|
|
42
|
+
maxObjectBytes: number;
|
|
43
|
+
maxTotalObjectBytes: number;
|
|
44
|
+
maxManifests: number;
|
|
45
|
+
maxEntries: number;
|
|
46
|
+
maxInflatedBlockBytes: number;
|
|
47
|
+
maxTotalInflatedBytes: number;
|
|
48
|
+
maxValueBytes: number;
|
|
49
|
+
maxDecodedValues: number;
|
|
50
|
+
maxHeaderBytes: number;
|
|
51
|
+
/** Positive integer no greater than 128. */
|
|
52
|
+
maxSchemaDepth: number;
|
|
53
|
+
}
|
package/dist/catalog.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ManifestReadCache } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=
|
|
2
|
-
import { icebergAppend } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=
|
|
1
|
+
import { ManifestReadCache, ManifestReadLimits } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471/node_modules/icebird/types/manifest.mjs";
|
|
2
|
+
import { icebergAppend } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471/node_modules/icebird/types/write/write.mjs";
|
|
3
3
|
import { CatalogCache } from "./catalog-cache.mjs";
|
|
4
|
+
import "./manifest-read-limits.mjs";
|
|
4
5
|
import { IcebergPrimitiveType, IcebergS3Config } from "./schema.mjs";
|
|
5
6
|
import { PartitionValueMatch } from "./partition-prune.mjs";
|
|
6
|
-
import { restCatalogConnect, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=
|
|
7
|
-
import {
|
|
7
|
+
import { restCatalogConnect, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471/node_modules/icebird/types/catalog/rest.mjs";
|
|
8
|
+
import { Resolver } from "icebird/src/types.js";
|
|
8
9
|
/** A field in an icebird table `Schema`. */
|
|
9
10
|
export interface IcebergSchemaField {
|
|
10
11
|
id: number;
|
|
@@ -61,7 +62,7 @@ export interface IcebergConnection {
|
|
|
61
62
|
/** icebird REST catalog context, passed as `{ catalog }` to icebird write fns. */
|
|
62
63
|
catalog: Awaited<ReturnType<typeof restCatalogConnect>>;
|
|
63
64
|
/** icebird S3 resolver (caching-wrapped), passed as `{ resolver }` to icebird fns. */
|
|
64
|
-
resolver:
|
|
65
|
+
resolver: Resolver;
|
|
65
66
|
/** The namespace the dataset's table lives under. */
|
|
66
67
|
namespace: string;
|
|
67
68
|
/**
|
|
@@ -259,6 +260,13 @@ export interface ResolveIcebergDataFilesOptions {
|
|
|
259
260
|
cache?: CatalogCache;
|
|
260
261
|
clock?: () => number;
|
|
261
262
|
profiler?: QueryProfiler;
|
|
263
|
+
/**
|
|
264
|
+
* Opt-in Avro source/decode-work limits for one uncached manifest walk.
|
|
265
|
+
* Bypasses decoded manifest, month and resolved-file caches; catalog metadata
|
|
266
|
+
* and snapshot caching keep their existing authority and are not byte-bounded
|
|
267
|
+
* by this option. No default limits or fallback to unbounded decoding.
|
|
268
|
+
*/
|
|
269
|
+
readLimits?: ManifestReadLimits;
|
|
262
270
|
}
|
|
263
271
|
/**
|
|
264
272
|
* Drop the cached snapshot pointer for `(namespace, table)` so the next read
|
package/dist/catalog.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { stringifyBigintSafe } from "./bigint.mjs";
|
|
2
|
-
import { restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { s3SignedResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/s3.mjs";
|
|
2
|
+
import { restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471/node_modules/icebird/src/catalog/rest.mjs";
|
|
3
|
+
import { icebergManifests } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471/node_modules/icebird/src/manifest.mjs";
|
|
4
|
+
import { s3SignedResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471/node_modules/icebird/src/s3.mjs";
|
|
6
5
|
import { deriveAppendIdentity } from "./append-identity.mjs";
|
|
7
6
|
import { cacheGet, cachePut, reportCatalogCacheError } from "./catalog-cache.mjs";
|
|
8
7
|
import { toIcebergDayCount } from "./date.mjs";
|
|
8
|
+
import { captureManifestReadLimits } from "./manifest-read-limits.mjs";
|
|
9
9
|
import { MULTI_MONTH_MANIFEST, buildManifestPartitionFilter, manifestMonthBucket } from "./partition-prune.mjs";
|
|
10
|
+
import { byteCappedCachingResolver } from "./resolver-byte-cache.mjs";
|
|
10
11
|
const connectionReadBatch = Symbol("iceberg-connection-read-batch");
|
|
11
12
|
function beginConnectionRead(conn) {
|
|
12
13
|
const batch = conn[connectionReadBatch];
|
|
@@ -52,7 +53,7 @@ function startConnectSpan(profiler, name) {
|
|
|
52
53
|
}
|
|
53
54
|
let icebirdWriteModule;
|
|
54
55
|
function useIcebirdWriteModule() {
|
|
55
|
-
icebirdWriteModule ??= import("./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=
|
|
56
|
+
icebirdWriteModule ??= import("./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=1359a91da68522a736babe444880ae391f19455fbe47c346f76cec92c5c2e471/node_modules/icebird/src/write/write.mjs");
|
|
56
57
|
return icebirdWriteModule;
|
|
57
58
|
}
|
|
58
59
|
const CATALOG_CONFIG_TTL_MS = 36e5;
|
|
@@ -115,7 +116,7 @@ async function connectIcebergCatalog(config, opts = {}) {
|
|
|
115
116
|
endpoint: config.s3.endpoint,
|
|
116
117
|
pathStyle: true
|
|
117
118
|
});
|
|
118
|
-
const resolver = withVerifiedWriterByteLengths(
|
|
119
|
+
const resolver = withUncachedReader(withVerifiedWriterByteLengths(byteCappedCachingResolver(s3Resolver)), s3Resolver);
|
|
119
120
|
return {
|
|
120
121
|
catalog,
|
|
121
122
|
resolver,
|
|
@@ -128,6 +129,17 @@ async function connectIcebergCatalog(config, opts = {}) {
|
|
|
128
129
|
}
|
|
129
130
|
};
|
|
130
131
|
}
|
|
132
|
+
const uncachedReader = Symbol("iceberg-uncached-reader");
|
|
133
|
+
function withUncachedReader(resolver, base) {
|
|
134
|
+
return {
|
|
135
|
+
...resolver,
|
|
136
|
+
[uncachedReader]: (path, byteLength) => base.reader(path, byteLength)
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function boundedReadResolver(resolver) {
|
|
140
|
+
const read = resolver[uncachedReader];
|
|
141
|
+
return read ? { reader: read } : resolver;
|
|
142
|
+
}
|
|
131
143
|
function withVerifiedWriterByteLengths(resolver) {
|
|
132
144
|
if (!resolver.writer) return resolver;
|
|
133
145
|
const baseWriter = resolver.writer;
|
|
@@ -643,12 +655,14 @@ function toListedFile(entry, matches, monthFieldName, wantedMonths, dateFieldId)
|
|
|
643
655
|
...dateBounds ? { dateBounds } : {}
|
|
644
656
|
};
|
|
645
657
|
}
|
|
646
|
-
async function resolveViaFullWalk(conn, metadata, partitionFilter, matches, monthFieldName, wantedMonths, dateFieldId, manifestCache) {
|
|
658
|
+
async function resolveViaFullWalk(conn, metadata, partitionFilter, matches, monthFieldName, wantedMonths, dateFieldId, manifestCache, readLimits) {
|
|
659
|
+
const resolver = readLimits ? boundedReadResolver(conn.resolver) : conn.resolver;
|
|
647
660
|
const manifests = await icebergManifests({
|
|
648
661
|
metadata,
|
|
649
|
-
resolver
|
|
662
|
+
resolver,
|
|
650
663
|
partitionFilter,
|
|
651
|
-
manifestCache
|
|
664
|
+
manifestCache,
|
|
665
|
+
readLimits
|
|
652
666
|
});
|
|
653
667
|
const entries = [];
|
|
654
668
|
for (const m of manifests) for (const entry of m.entries) {
|
|
@@ -745,6 +759,7 @@ function resolveIcebergDataFiles(conn, opts) {
|
|
|
745
759
|
return resolveIcebergDataFilesInBatch(conn, opts).finally(release);
|
|
746
760
|
}
|
|
747
761
|
async function resolveIcebergDataFilesInBatch(conn, opts) {
|
|
762
|
+
const readLimits = captureManifestReadLimits(opts.readLimits);
|
|
748
763
|
const { namespace, table } = opts;
|
|
749
764
|
const profiler = opts.profiler;
|
|
750
765
|
const now = (opts.clock ?? Date.now)();
|
|
@@ -756,7 +771,7 @@ async function resolveIcebergDataFilesInBatch(conn, opts) {
|
|
|
756
771
|
if (snapshotId == null) return [];
|
|
757
772
|
const scope = conn.cacheScope ?? "";
|
|
758
773
|
const filesKey = resolvedFilesKey(scope, namespace, table, snapshotId, opts.matches, opts.range);
|
|
759
|
-
if (opts.cache) {
|
|
774
|
+
if (opts.cache && !readLimits) {
|
|
760
775
|
const endCache = profiler?.start("iceberg.cache");
|
|
761
776
|
const cached = await cacheGet(opts.cache, filesKey, now);
|
|
762
777
|
endCache?.({ hit: cached !== void 0 });
|
|
@@ -778,8 +793,8 @@ async function resolveIcebergDataFilesInBatch(conn, opts) {
|
|
|
778
793
|
const monthFieldName = monthField?.name;
|
|
779
794
|
const dateFieldId = dateColumnFieldId(metadata, monthField?.sourceColumn);
|
|
780
795
|
const dayWindow = rangeDayWindow(opts.range);
|
|
781
|
-
const manifestCache = manifestReadCacheFor(conn, namespace, table, metadata);
|
|
782
|
-
const walk = opts.cache && monthFieldName ? await resolveViaMonthCache(conn, opts.cache, metadata, partitionFilter, opts.partitionSpec, opts.matches, monthFieldName, wantedMonths, dateFieldId, scope, namespace, table, now, manifestCache) : await resolveViaFullWalk(conn, metadata, partitionFilter, opts.matches, monthFieldName, wantedMonths, dateFieldId, manifestCache);
|
|
796
|
+
const manifestCache = readLimits ? void 0 : manifestReadCacheFor(conn, namespace, table, metadata);
|
|
797
|
+
const walk = opts.cache && monthFieldName && !readLimits ? await resolveViaMonthCache(conn, opts.cache, metadata, partitionFilter, opts.partitionSpec, opts.matches, monthFieldName, wantedMonths, dateFieldId, scope, namespace, table, now, manifestCache) : await resolveViaFullWalk(conn, metadata, partitionFilter, opts.matches, monthFieldName, wantedMonths, dateFieldId, manifestCache, readLimits);
|
|
783
798
|
let boundsPruned = 0;
|
|
784
799
|
const out = [];
|
|
785
800
|
for (const file of walk.entries) {
|
|
@@ -798,7 +813,7 @@ async function resolveIcebergDataFilesInBatch(conn, opts) {
|
|
|
798
813
|
monthsHit: walk.monthsHit,
|
|
799
814
|
manifestsWalked: walk.manifestsWalked
|
|
800
815
|
});
|
|
801
|
-
if (opts.cache) {
|
|
816
|
+
if (opts.cache && !readLimits) {
|
|
802
817
|
const freshKey = resolvedFilesKey(scope, namespace, table, snapshotId, opts.matches, opts.range);
|
|
803
818
|
await cachePut(opts.cache, freshKey, out, RESOLVED_FILES_TTL_MS, now);
|
|
804
819
|
}
|