@gscdump/lakehouse 4.1.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/manifest.mjs +19 -6
  2. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/manifest.d.mts +10 -1
  3. package/dist/catalog.d.mts +16 -3
  4. package/dist/catalog.mjs +72 -11
  5. package/dist/dataset-runtime.mjs +1 -1
  6. package/dist/orphan-sweep.mjs +3 -3
  7. package/dist/partition-prune.d.mts +3 -7
  8. package/dist/partition-prune.mjs +18 -2
  9. package/dist/unsafe-raw.d.mts +5 -5
  10. package/dist/unsafe-raw.mjs +5 -5
  11. package/package.json +2 -1
  12. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/avro/avro.metadata.mjs +0 -0
  13. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/avro/avro.read.mjs +0 -0
  14. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/avro/avro.write.mjs +0 -0
  15. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/catalog/file.mjs +0 -0
  16. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/catalog/loadTable.mjs +0 -0
  17. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/catalog/rest.mjs +0 -0
  18. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/create.mjs +0 -0
  19. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/delete.mjs +0 -0
  20. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/fetch.mjs +0 -0
  21. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/index.mjs +0 -0
  22. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/json.mjs +0 -0
  23. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/metadata.mjs +0 -0
  24. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/prune.mjs +0 -0
  25. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/puffin/deletion-vector.mjs +0 -0
  26. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/puffin/puffin.mjs +0 -0
  27. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/puffin/roaring.mjs +0 -0
  28. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/read.mjs +0 -0
  29. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/s3.mjs +0 -0
  30. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/schema.mjs +0 -0
  31. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/sigv4.mjs +0 -0
  32. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/sql/icebergDataSource.mjs +0 -0
  33. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/sql/icebergQuery.mjs +0 -0
  34. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/sql/whereFilter.mjs +0 -0
  35. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/types.d.mts +0 -0
  36. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/utils.mjs +0 -0
  37. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/commit.mjs +0 -0
  38. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/conversions.mjs +0 -0
  39. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/delete-file.mjs +0 -0
  40. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/geospatial.mjs +0 -0
  41. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/manifest-list.mjs +0 -0
  42. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/manifest.mjs +0 -0
  43. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/parquet.mjs +0 -0
  44. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/partition.mjs +0 -0
  45. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/rewrite.mjs +0 -0
  46. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/serde.mjs +0 -0
  47. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/snapshot.mjs +0 -0
  48. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/sort.mjs +0 -0
  49. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/stage-deletion-vector.mjs +0 -0
  50. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/stage-position-delete.mjs +0 -0
  51. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/stage.mjs +0 -0
  52. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/stats.mjs +0 -0
  53. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/transform.mjs +0 -0
  54. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/src/write/write.mjs +0 -0
  55. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/catalog/file.d.mts +0 -0
  56. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/catalog/rest.d.mts +0 -0
  57. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/create.d.mts +0 -0
  58. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/fetch.d.mts +0 -0
  59. package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/index.d.mts +1 -1
  60. /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/metadata.d.mts +0 -0
  61. /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/read.d.mts +0 -0
  62. /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/s3.d.mts +0 -0
  63. /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/sql/icebergDataSource.d.mts +0 -0
  64. /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/sql/icebergQuery.d.mts +0 -0
  65. /package/dist/_virtual/node_modules/.pnpm/{icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7 → icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f}/node_modules/icebird/types/write/write.d.mts +0 -0
@@ -2,7 +2,20 @@ import { avroMetadata } from "./avro/avro.metadata.mjs";
2
2
  import { avroRead } from "./avro/avro.read.mjs";
3
3
  import { fetchAvroRecords, urlResolver } from "./fetch.mjs";
4
4
  const MANIFEST_FETCH_CONCURRENCY = 8;
5
- async function icebergManifests({ metadata, resolver, snapshotId, partitionFilter }) {
5
+ function memoRead(cache, key, read, retain = true) {
6
+ if (!cache) return read();
7
+ const existing = cache.get(key);
8
+ if (existing) return existing;
9
+ const pending = Promise.resolve().then(read);
10
+ cache.set(key, pending);
11
+ pending.then(() => {
12
+ if (!retain && cache.get(key) === pending) cache.delete(key);
13
+ }, () => {
14
+ if (cache.get(key) === pending) cache.delete(key);
15
+ });
16
+ return pending;
17
+ }
18
+ async function icebergManifests({ metadata, resolver, snapshotId, partitionFilter, manifestCache }) {
6
19
  resolver ??= urlResolver();
7
20
  const rawTarget = snapshotId ?? metadata["current-snapshot-id"];
8
21
  if (rawTarget == null || rawTarget < 0) throw new Error("No current snapshot id found in table metadata");
@@ -12,8 +25,8 @@ async function icebergManifests({ metadata, resolver, snapshotId, partitionFilte
12
25
  let manifests;
13
26
  if (snapshot["manifest-list"]) {
14
27
  const manifestListUrl = snapshot["manifest-list"];
15
- manifests = await fetchAvroRecords(manifestListUrl, resolver);
16
- } else if (snapshot.manifests) manifests = await resolveInlineManifests(snapshot, resolver);
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));
17
30
  else throw new Error("No manifest information found in snapshot");
18
31
  if (partitionFilter) manifests = manifests.filter((manifest) => {
19
32
  try {
@@ -22,7 +35,7 @@ async function icebergManifests({ metadata, resolver, snapshotId, partitionFilte
22
35
  return true;
23
36
  }
24
37
  });
25
- return await fetchManifests(manifests, resolver);
38
+ return await fetchManifests(manifests, resolver, manifestCache);
26
39
  }
27
40
  async function resolveInlineManifests(snapshot, resolver) {
28
41
  return await mapWithConcurrency(snapshot.manifests ?? [], async (manifestPath) => {
@@ -85,8 +98,8 @@ async function fetchOneManifest(manifest, resolver) {
85
98
  entries
86
99
  };
87
100
  }
88
- async function fetchManifests(manifests, resolver) {
89
- return await mapWithConcurrency(manifests, (manifest) => fetchOneManifest(manifest, resolver));
101
+ async function fetchManifests(manifests, resolver, manifestCache) {
102
+ return await mapWithConcurrency(manifests, (manifest) => memoRead(manifestCache?.entries, manifest.manifest_path, () => fetchOneManifest(manifest, resolver), false));
90
103
  }
91
104
  async function mapWithConcurrency(items, fn) {
92
105
  const results = new Array(items.length);
@@ -3,6 +3,14 @@ export type ManifestList = {
3
3
  url: string;
4
4
  entries: ManifestEntry[];
5
5
  }[];
6
+ /** Decoded, immutable manifest data for one caller-owned table snapshot. */
7
+ export type ManifestReadCache = {
8
+ lists: Map<string, Promise<Manifest[]>>;
9
+ entries: Map<string, Promise<{
10
+ url: string;
11
+ entries: ManifestEntry[];
12
+ }>>;
13
+ };
6
14
  /**
7
15
  * Predicate applied before fetching a manifest's entries.
8
16
  */
@@ -20,9 +28,10 @@ export type ManifestPartitionFilter = (partitions: Manifest['partitions'], parti
20
28
  * @param {number | bigint} [options.snapshotId] - Optional snapshot id; defaults to `current-snapshot-id`.
21
29
  * @returns {Promise<ManifestList>}
22
30
  */
23
- export declare function icebergManifests({ metadata, resolver, snapshotId, partitionFilter }: {
31
+ export declare function icebergManifests({ metadata, resolver, snapshotId, partitionFilter, manifestCache }: {
24
32
  metadata: TableMetadata;
25
33
  resolver?: Resolver;
26
34
  snapshotId?: number | bigint;
27
35
  partitionFilter?: ManifestPartitionFilter;
36
+ manifestCache?: ManifestReadCache;
28
37
  }): Promise<ManifestList>;
@@ -1,9 +1,10 @@
1
- import { icebergAppend } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/types/write/write.mjs";
1
+ import { ManifestReadCache } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/types/manifest.mjs";
2
+ import { icebergAppend } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/types/write/write.mjs";
2
3
  import { CatalogCache } from "./catalog-cache.mjs";
3
4
  import { IcebergPrimitiveType, IcebergS3Config } from "./schema.mjs";
4
5
  import { PartitionValueMatch } from "./partition-prune.mjs";
5
- import { restCatalogConnect } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/types/catalog/rest.mjs";
6
- import { cachingResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/types/fetch.mjs";
6
+ import { restCatalogConnect, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/types/catalog/rest.mjs";
7
+ import { cachingResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/types/fetch.mjs";
7
8
  /** A field in an icebird table `Schema`. */
8
9
  export interface IcebergSchemaField {
9
10
  id: number;
@@ -54,6 +55,7 @@ export interface IcebergCatalogConfig {
54
55
  /** R2 S3 credentials for the warehouse objects. */
55
56
  s3: IcebergS3Config;
56
57
  }
58
+ declare const connectionReadBatch: unique symbol;
57
59
  /** The connected catalog context + a signed S3 resolver — the icebird call inputs. */
58
60
  export interface IcebergConnection {
59
61
  /** icebird REST catalog context, passed as `{ catalog }` to icebird write fns. */
@@ -71,6 +73,16 @@ export interface IcebergConnection {
71
73
  * omit it ONLY when their cache is not shared across catalogs.
72
74
  */
73
75
  cacheScope?: string;
76
+ /** Concurrent reads share decoded metadata only while their batch is active. */
77
+ [connectionReadBatch]?: ConnectionReadBatch;
78
+ }
79
+ interface ConnectionReadBatch {
80
+ active: number;
81
+ snapshots: Map<CatalogCache['storage'] | undefined, Map<string, Promise<{
82
+ snapshotId: string | null;
83
+ metadata: LoadedTableMetadata | null;
84
+ }>>>;
85
+ manifests: Map<string, ManifestReadCache>;
74
86
  }
75
87
  /** Options for {@link connectIcebergCatalog}. */
76
88
  export interface ConnectIcebergOptions {
@@ -250,6 +262,7 @@ export interface ResolveIcebergDataFilesOptions {
250
262
  * means TTL-bounded staleness, never an error.
251
263
  */
252
264
  export declare function invalidateSnapshotRef(cache: CatalogCache, namespace: string, table: string, cacheScope?: string): Promise<void>;
265
+ type LoadedTableMetadata = Awaited<ReturnType<typeof restCatalogLoadTable>>['metadata'];
253
266
  /**
254
267
  * List the parquet data files in the current snapshot of `table`, filtered to
255
268
  * one partition slice (`matches` + `range`). Generic over the partition spec —
package/dist/catalog.mjs CHANGED
@@ -1,14 +1,43 @@
1
1
  import { stringifyBigintSafe } from "./bigint.mjs";
2
- import { restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/catalog/rest.mjs";
3
- import { cachingResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/fetch.mjs";
4
- import { icebergManifests } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/manifest.mjs";
5
- import { s3SignedResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/s3.mjs";
2
+ import { restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/catalog/rest.mjs";
3
+ import { cachingResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/fetch.mjs";
4
+ import { icebergManifests } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/manifest.mjs";
5
+ import { s3SignedResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/s3.mjs";
6
6
  import { cacheGet, cachePut, reportCatalogCacheError } from "./catalog-cache.mjs";
7
7
  import { toIcebergDayCount } from "./date.mjs";
8
8
  import { MULTI_MONTH_MANIFEST, buildManifestPartitionFilter, manifestMonthBucket } from "./partition-prune.mjs";
9
+ const connectionReadBatch = Symbol("iceberg-connection-read-batch");
10
+ function beginConnectionRead(conn) {
11
+ const batch = conn[connectionReadBatch];
12
+ if (!batch) return () => {};
13
+ batch.active++;
14
+ return () => {
15
+ batch.active--;
16
+ if (batch.active === 0) {
17
+ batch.snapshots.clear();
18
+ batch.manifests.clear();
19
+ }
20
+ };
21
+ }
22
+ function manifestReadCacheFor(conn, namespace, table, metadata) {
23
+ const batch = conn[connectionReadBatch];
24
+ if (!batch || batch.active === 0) return void 0;
25
+ const snapshotId = metadata["current-snapshot-id"];
26
+ if (snapshotId == null) return void 0;
27
+ const key = `${conn.cacheScope ?? ""}\0${namespace}\0${table}\0${snapshotId}`;
28
+ let cache = batch.manifests.get(key);
29
+ if (!cache) {
30
+ cache = {
31
+ lists: /* @__PURE__ */ new Map(),
32
+ entries: /* @__PURE__ */ new Map()
33
+ };
34
+ batch.manifests.set(key, cache);
35
+ }
36
+ return cache;
37
+ }
9
38
  let icebirdWriteModule;
10
39
  function useIcebirdWriteModule() {
11
- icebirdWriteModule ??= import("./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/write/write.mjs");
40
+ icebirdWriteModule ??= import("./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/write/write.mjs");
12
41
  return icebirdWriteModule;
13
42
  }
14
43
  const CATALOG_CONFIG_TTL_MS = 36e5;
@@ -59,7 +88,12 @@ async function connectIcebergCatalog(config, opts = {}) {
59
88
  catalog,
60
89
  resolver,
61
90
  namespace: config.namespace,
62
- cacheScope
91
+ cacheScope,
92
+ [connectionReadBatch]: {
93
+ active: 0,
94
+ snapshots: /* @__PURE__ */ new Map(),
95
+ manifests: /* @__PURE__ */ new Map()
96
+ }
63
97
  };
64
98
  }
65
99
  function withVerifiedWriterByteLengths(resolver) {
@@ -346,6 +380,25 @@ function stripBucket(filePath) {
346
380
  return slash >= 0 ? rest.slice(slash + 1) : rest;
347
381
  }
348
382
  async function loadSnapshotId(conn, namespace, table, cache, now) {
383
+ const batch = conn[connectionReadBatch];
384
+ if (!batch || batch.active === 0) return loadSnapshotIdUnshared(conn, namespace, table, cache, now);
385
+ const storage = cache?.storage;
386
+ let pendingByTable = batch.snapshots.get(storage);
387
+ if (!pendingByTable) {
388
+ pendingByTable = /* @__PURE__ */ new Map();
389
+ batch.snapshots.set(storage, pendingByTable);
390
+ }
391
+ const key = `${conn.cacheScope ?? ""}\0${namespace}\0${table}`;
392
+ const existing = pendingByTable.get(key);
393
+ if (existing) return existing;
394
+ const pending = loadSnapshotIdUnshared(conn, namespace, table, cache, now);
395
+ pendingByTable.set(key, pending);
396
+ pending.then(void 0, () => {
397
+ if (pendingByTable?.get(key) === pending) pendingByTable.delete(key);
398
+ });
399
+ return pending;
400
+ }
401
+ async function loadSnapshotIdUnshared(conn, namespace, table, cache, now) {
349
402
  const scope = conn.cacheScope ?? "";
350
403
  if (cache) {
351
404
  const cached = await cacheGet(cache, snapshotRefKey(scope, namespace, table), now);
@@ -394,11 +447,12 @@ function toListedFile(entry, matches, monthFieldName, wantedMonths, dateFieldId)
394
447
  ...dateBounds ? { dateBounds } : {}
395
448
  };
396
449
  }
397
- async function resolveViaFullWalk(conn, metadata, partitionFilter, matches, monthFieldName, wantedMonths, dateFieldId) {
450
+ async function resolveViaFullWalk(conn, metadata, partitionFilter, matches, monthFieldName, wantedMonths, dateFieldId, manifestCache) {
398
451
  const manifests = await icebergManifests({
399
452
  metadata,
400
453
  resolver: conn.resolver,
401
- partitionFilter
454
+ partitionFilter,
455
+ manifestCache
402
456
  });
403
457
  const entries = [];
404
458
  for (const m of manifests) for (const entry of m.entries) {
@@ -412,12 +466,13 @@ async function resolveViaFullWalk(conn, metadata, partitionFilter, matches, mont
412
466
  monthsHit: 0
413
467
  };
414
468
  }
415
- async function resolveViaMonthCache(conn, cache, metadata, partitionFilter, partitionSpec, matches, monthFieldName, wantedMonths, dateFieldId, scope, namespace, table, now) {
469
+ async function resolveViaMonthCache(conn, cache, metadata, partitionFilter, partitionSpec, matches, monthFieldName, wantedMonths, dateFieldId, scope, namespace, table, now, manifestCache) {
416
470
  const matchKey = matchKeyOf(matches);
417
471
  const manifestMonths = /* @__PURE__ */ new Map();
418
472
  await icebergManifests({
419
473
  metadata,
420
474
  resolver: conn.resolver,
475
+ manifestCache,
421
476
  partitionFilter: (partitions, _specId, manifest) => {
422
477
  try {
423
478
  if (partitionFilter(partitions) === false) return false;
@@ -456,6 +511,7 @@ async function resolveViaMonthCache(conn, cache, metadata, partitionFilter, part
456
511
  const manifests = await icebergManifests({
457
512
  metadata,
458
513
  resolver: conn.resolver,
514
+ manifestCache,
459
515
  partitionFilter: (_partitions, _specId, manifest) => toWalk.has(manifest.manifest_path)
460
516
  });
461
517
  manifestsWalked = manifests.length;
@@ -488,7 +544,11 @@ async function resolveViaMonthCache(conn, cache, metadata, partitionFilter, part
488
544
  monthsHit
489
545
  };
490
546
  }
491
- async function resolveIcebergDataFiles(conn, opts) {
547
+ function resolveIcebergDataFiles(conn, opts) {
548
+ const release = beginConnectionRead(conn);
549
+ return resolveIcebergDataFilesInBatch(conn, opts).finally(release);
550
+ }
551
+ async function resolveIcebergDataFilesInBatch(conn, opts) {
492
552
  const { namespace, table } = opts;
493
553
  const profiler = opts.profiler;
494
554
  const now = (opts.clock ?? Date.now)();
@@ -522,7 +582,8 @@ async function resolveIcebergDataFiles(conn, opts) {
522
582
  const monthFieldName = monthField?.name;
523
583
  const dateFieldId = dateColumnFieldId(metadata, monthField?.sourceColumn);
524
584
  const dayWindow = rangeDayWindow(opts.range);
525
- const walk = opts.cache && monthFieldName ? await resolveViaMonthCache(conn, opts.cache, metadata, partitionFilter, opts.partitionSpec, opts.matches, monthFieldName, wantedMonths, dateFieldId, scope, namespace, table, now) : await resolveViaFullWalk(conn, metadata, partitionFilter, opts.matches, monthFieldName, wantedMonths, dateFieldId);
585
+ const manifestCache = manifestReadCacheFor(conn, namespace, table, metadata);
586
+ 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);
526
587
  let boundsPruned = 0;
527
588
  const out = [];
528
589
  for (const file of walk.entries) {
@@ -1,5 +1,5 @@
1
1
  import { connectIcebergCatalog, ensureIcebergNamespace, icebergAppendBatchesRetrying, icebergAppendRetrying, resolveIcebergDataFiles } from "./catalog.mjs";
2
- import { icebergCreateTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/write/write.mjs";
2
+ import { icebergCreateTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/write/write.mjs";
3
3
  async function createDatasetTable(conn, table, schema, partitionSpec, sortOrder) {
4
4
  const results = [];
5
5
  await icebergCreateTable({
@@ -1,6 +1,6 @@
1
- import { restCatalogListTables, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/catalog/rest.mjs";
2
- import { icebergManifests } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/manifest.mjs";
3
- import "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/index.mjs";
1
+ import { restCatalogListTables, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/catalog/rest.mjs";
2
+ import { icebergManifests } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/manifest.mjs";
3
+ import "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/index.mjs";
4
4
  const DEFAULT_GRACE_HOURS = 48;
5
5
  const DEFAULT_MAX_DELETES = 500;
6
6
  const DEFAULT_IO_CONCURRENCY = 4;
@@ -11,13 +11,9 @@ export type ManifestPartitionFilter = (partitions: IcebergFieldSummary[] | undef
11
11
  /**
12
12
  * One identity/dims value to prune an `identity`-transform partition field by.
13
13
  *
14
- * `'int32'`-encoded fields are deliberately NOT pruned here (mirrors the
15
- * original engine behavior): an INT column's bound bytes are a 4-byte int, but
16
- * per-team catalogs are single-tenant, so identity pruning on them saves ~nothing
17
- * — the per-file partition check in the resolver remains the authoritative
18
- * correctness filter. Only `'string'`-encoded identity fields are pruned by
19
- * lexicographic UTF-8 bound comparison (the truncated-string-stats case R2 SQL
20
- * needs the workaround for).
14
+ * Identity summaries use the declared field encoding: UTF-8 for strings and
15
+ * four-byte little-endian for INT. Unknown bounds keep the manifest. The
16
+ * per-file partition check remains the authoritative correctness filter.
21
17
  */
22
18
  export interface PartitionValueMatch {
23
19
  /** Partition field name as declared in the partition spec (e.g. `'site_id'`). */
@@ -7,11 +7,12 @@ function decodeString(bytes) {
7
7
  const u = toUint8(bytes);
8
8
  return u == null ? null : UTF8_DECODER.decode(u);
9
9
  }
10
- function decodeMonthInt(bytes) {
10
+ function decodeInt32(bytes) {
11
11
  const u = toUint8(bytes);
12
- if (u == null) return null;
12
+ if (u?.byteLength !== 4) return null;
13
13
  return new DataView(u.buffer, u.byteOffset, u.byteLength).getInt32(0, true);
14
14
  }
15
+ const decodeMonthInt = decodeInt32;
15
16
  function buildManifestPartitionFilter(partitionSpec, matches, wantedMonths) {
16
17
  const fieldIndex = (name) => partitionSpec.findIndex((f) => f.name === name || f.sourceColumn === name);
17
18
  const monthFieldIndex = partitionSpec.findIndex((f) => f.transform === "month");
@@ -23,6 +24,14 @@ function buildManifestPartitionFilter(partitionSpec, matches, wantedMonths) {
23
24
  value: String(match.value)
24
25
  }];
25
26
  });
27
+ const intMatches = matches.flatMap((match) => {
28
+ if (match.encoding !== "int32" || typeof match.value !== "number" || !Number.isInteger(match.value) || match.value < -2147483648 || match.value > 2147483647) return [];
29
+ const index = fieldIndex(match.field);
30
+ return index < 0 || partitionSpec[index]?.transform !== "identity" ? [] : [{
31
+ index,
32
+ value: match.value
33
+ }];
34
+ });
26
35
  const wantedMonthValues = wantedMonths ? [...wantedMonths].filter(Number.isFinite).sort((a, b) => a - b) : [];
27
36
  const hasWantedMonthInRange = (lo, hi) => {
28
37
  let left = 0;
@@ -43,6 +52,13 @@ function buildManifestPartitionFilter(partitionSpec, matches, wantedMonths) {
43
52
  const hi = decodeString(summary.upper_bound);
44
53
  if (lo != null && hi != null && (match.value < lo || match.value > hi)) return false;
45
54
  }
55
+ for (const match of intMatches) {
56
+ const summary = partitions[match.index];
57
+ if (!summary || summary.lower_bound == null || summary.upper_bound == null) continue;
58
+ const lo = decodeInt32(summary.lower_bound);
59
+ const hi = decodeInt32(summary.upper_bound);
60
+ if (lo != null && hi != null && lo <= hi && (match.value < lo || match.value > hi)) return false;
61
+ }
46
62
  if (wantedMonthValues.length > 0 && monthFieldIndex >= 0) {
47
63
  const monthSummary = partitions[monthFieldIndex];
48
64
  if (monthSummary && (monthSummary.lower_bound != null || monthSummary.upper_bound != null)) {
@@ -1,7 +1,7 @@
1
- import { icebergAppend, icebergCreateTable, icebergDropTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/types/write/write.mjs";
2
- import { restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/types/catalog/rest.mjs";
1
+ import { icebergManifests } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/types/manifest.mjs";
2
+ import { icebergAppend, icebergCreateTable, icebergDropTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/types/write/write.mjs";
3
+ import { restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/types/catalog/rest.mjs";
3
4
  import { icebergAppendRetrying } from "./catalog.mjs";
4
- import { s3SignedResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/types/s3.mjs";
5
- import { icebergManifests } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/types/manifest.mjs";
6
- import "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/types/index.mjs";
5
+ import { s3SignedResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/types/s3.mjs";
6
+ import "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/types/index.mjs";
7
7
  export { icebergAppend, icebergAppendRetrying, icebergCreateTable, icebergDropTable, icebergManifests, restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable, s3SignedResolver };
@@ -1,7 +1,7 @@
1
- import { restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/catalog/rest.mjs";
2
- import { icebergManifests } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/manifest.mjs";
3
- import { s3SignedResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/s3.mjs";
1
+ import { restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/catalog/rest.mjs";
2
+ import { icebergManifests } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/manifest.mjs";
3
+ import { s3SignedResolver } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/s3.mjs";
4
4
  import { icebergAppendRetrying } from "./catalog.mjs";
5
- import { icebergAppend, icebergCreateTable, icebergDropTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/write/write.mjs";
6
- import "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=baf49f0ba810036770cc2fd19ec2c43cbccd764be0f7aa04af13b186e90227a7/node_modules/icebird/src/index.mjs";
5
+ import { icebergAppend, icebergCreateTable, icebergDropTable } from "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/write/write.mjs";
6
+ import "./_virtual/node_modules/.pnpm/icebird@0.8.30_patch_hash=a400e343a199b1ca18601f96348011745ac6518fc07ffa71d5adfdd2ccc7d14f/node_modules/icebird/src/index.mjs";
7
7
  export { icebergAppend, icebergAppendRetrying, icebergCreateTable, icebergDropTable, icebergManifests, restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable, s3SignedResolver };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gscdump/lakehouse",
3
3
  "type": "module",
4
- "version": "4.1.0",
4
+ "version": "4.2.1",
5
5
  "description": "Dataset-agnostic Iceberg lakehouse layer + dataset registry for R2 Data Catalog producers (ADR-0021).",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -73,6 +73,7 @@
73
73
  "devDependencies": {
74
74
  "@types/node": "^26.6.2",
75
75
  "hyparquet": "^1.31.1",
76
+ "hyparquet-writer": "^0.16.10",
76
77
  "icebird": "^0.8.30",
77
78
  "unstorage": "^1.17.5",
78
79
  "vitest": "^5.0.1"
@@ -1,3 +1,4 @@
1
+ import { icebergManifests } from "./manifest.mjs";
1
2
  import { icebergAppend, icebergCreateTable, icebergDropTable } from "./write/write.mjs";
2
3
  import { restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable } from "./catalog/rest.mjs";
3
4
  import { cachingResolver } from "./fetch.mjs";
@@ -7,7 +8,6 @@ import { s3SignedResolver } from "./s3.mjs";
7
8
  import "../../../../squirreling@0.16.6/node_modules/squirreling/src/index.mjs";
8
9
  import "./read.mjs";
9
10
  import "./metadata.mjs";
10
- import { icebergManifests } from "./manifest.mjs";
11
11
  import "./sql/icebergDataSource.mjs";
12
12
  import "./sql/icebergQuery.mjs";
13
13
  export { icebergAppend, icebergCreateTable, icebergDropTable, icebergManifests, restCatalogConnect, restCatalogCreateNamespace, restCatalogListTables, restCatalogLoadTable, s3SignedResolver };