@gscdump/engine 3.5.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/README.md +28 -18
  2. package/dist/THIRD-PARTY-LICENSES.md +2 -2
  3. package/dist/adapters/duckdb-node.d.mts +4 -4
  4. package/dist/adapters/duckdb-node.mjs +103 -77
  5. package/dist/adapters/filesystem.d.mts +6 -7
  6. package/dist/adapters/filesystem.mjs +11 -6
  7. package/dist/adapters/hyparquet.d.mts +9 -10
  8. package/dist/adapters/hyparquet.mjs +84 -44
  9. package/dist/adapters/node-harness.d.mts +3 -4
  10. package/dist/adapters/parquet-attach.d.mts +4 -5
  11. package/dist/adapters/parquet-attach.mjs +7 -2
  12. package/dist/adapters/r2-manifest.d.mts +4 -5
  13. package/dist/adapters/r2.d.mts +2 -3
  14. package/dist/adapters/snapshot-attach.d.mts +7 -8
  15. package/dist/adapters/snapshot-attach.mjs +7 -2
  16. package/dist/analysis-range.d.mts +2 -3
  17. package/dist/analysis-types.d.mts +4 -5
  18. package/dist/analyzer/define.d.mts +6 -7
  19. package/dist/analyzer/dispatch.d.mts +2 -3
  20. package/dist/analyzer/registry.d.mts +4 -5
  21. package/dist/analyzer/types.d.mts +11 -12
  22. package/dist/arrow-utils.d.mts +4 -5
  23. package/dist/arrow-utils.mjs +10 -0
  24. package/dist/coerce.d.mts +1 -2
  25. package/dist/compaction.d.mts +2 -3
  26. package/dist/drizzle-schema.d.mts +14 -15
  27. package/dist/duckdb.d.mts +5 -6
  28. package/dist/duckdb.mjs +9 -5
  29. package/dist/engine.d.mts +1 -2
  30. package/dist/entities/empty-types.d.mts +4 -5
  31. package/dist/entities/indexing-metadata.d.mts +5 -6
  32. package/dist/entities/inspection.d.mts +9 -10
  33. package/dist/entities/query-dim.d.mts +7 -7
  34. package/dist/entities/sitemap-shared.d.mts +26 -27
  35. package/dist/entities/sitemap-write.d.mts +1 -2
  36. package/dist/entities/sitemap.d.mts +1 -2
  37. package/dist/entity-keys.d.mts +28 -29
  38. package/dist/errors.d.mts +5 -6
  39. package/dist/iceberg/append-sink.d.mts +2 -3
  40. package/dist/iceberg/catalog.d.mts +10 -10
  41. package/dist/iceberg/catalog.mjs +2 -2
  42. package/dist/iceberg/overwrite-writer.d.mts +17 -18
  43. package/dist/iceberg/schema.d.mts +16 -16
  44. package/dist/ingest-accumulator.d.mts +8 -9
  45. package/dist/ingest.d.mts +15 -12
  46. package/dist/ingest.mjs +22 -6
  47. package/dist/layout.d.mts +4 -5
  48. package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/datapage.mjs +1 -1
  49. package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/indexes.mjs +1 -1
  50. package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/metadata.mjs +1 -1
  51. package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/src/types.d.mts +2 -3
  52. package/dist/node_modules/.pnpm/hyparquet-writer@0.16.9_patch_hash_d26d002aede61ad95dd633d6557b56897cdcbc45dfc3a5d93fa0e9075ad5425f/node_modules/hyparquet-writer/types/index.d.mts +2 -3
  53. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/assemble.mjs +3 -144
  54. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/bloom.mjs +3 -58
  55. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/column.mjs +8 -129
  56. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/convert.mjs +3 -118
  57. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/datapage.mjs +6 -144
  58. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/delta.mjs +2 -65
  59. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/encoding.mjs +2 -76
  60. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/filter.mjs +4 -212
  61. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/geoparquet.mjs +1 -24
  62. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/index.mjs +3 -3
  63. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/indexes.mjs +5 -32
  64. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/metadata.mjs +7 -241
  65. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/node.mjs +1 -5
  66. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/plain.mjs +1 -79
  67. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/plan.mjs +6 -375
  68. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/read.mjs +6 -77
  69. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/rowgroup.mjs +7 -175
  70. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/scan.mjs +5 -73
  71. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/schema.mjs +1 -22
  72. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/snappy.mjs +1 -68
  73. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/thrift.mjs +1 -86
  74. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/types.d.mts +2 -28
  75. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/utils.mjs +1 -31
  76. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/variant.mjs +3 -228
  77. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/src/wkb.mjs +1 -94
  78. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/types/index.d.mts +2 -52
  79. package/dist/node_modules/.pnpm/hyparquet@1.29.2/node_modules/hyparquet/types/node.d.mts +2 -2
  80. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/assemble.mjs +144 -0
  81. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/bloom.mjs +124 -0
  82. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/column.mjs +129 -0
  83. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/constants.mjs +80 -0
  84. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/convert.mjs +118 -0
  85. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/datapage.mjs +144 -0
  86. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/delta.mjs +65 -0
  87. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/encoding.mjs +76 -0
  88. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/filter.mjs +212 -0
  89. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/geoparquet.mjs +24 -0
  90. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/index.mjs +8 -0
  91. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/indexes.mjs +32 -0
  92. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/metadata.mjs +241 -0
  93. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/node.mjs +7 -0
  94. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/plain.mjs +79 -0
  95. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/plan.mjs +375 -0
  96. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/query.mjs +3 -0
  97. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/read.mjs +81 -0
  98. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/rowgroup.mjs +175 -0
  99. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/scan.mjs +74 -0
  100. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/schema.mjs +75 -0
  101. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/snappy.mjs +68 -0
  102. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/thrift.mjs +86 -0
  103. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/types.d.mts +25 -0
  104. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/utils.mjs +32 -0
  105. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/variant.mjs +228 -0
  106. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/wkb.mjs +94 -0
  107. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/src/xxhash.mjs +68 -0
  108. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/index.d.mts +58 -0
  109. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/node.d.mts +3 -0
  110. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/scan.d.mts +1 -0
  111. package/dist/node_modules/.pnpm/hyparquet@1.30.0/node_modules/hyparquet/types/utils.d.mts +1 -0
  112. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/index.mjs +1 -1
  113. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/read.mjs +1 -1
  114. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/icebergDataSource.mjs +1 -1
  115. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/icebergQuery.mjs +1 -1
  116. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/types.d.mts +17 -18
  117. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/create.d.mts +1 -0
  118. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/index.d.mts +1 -1
  119. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/manifest.d.mts +1 -0
  120. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/metadata.d.mts +1 -0
  121. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/read.d.mts +1 -1
  122. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/s3.d.mts +1 -0
  123. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergDataSource.d.mts +2 -0
  124. package/dist/node_modules/.pnpm/icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergQuery.d.mts +2 -0
  125. package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/write/write.d.mts +2 -3
  126. package/dist/node_modules/.pnpm/squirreling@0.16.4/node_modules/squirreling/src/ast.d.mts +1 -0
  127. package/dist/parquet-plan.d.mts +5 -6
  128. package/dist/period/index.d.mts +8 -8
  129. package/dist/profile.d.mts +3 -3
  130. package/dist/report/define.d.mts +1 -2
  131. package/dist/report/hash.d.mts +3 -4
  132. package/dist/report/registry.d.mts +3 -4
  133. package/dist/report/types.d.mts +22 -23
  134. package/dist/resolver/adapter.d.mts +2 -3
  135. package/dist/resolver/canonical-source.d.mts +1 -2
  136. package/dist/resolver/compile.d.mts +12 -8
  137. package/dist/resolver/compile.mjs +7 -3
  138. package/dist/resolver/datasets.d.mts +9 -9
  139. package/dist/resolver/extras-overlay.d.mts +2 -3
  140. package/dist/resolver/filter-utils.d.mts +7 -7
  141. package/dist/resolver/fragments.d.mts +3 -4
  142. package/dist/resolver/pg-adapter.d.mts +7 -8
  143. package/dist/resolver/run-query.d.mts +16 -17
  144. package/dist/resolver/run-query.mjs +16 -15
  145. package/dist/resolver/schema-drift.d.mts +2 -3
  146. package/dist/resolver/types.d.mts +8 -9
  147. package/dist/rollups/canonical.d.mts +4 -5
  148. package/dist/rollups/core.d.mts +12 -13
  149. package/dist/rollups/defaults.d.mts +2 -3
  150. package/dist/rollups/hourly.d.mts +3 -4
  151. package/dist/rollups/indexing.d.mts +5 -6
  152. package/dist/rollups/traffic.d.mts +5 -6
  153. package/dist/rollups/windows.d.mts +7 -8
  154. package/dist/schedule.d.mts +6 -7
  155. package/dist/schema.d.mts +9 -9
  156. package/dist/scope.d.mts +6 -7
  157. package/dist/sink.d.mts +9 -10
  158. package/dist/sinks/in-memory-sink.d.mts +3 -4
  159. package/dist/snapshot.d.mts +2 -3
  160. package/dist/source/attached-table.d.mts +4 -5
  161. package/dist/source/create-sql-query-source.d.mts +2 -3
  162. package/dist/source/index.d.mts +6 -6
  163. package/dist/source/source-types.d.mts +7 -8
  164. package/dist/sql-bind.d.mts +3 -4
  165. package/dist/sql-fragments.d.mts +5 -6
  166. package/dist/storage.d.mts +37 -37
  167. package/dist/sync-config.d.mts +20 -21
  168. package/dist/vendor/hysnappy-purejs.d.mts +2 -3
  169. package/dist/vendor/hysnappy-purejs.mjs +1 -1
  170. package/package.json +12 -10
  171. package/dist/node_modules/.pnpm/icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergDataSource.d.mts +0 -2
  172. package/dist/node_modules/.pnpm/icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/sql/icebergQuery.d.mts +0 -2
  173. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/create.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/indexes.d.mts} +0 -0
  174. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird → hyparquet@1.30.0/node_modules/hyparquet}/types/metadata.d.mts +0 -0
  175. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/manifest.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/query.d.mts} +0 -0
  176. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7/node_modules/icebird/types/s3.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/read.d.mts} +0 -0
  177. /package/dist/node_modules/.pnpm/{squirreling@0.16.3/node_modules/squirreling/src/ast.d.mts → hyparquet@1.30.0/node_modules/hyparquet/types/snappy.d.mts} +0 -0
  178. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.metadata.mjs +0 -0
  179. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.read.mjs +0 -0
  180. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/avro/avro.write.mjs +0 -0
  181. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/file.mjs +0 -0
  182. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/loadTable.mjs +0 -0
  183. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/catalog/rest.mjs +0 -0
  184. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/create.mjs +0 -0
  185. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/delete.mjs +0 -0
  186. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/fetch.mjs +0 -0
  187. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/json.mjs +0 -0
  188. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/manifest.mjs +0 -0
  189. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/metadata.mjs +0 -0
  190. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/prune.mjs +0 -0
  191. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/deletion-vector.mjs +0 -0
  192. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/puffin.mjs +0 -0
  193. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/puffin/roaring.mjs +0 -0
  194. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/s3.mjs +0 -0
  195. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/schema.mjs +0 -0
  196. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sigv4.mjs +0 -0
  197. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/sql/whereFilter.mjs +0 -0
  198. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/utils.mjs +0 -0
  199. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/commit.mjs +0 -0
  200. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/conversions.mjs +0 -0
  201. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/delete-file.mjs +0 -0
  202. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/geospatial.mjs +0 -0
  203. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/manifest-list.mjs +0 -0
  204. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/manifest.mjs +0 -0
  205. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/parquet.mjs +0 -0
  206. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/partition.mjs +0 -0
  207. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/rewrite.mjs +0 -0
  208. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/serde.mjs +0 -0
  209. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/snapshot.mjs +0 -0
  210. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/sort.mjs +0 -0
  211. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage-deletion-vector.mjs +0 -0
  212. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage-position-delete.mjs +0 -0
  213. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stage.mjs +0 -0
  214. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/stats.mjs +0 -0
  215. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/transform.mjs +0 -0
  216. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/src/write/write.mjs +0 -0
  217. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/catalog/file.d.mts +0 -0
  218. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/catalog/rest.d.mts +0 -0
  219. /package/dist/node_modules/.pnpm/{icebird@0.8.27_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7 → icebird@0.8.28_patch_hash_651b5cc1b513184638c98e21a0852c4559044ae60f8449fbe9d81a894ea5b4d7}/node_modules/icebird/types/fetch.d.mts +0 -0
  220. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/batch.mjs +0 -0
  221. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/batchAdapters.mjs +0 -0
  222. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/backend/dataSource.mjs +0 -0
  223. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/accumulator.mjs +0 -0
  224. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/aggregates.mjs +0 -0
  225. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/batchResults.mjs +0 -0
  226. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/batches.mjs +0 -0
  227. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/execute.mjs +0 -0
  228. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/fold.mjs +0 -0
  229. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/join.mjs +0 -0
  230. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/rowScope.mjs +0 -0
  231. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/scanColumn.mjs +0 -0
  232. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/sort.mjs +0 -0
  233. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/streamingAggregate.mjs +0 -0
  234. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/utils.mjs +0 -0
  235. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/window.mjs +0 -0
  236. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/execute/yield.mjs +0 -0
  237. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/alias.mjs +0 -0
  238. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/batch.mjs +0 -0
  239. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/binary.mjs +0 -0
  240. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/date.mjs +0 -0
  241. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/evaluate.mjs +0 -0
  242. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/math.mjs +0 -0
  243. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/regexp.mjs +0 -0
  244. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/scalar.mjs +0 -0
  245. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/expression/strings.mjs +0 -0
  246. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/index.d.mts +0 -0
  247. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/index.mjs +0 -0
  248. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/expression.mjs +0 -0
  249. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/extractTables.mjs +0 -0
  250. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/functions.mjs +0 -0
  251. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/joins.mjs +0 -0
  252. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/parse.mjs +0 -0
  253. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/primary.mjs +0 -0
  254. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/state.mjs +0 -0
  255. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/tokenize.mjs +0 -0
  256. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/parse/types.d.mts +0 -0
  257. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/columns.mjs +0 -0
  258. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/plan.mjs +0 -0
  259. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/plan/types.d.mts +0 -0
  260. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/bbox.mjs +0 -0
  261. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/equality.mjs +0 -0
  262. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/operations.mjs +0 -0
  263. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/pointRelations.mjs +0 -0
  264. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/primitives.mjs +0 -0
  265. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/segments.mjs +0 -0
  266. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/spatial.mjs +0 -0
  267. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/spatial/wkt.mjs +0 -0
  268. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/types.d.mts +0 -0
  269. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/aggregates.mjs +0 -0
  270. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/executionErrors.mjs +0 -0
  271. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/functions.mjs +0 -0
  272. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/keywords.mjs +0 -0
  273. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/parseErrors.mjs +0 -0
  274. /package/dist/node_modules/.pnpm/{squirreling@0.16.3 → squirreling@0.16.4}/node_modules/squirreling/src/validation/tables.mjs +0 -0
@@ -1,129 +1,8 @@
1
- import { Encodings, PageTypes } from "./constants.mjs";
2
- import { convert, convertWithDictionary } from "./convert.mjs";
3
- import { isFlatColumn } from "./schema.mjs";
4
- import { deserializeTCompactProtocol } from "./thrift.mjs";
5
- import { assembleLists } from "./assemble.mjs";
6
- import { readPlain } from "./plain.mjs";
7
- import { decompressPage, readDataPage, readDataPageV2 } from "./datapage.mjs";
8
- function readColumn(reader, { groupStart, selectStart, selectEnd }, columnDecoder, onPage) {
9
- const { pathInSchema, schemaPath } = columnDecoder;
10
- const isFlat = isFlatColumn(schemaPath);
11
- const chunks = [];
12
- let dictionary = void 0;
13
- let lastChunk = void 0;
14
- let rowCount = 0;
15
- let skipped = 0;
16
- const emitLastChunk = onPage && (() => {
17
- lastChunk && onPage({
18
- pathInSchema,
19
- columnData: lastChunk,
20
- rowStart: groupStart + rowCount - lastChunk.length,
21
- rowEnd: groupStart + rowCount
22
- });
23
- });
24
- while (isFlat ? rowCount < selectEnd : reader.offset < reader.view.byteLength - 1) {
25
- if (reader.offset >= reader.view.byteLength - 1) break;
26
- const header = parquetHeader(reader);
27
- if (header.type === "DICTIONARY_PAGE") {
28
- const { data } = readPage(reader, header, columnDecoder, dictionary, void 0, 0);
29
- if (data) dictionary = convert(data, columnDecoder);
30
- } else {
31
- const lastChunkLength = lastChunk?.length || 0;
32
- const result = readPage(reader, header, columnDecoder, dictionary, lastChunk, selectStart - rowCount);
33
- if (result.skipped) {
34
- if (!chunks.length) skipped += result.skipped;
35
- rowCount += result.skipped;
36
- } else if (result.data && lastChunk === result.data) rowCount += result.data.length - lastChunkLength;
37
- else if (result.data && result.data.length) {
38
- emitLastChunk?.();
39
- chunks.push(result.data);
40
- rowCount += result.data.length;
41
- lastChunk = result.data;
42
- }
43
- }
44
- }
45
- emitLastChunk?.();
46
- return {
47
- data: chunks,
48
- skipped
49
- };
50
- }
51
- function readPage(reader, header, columnDecoder, dictionary, previousChunk, pageStart) {
52
- const { type, element, schemaPath, codec, compressors } = columnDecoder;
53
- const compressedBytes = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, header.compressed_page_size);
54
- reader.offset += header.compressed_page_size;
55
- if (header.type === "DATA_PAGE") {
56
- const daph = header.data_page_header;
57
- if (!daph) throw new Error("parquet data page header is undefined");
58
- if (pageStart > daph.num_values && isFlatColumn(schemaPath)) return { skipped: daph.num_values };
59
- const page = decompressPage(compressedBytes, Number(header.uncompressed_page_size), codec, compressors);
60
- const { definitionLevels, repetitionLevels, dataPage } = readDataPage(page, daph, columnDecoder);
61
- const values = convertWithDictionary(dataPage, dictionary, daph.encoding, columnDecoder);
62
- return {
63
- skipped: 0,
64
- data: assembleLists(Array.isArray(previousChunk) ? previousChunk : [], definitionLevels, repetitionLevels, values, schemaPath)
65
- };
66
- } else if (header.type === "DATA_PAGE_V2") {
67
- const daph2 = header.data_page_header_v2;
68
- if (!daph2) throw new Error("parquet data page header v2 is undefined");
69
- if (pageStart > daph2.num_rows) return { skipped: daph2.num_values };
70
- const { definitionLevels, repetitionLevels, dataPage } = readDataPageV2(compressedBytes, header, columnDecoder);
71
- const values = convertWithDictionary(dataPage, dictionary, daph2.encoding, columnDecoder);
72
- return {
73
- skipped: 0,
74
- data: assembleLists(Array.isArray(previousChunk) ? previousChunk : [], definitionLevels, repetitionLevels, values, schemaPath)
75
- };
76
- } else if (header.type === "DICTIONARY_PAGE") {
77
- const diph = header.dictionary_page_header;
78
- if (!diph) throw new Error("parquet dictionary page header is undefined");
79
- const page = decompressPage(compressedBytes, Number(header.uncompressed_page_size), codec, compressors);
80
- const reader = {
81
- view: new DataView(page.buffer, page.byteOffset, page.byteLength),
82
- offset: 0
83
- };
84
- return {
85
- skipped: 0,
86
- data: readPlain(reader, type, diph.num_values, element.type_length)
87
- };
88
- } else throw new Error(`parquet unsupported page type: ${header.type}`);
89
- }
90
- function parquetHeader(reader) {
91
- const header = deserializeTCompactProtocol(reader);
92
- return {
93
- type: PageTypes[header.field_1],
94
- uncompressed_page_size: header.field_2,
95
- compressed_page_size: header.field_3,
96
- crc: header.field_4,
97
- data_page_header: header.field_5 && {
98
- num_values: header.field_5.field_1,
99
- encoding: Encodings[header.field_5.field_2],
100
- definition_level_encoding: Encodings[header.field_5.field_3],
101
- repetition_level_encoding: Encodings[header.field_5.field_4],
102
- statistics: header.field_5.field_5 && {
103
- max: header.field_5.field_5.field_1,
104
- min: header.field_5.field_5.field_2,
105
- null_count: header.field_5.field_5.field_3,
106
- distinct_count: header.field_5.field_5.field_4,
107
- max_value: header.field_5.field_5.field_5,
108
- min_value: header.field_5.field_5.field_6
109
- }
110
- },
111
- index_page_header: header.field_6,
112
- dictionary_page_header: header.field_7 && {
113
- num_values: header.field_7.field_1,
114
- encoding: Encodings[header.field_7.field_2],
115
- is_sorted: header.field_7.field_3
116
- },
117
- data_page_header_v2: header.field_8 && {
118
- num_values: header.field_8.field_1,
119
- num_nulls: header.field_8.field_2,
120
- num_rows: header.field_8.field_3,
121
- encoding: Encodings[header.field_8.field_4],
122
- definition_levels_byte_length: header.field_8.field_5,
123
- repetition_levels_byte_length: header.field_8.field_6,
124
- is_compressed: header.field_8.field_7 === void 0 ? true : header.field_8.field_7,
125
- statistics: header.field_8.field_8
126
- }
127
- };
128
- }
129
- export { readColumn, readPage };
1
+ import "./schema.mjs";
2
+ import "./thrift.mjs";
3
+ import "./constants.mjs";
4
+ import "./convert.mjs";
5
+ import "./assemble.mjs";
6
+ import "./plain.mjs";
7
+ import "./datapage.mjs";
8
+ export {};
@@ -1,118 +1,3 @@
1
- import { wkbToGeojson } from "./wkb.mjs";
2
- const decoder = new TextDecoder();
3
- const DEFAULT_PARSERS = {
4
- timestampFromMilliseconds(millis) {
5
- return new Date(Number(millis));
6
- },
7
- timestampFromMicroseconds(micros) {
8
- return new Date(Number(micros / 1000n));
9
- },
10
- timestampFromNanoseconds(nanos) {
11
- return new Date(Number(nanos / 1000000n));
12
- },
13
- dateFromDays(days) {
14
- return /* @__PURE__ */ new Date(days * 864e5);
15
- },
16
- stringFromBytes(bytes) {
17
- return bytes && decoder.decode(bytes);
18
- },
19
- jsonFromBytes(bytes) {
20
- return bytes && JSON.parse(decoder.decode(bytes));
21
- },
22
- geometryFromBytes(bytes) {
23
- return bytes && wkbToGeojson({
24
- view: new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength),
25
- offset: 0
26
- });
27
- },
28
- geographyFromBytes(bytes) {
29
- return bytes && wkbToGeojson({
30
- view: new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength),
31
- offset: 0
32
- });
33
- },
34
- uuidFromBytes(bytes) {
35
- if (!bytes) return void 0;
36
- const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
37
- return hex.slice(0, 8) + "-" + hex.slice(8, 12) + "-" + hex.slice(12, 16) + "-" + hex.slice(16, 20) + "-" + hex.slice(20, 32);
38
- }
39
- };
40
- function convertWithDictionary(data, dictionary, encoding, columnDecoder) {
41
- if (dictionary && encoding.endsWith("_DICTIONARY")) {
42
- let output = data;
43
- if (data instanceof Uint8Array && !(dictionary instanceof Uint8Array)) output = new dictionary.constructor(data.length);
44
- for (let i = 0; i < data.length; i++) output[i] = dictionary[data[i]];
45
- return output;
46
- } else return convert(data, columnDecoder);
47
- }
48
- function convert(data, columnDecoder) {
49
- const { element, parsers, utf8 = true, schemaPath } = columnDecoder;
50
- const { type, converted_type: ctype, logical_type: ltype } = element;
51
- const nullable = element.repetition_type !== "REQUIRED";
52
- if (schemaPath?.some((s) => s.element.logical_type?.type === "VARIANT") && type === "BYTE_ARRAY" && ctype !== "UTF8" && ltype?.type !== "STRING") return data;
53
- if (ctype === "DECIMAL") {
54
- const factor = 10 ** -(element.scale || 0);
55
- const arr = new Array(data.length);
56
- for (let i = 0; i < arr.length; i++) if (data[i] instanceof Uint8Array) arr[i] = parseDecimal(data[i]) * factor;
57
- else arr[i] = Number(data[i]) * factor;
58
- return arr;
59
- }
60
- if (!ctype && type === "INT96") return Array.from(data).map((v) => parsers.timestampFromNanoseconds(parseInt96Nanos(v)));
61
- if (ctype === "DATE") return Array.from(data).map((v) => parsers.dateFromDays(v));
62
- if (ctype === "TIMESTAMP_MILLIS") return Array.from(data).map((v) => parsers.timestampFromMilliseconds(v));
63
- if (ctype === "TIMESTAMP_MICROS") return Array.from(data).map((v) => parsers.timestampFromMicroseconds(v));
64
- if (ctype === "JSON") return data.map((v) => parsers.jsonFromBytes(v));
65
- if (ctype === "BSON") throw new Error("parquet bson not supported");
66
- if (ctype === "INTERVAL") throw new Error("parquet interval not supported");
67
- if (ltype?.type === "GEOMETRY") return data.map((v) => parsers.geometryFromBytes(v));
68
- if (ltype?.type === "GEOGRAPHY") return data.map((v) => parsers.geographyFromBytes(v));
69
- if (ltype?.type === "UUID") return data.map((v) => parsers.uuidFromBytes(v));
70
- if (ctype === "UTF8" || ltype?.type === "STRING" || utf8 && type === "BYTE_ARRAY") return data.map((v) => parsers.stringFromBytes(v));
71
- if (ctype === "UINT_64" || ltype?.type === "INTEGER" && ltype.bitWidth === 64 && !ltype.isSigned) {
72
- if (data instanceof BigInt64Array) return new BigUint64Array(data.buffer, data.byteOffset, data.length);
73
- const arr = nullable ? new Array(data.length) : new BigUint64Array(data.length);
74
- for (let i = 0; i < arr.length; i++) arr[i] = data[i];
75
- return arr;
76
- }
77
- if (ctype === "UINT_32" || ltype?.type === "INTEGER" && ltype.bitWidth === 32 && !ltype.isSigned) {
78
- if (data instanceof Int32Array) return new Uint32Array(data.buffer, data.byteOffset, data.length);
79
- const arr = nullable ? new Array(data.length) : new Uint32Array(data.length);
80
- for (let i = 0; i < arr.length; i++) arr[i] = data[i] < 0 ? 4294967296 + data[i] : data[i];
81
- return arr;
82
- }
83
- if (ltype?.type === "FLOAT16") return Array.from(data).map(parseFloat16);
84
- if (ltype?.type === "TIMESTAMP") {
85
- const { unit } = ltype;
86
- let parser = parsers.timestampFromMilliseconds;
87
- if (unit === "MICROS") parser = parsers.timestampFromMicroseconds;
88
- if (unit === "NANOS") parser = parsers.timestampFromNanoseconds;
89
- const arr = new Array(data.length);
90
- for (let i = 0; i < arr.length; i++) arr[i] = parser(data[i]);
91
- return arr;
92
- }
93
- return data;
94
- }
95
- function parseDecimal(bytes) {
96
- if (!bytes.length) return 0;
97
- let value = 0n;
98
- for (const byte of bytes) value = value * 256n + BigInt(byte);
99
- const bits = bytes.length * 8;
100
- if (value >= 2n ** BigInt(bits - 1)) value -= 2n ** BigInt(bits);
101
- return Number(value);
102
- }
103
- function parseInt96Nanos(value) {
104
- const days = (value >> 64n) - 2440588n;
105
- const nano = value & 18446744073709551615n;
106
- return days * 86400000000000n + nano;
107
- }
108
- function parseFloat16(bytes) {
109
- if (!bytes) return void 0;
110
- const int16 = bytes[1] << 8 | bytes[0];
111
- const sign = int16 >> 15 ? -1 : 1;
112
- const exp = int16 >> 10 & 31;
113
- const frac = int16 & 1023;
114
- if (exp === 0) return sign * 2 ** -14 * (frac / 1024);
115
- if (exp === 31) return frac ? NaN : sign * Infinity;
116
- return sign * 2 ** (exp - 15) * (1 + frac / 1024);
117
- }
118
- export { DEFAULT_PARSERS, convert, convertWithDictionary, parseDecimal, parseFloat16 };
1
+ import "./wkb.mjs";
2
+ new TextDecoder();
3
+ export {};
@@ -1,144 +1,6 @@
1
- import { getMaxDefinitionLevel, getMaxRepetitionLevel } from "./schema.mjs";
2
- import { deltaBinaryUnpack, deltaByteArray, deltaLengthByteArray } from "./delta.mjs";
3
- import { byteStreamSplit, readRleBitPackedHybrid } from "./encoding.mjs";
4
- import { readPlain } from "./plain.mjs";
5
- import { snappyUncompress } from "./snappy.mjs";
6
- function readDataPage(bytes, daph, { type, element, schemaPath }) {
7
- const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
8
- const reader = {
9
- view,
10
- offset: 0
11
- };
12
- let dataPage;
13
- const repetitionLevels = readRepetitionLevels(reader, daph, schemaPath);
14
- const { definitionLevels, numNulls } = readDefinitionLevels(reader, daph, schemaPath);
15
- const nValues = daph.num_values - numNulls;
16
- if (daph.encoding === "PLAIN") dataPage = readPlain(reader, type, nValues, element.type_length);
17
- else if (daph.encoding === "PLAIN_DICTIONARY" || daph.encoding === "RLE_DICTIONARY" || daph.encoding === "RLE") {
18
- const bitWidth = type === "BOOLEAN" ? 1 : view.getUint8(reader.offset++);
19
- if (bitWidth) {
20
- dataPage = new Array(nValues);
21
- if (type === "BOOLEAN") {
22
- readRleBitPackedHybrid(reader, bitWidth, dataPage);
23
- dataPage = dataPage.map((x) => !!x);
24
- } else readRleBitPackedHybrid(reader, bitWidth, dataPage, view.byteLength - reader.offset);
25
- } else dataPage = new Uint8Array(nValues);
26
- } else if (daph.encoding === "BYTE_STREAM_SPLIT") dataPage = byteStreamSplit(reader, nValues, type, element.type_length);
27
- else if (daph.encoding === "DELTA_BINARY_PACKED") {
28
- dataPage = type === "INT32" ? new Int32Array(nValues) : new BigInt64Array(nValues);
29
- deltaBinaryUnpack(reader, nValues, dataPage);
30
- } else if (daph.encoding === "DELTA_LENGTH_BYTE_ARRAY") {
31
- dataPage = new Array(nValues);
32
- deltaLengthByteArray(reader, nValues, dataPage);
33
- } else throw new Error(`parquet unsupported encoding: ${daph.encoding}`);
34
- return {
35
- definitionLevels,
36
- repetitionLevels,
37
- dataPage
38
- };
39
- }
40
- function readRepetitionLevels(reader, daph, schemaPath) {
41
- if (schemaPath.length > 1) {
42
- const maxRepetitionLevel = getMaxRepetitionLevel(schemaPath);
43
- if (maxRepetitionLevel) {
44
- const values = new Array(daph.num_values);
45
- readRleBitPackedHybrid(reader, bitWidth(maxRepetitionLevel), values);
46
- return values;
47
- }
48
- }
49
- return [];
50
- }
51
- function readDefinitionLevels(reader, daph, schemaPath) {
52
- const maxDefinitionLevel = getMaxDefinitionLevel(schemaPath);
53
- if (!maxDefinitionLevel) return {
54
- definitionLevels: [],
55
- numNulls: 0
56
- };
57
- const definitionLevels = new Array(daph.num_values);
58
- readRleBitPackedHybrid(reader, bitWidth(maxDefinitionLevel), definitionLevels);
59
- let numNulls = daph.num_values;
60
- for (const def of definitionLevels) if (def === maxDefinitionLevel) numNulls--;
61
- if (numNulls === 0) definitionLevels.length = 0;
62
- return {
63
- definitionLevels,
64
- numNulls
65
- };
66
- }
67
- function decompressPage(compressedBytes, uncompressed_page_size, codec, compressors) {
68
- let page;
69
- const customDecompressor = compressors?.[codec];
70
- if (codec === "UNCOMPRESSED") page = compressedBytes;
71
- else if (customDecompressor) page = customDecompressor(compressedBytes, uncompressed_page_size);
72
- else if (codec === "SNAPPY") {
73
- page = new Uint8Array(uncompressed_page_size);
74
- snappyUncompress(compressedBytes, page);
75
- } else throw new Error(`parquet unsupported compression codec: ${codec}`);
76
- if (page?.length !== uncompressed_page_size) throw new Error(`parquet decompressed page length ${page?.length} does not match header ${uncompressed_page_size}`);
77
- return page;
78
- }
79
- function readDataPageV2(compressedBytes, ph, columnDecoder) {
80
- const reader = {
81
- view: new DataView(compressedBytes.buffer, compressedBytes.byteOffset, compressedBytes.byteLength),
82
- offset: 0
83
- };
84
- const { type, element, schemaPath, codec, compressors } = columnDecoder;
85
- const daph2 = ph.data_page_header_v2;
86
- if (!daph2) throw new Error("parquet data page header v2 is undefined");
87
- const repetitionLevels = readRepetitionLevelsV2(reader, daph2, schemaPath);
88
- reader.offset = daph2.repetition_levels_byte_length;
89
- const definitionLevels = readDefinitionLevelsV2(reader, daph2, schemaPath);
90
- const uncompressedPageSize = ph.uncompressed_page_size - daph2.definition_levels_byte_length - daph2.repetition_levels_byte_length;
91
- let page = compressedBytes.subarray(reader.offset);
92
- if (daph2.is_compressed !== false) page = decompressPage(page, uncompressedPageSize, codec, compressors);
93
- const pageView = new DataView(page.buffer, page.byteOffset, page.byteLength);
94
- const pageReader = {
95
- view: pageView,
96
- offset: 0
97
- };
98
- let dataPage;
99
- const nValues = daph2.num_values - daph2.num_nulls;
100
- if (daph2.encoding === "PLAIN") dataPage = readPlain(pageReader, type, nValues, element.type_length);
101
- else if (daph2.encoding === "RLE") {
102
- dataPage = new Array(nValues);
103
- readRleBitPackedHybrid(pageReader, 1, dataPage);
104
- dataPage = dataPage.map((x) => !!x);
105
- } else if (daph2.encoding === "PLAIN_DICTIONARY" || daph2.encoding === "RLE_DICTIONARY") {
106
- const bitWidth = pageView.getUint8(pageReader.offset++);
107
- dataPage = new Array(nValues);
108
- readRleBitPackedHybrid(pageReader, bitWidth, dataPage, uncompressedPageSize - 1);
109
- } else if (daph2.encoding === "DELTA_BINARY_PACKED") {
110
- dataPage = type === "INT32" ? new Int32Array(nValues) : new BigInt64Array(nValues);
111
- deltaBinaryUnpack(pageReader, nValues, dataPage);
112
- } else if (daph2.encoding === "DELTA_LENGTH_BYTE_ARRAY") {
113
- dataPage = new Array(nValues);
114
- deltaLengthByteArray(pageReader, nValues, dataPage);
115
- } else if (daph2.encoding === "DELTA_BYTE_ARRAY") {
116
- dataPage = new Array(nValues);
117
- deltaByteArray(pageReader, nValues, dataPage);
118
- } else if (daph2.encoding === "BYTE_STREAM_SPLIT") dataPage = byteStreamSplit(pageReader, nValues, type, element.type_length);
119
- else throw new Error(`parquet unsupported encoding: ${daph2.encoding}`);
120
- return {
121
- definitionLevels,
122
- repetitionLevels,
123
- dataPage
124
- };
125
- }
126
- function readRepetitionLevelsV2(reader, daph2, schemaPath) {
127
- const maxRepetitionLevel = getMaxRepetitionLevel(schemaPath);
128
- if (!maxRepetitionLevel) return [];
129
- const values = new Array(daph2.num_values);
130
- readRleBitPackedHybrid(reader, bitWidth(maxRepetitionLevel), values, daph2.repetition_levels_byte_length);
131
- return values;
132
- }
133
- function readDefinitionLevelsV2(reader, daph2, schemaPath) {
134
- const maxDefinitionLevel = getMaxDefinitionLevel(schemaPath);
135
- if (maxDefinitionLevel) {
136
- const values = new Array(daph2.num_values);
137
- readRleBitPackedHybrid(reader, bitWidth(maxDefinitionLevel), values, daph2.definition_levels_byte_length);
138
- return values;
139
- }
140
- }
141
- function bitWidth(value) {
142
- return 32 - Math.clz32(value);
143
- }
144
- export { decompressPage, readDataPage, readDataPageV2 };
1
+ import "./schema.mjs";
2
+ import "./delta.mjs";
3
+ import "./encoding.mjs";
4
+ import "./plain.mjs";
5
+ import "./snappy.mjs";
6
+ export {};
@@ -1,65 +1,2 @@
1
- import { readVarInt, readZigZagBigInt } from "./thrift.mjs";
2
- function deltaBinaryUnpack(reader, count, output) {
3
- const int32 = output instanceof Int32Array;
4
- const blockSize = readVarInt(reader);
5
- const miniblockPerBlock = readVarInt(reader);
6
- readVarInt(reader);
7
- let value = readZigZagBigInt(reader);
8
- let outputIndex = 0;
9
- output[outputIndex++] = int32 ? Number(value) : value;
10
- const valuesPerMiniblock = blockSize / miniblockPerBlock;
11
- while (outputIndex < count) {
12
- const minDelta = readZigZagBigInt(reader);
13
- const bitWidths = new Uint8Array(miniblockPerBlock);
14
- for (let i = 0; i < miniblockPerBlock; i++) bitWidths[i] = reader.view.getUint8(reader.offset++);
15
- for (let i = 0; i < miniblockPerBlock && outputIndex < count; i++) {
16
- const bitWidth = BigInt(bitWidths[i]);
17
- if (bitWidth) {
18
- let bitpackPos = 0n;
19
- let miniblockCount = valuesPerMiniblock;
20
- const mask = (1n << bitWidth) - 1n;
21
- while (miniblockCount && outputIndex < count) {
22
- let bits = BigInt(reader.view.getUint8(reader.offset)) >> bitpackPos & mask;
23
- bitpackPos += bitWidth;
24
- while (bitpackPos >= 8) {
25
- bitpackPos -= 8n;
26
- reader.offset++;
27
- if (bitpackPos) bits |= BigInt(reader.view.getUint8(reader.offset)) << bitWidth - bitpackPos & mask;
28
- }
29
- const delta = minDelta + bits;
30
- value += delta;
31
- output[outputIndex++] = int32 ? Number(value) : value;
32
- miniblockCount--;
33
- }
34
- if (miniblockCount) reader.offset += Math.ceil((miniblockCount * Number(bitWidth) + Number(bitpackPos)) / 8);
35
- } else for (let j = 0; j < valuesPerMiniblock && outputIndex < count; j++) {
36
- value += minDelta;
37
- output[outputIndex++] = int32 ? Number(value) : value;
38
- }
39
- }
40
- }
41
- }
42
- function deltaLengthByteArray(reader, count, output) {
43
- const lengths = new Int32Array(count);
44
- deltaBinaryUnpack(reader, count, lengths);
45
- for (let i = 0; i < count; i++) {
46
- output[i] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, lengths[i]);
47
- reader.offset += lengths[i];
48
- }
49
- }
50
- function deltaByteArray(reader, count, output) {
51
- const prefixData = new Int32Array(count);
52
- deltaBinaryUnpack(reader, count, prefixData);
53
- const suffixData = new Int32Array(count);
54
- deltaBinaryUnpack(reader, count, suffixData);
55
- for (let i = 0; i < count; i++) {
56
- const suffix = new Uint8Array(reader.view.buffer, reader.view.byteOffset + reader.offset, suffixData[i]);
57
- if (prefixData[i]) {
58
- output[i] = new Uint8Array(prefixData[i] + suffixData[i]);
59
- output[i].set(output[i - 1].subarray(0, prefixData[i]));
60
- output[i].set(suffix, prefixData[i]);
61
- } else output[i] = suffix;
62
- reader.offset += suffixData[i];
63
- }
64
- }
65
- export { deltaBinaryUnpack, deltaByteArray, deltaLengthByteArray };
1
+ import "./thrift.mjs";
2
+ export {};
@@ -1,76 +1,2 @@
1
- import { readVarInt } from "./thrift.mjs";
2
- function readRleBitPackedHybrid(reader, width, output, length) {
3
- if (length === void 0) {
4
- length = reader.view.getUint32(reader.offset, true);
5
- reader.offset += 4;
6
- }
7
- const startOffset = reader.offset;
8
- let seen = 0;
9
- while (seen < output.length) {
10
- const header = readVarInt(reader);
11
- if (header & 1) seen = readBitPacked(reader, header, width, output, seen);
12
- else {
13
- const count = header >>> 1;
14
- readRle(reader, count, width, output, seen);
15
- seen += count;
16
- }
17
- }
18
- reader.offset = startOffset + length;
19
- }
20
- function readRle(reader, count, bitWidth, output, seen) {
21
- const width = bitWidth + 7 >> 3;
22
- let value = 0;
23
- for (let i = 0; i < width; i++) value |= reader.view.getUint8(reader.offset++) << (i << 3);
24
- for (let i = 0; i < count; i++) output[seen + i] = value;
25
- }
26
- function readBitPacked(reader, header, bitWidth, output, seen) {
27
- let count = header >> 1 << 3;
28
- const mask = (1 << bitWidth) - 1;
29
- let data = 0;
30
- if (reader.offset < reader.view.byteLength) data = reader.view.getUint8(reader.offset++);
31
- else if (mask) throw new Error(`parquet bitpack offset ${reader.offset} out of range`);
32
- let left = 8;
33
- let right = 0;
34
- while (count) if (right > 8) {
35
- right -= 8;
36
- left -= 8;
37
- data >>>= 8;
38
- } else if (left - right < bitWidth) {
39
- data |= reader.view.getUint8(reader.offset) << left;
40
- reader.offset++;
41
- left += 8;
42
- } else {
43
- if (seen < output.length) output[seen++] = data >> right & mask;
44
- count--;
45
- right += bitWidth;
46
- }
47
- return seen;
48
- }
49
- function byteStreamSplit(reader, count, type, typeLength) {
50
- const width = byteWidth(type, typeLength);
51
- const bytes = new Uint8Array(count * width);
52
- for (let b = 0; b < width; b++) for (let i = 0; i < count; i++) bytes[i * width + b] = reader.view.getUint8(reader.offset++);
53
- if (type === "FLOAT") return new Float32Array(bytes.buffer);
54
- else if (type === "DOUBLE") return new Float64Array(bytes.buffer);
55
- else if (type === "INT32") return new Int32Array(bytes.buffer);
56
- else if (type === "INT64") return new BigInt64Array(bytes.buffer);
57
- else if (type === "FIXED_LEN_BYTE_ARRAY") {
58
- const split = new Array(count);
59
- for (let i = 0; i < count; i++) split[i] = bytes.subarray(i * width, (i + 1) * width);
60
- return split;
61
- }
62
- throw new Error(`parquet byte_stream_split unsupported type: ${type}`);
63
- }
64
- function byteWidth(type, typeLength) {
65
- switch (type) {
66
- case "INT32":
67
- case "FLOAT": return 4;
68
- case "INT64":
69
- case "DOUBLE": return 8;
70
- case "FIXED_LEN_BYTE_ARRAY":
71
- if (!typeLength) throw new Error("parquet byteWidth missing type_length");
72
- return typeLength;
73
- default: throw new Error(`parquet unsupported type: ${type}`);
74
- }
75
- }
76
- export { byteStreamSplit, readRleBitPackedHybrid };
1
+ import "./thrift.mjs";
2
+ export {};