@loaders.gl/parquet 5.0.0-alpha.2 → 5.0.0-alpha.4

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 (336) hide show
  1. package/LICENSE +1 -1
  2. package/dist/bundled.d.ts +1 -1
  3. package/dist/bundled.d.ts.map +1 -1
  4. package/dist/bundled.js.map +1 -1
  5. package/dist/delta-format.d.ts +9 -0
  6. package/dist/delta-format.d.ts.map +1 -0
  7. package/dist/delta-format.js +12 -0
  8. package/dist/delta-format.js.map +1 -0
  9. package/dist/delta-source-loader-types.d.ts +27 -0
  10. package/dist/delta-source-loader-types.d.ts.map +1 -0
  11. package/dist/delta-source-loader-types.js +28 -0
  12. package/dist/delta-source-loader-types.js.map +1 -0
  13. package/dist/delta-source.d.ts +48 -0
  14. package/dist/delta-source.d.ts.map +1 -0
  15. package/dist/delta-source.js +222 -0
  16. package/dist/delta-source.js.map +1 -0
  17. package/dist/delta-types.d.ts +38 -0
  18. package/dist/delta-types.d.ts.map +1 -0
  19. package/dist/delta-types.js +5 -0
  20. package/dist/delta-types.js.map +1 -0
  21. package/dist/geoparquet-loader.js +1 -1
  22. package/dist/iceberg-rest-catalog.d.ts +49 -0
  23. package/dist/iceberg-rest-catalog.d.ts.map +1 -0
  24. package/dist/iceberg-rest-catalog.js +78 -0
  25. package/dist/iceberg-rest-catalog.js.map +1 -0
  26. package/dist/iceberg-table-source.d.ts +63 -0
  27. package/dist/iceberg-table-source.d.ts.map +1 -0
  28. package/dist/iceberg-table-source.js +797 -0
  29. package/dist/iceberg-table-source.js.map +1 -0
  30. package/dist/iceberg-types.d.ts +150 -0
  31. package/dist/iceberg-types.d.ts.map +1 -0
  32. package/dist/iceberg-types.js +5 -0
  33. package/dist/iceberg-types.js.map +1 -0
  34. package/dist/index.cjs +15841 -3306
  35. package/dist/index.cjs.map +3 -3
  36. package/dist/index.d.ts +8 -3
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +5 -1
  39. package/dist/index.js.map +1 -1
  40. package/dist/lib/arrow/convert-schema-from-parquet.d.ts +3 -1
  41. package/dist/lib/arrow/convert-schema-from-parquet.d.ts.map +1 -1
  42. package/dist/lib/arrow/convert-schema-from-parquet.js +94 -19
  43. package/dist/lib/arrow/convert-schema-from-parquet.js.map +1 -1
  44. package/dist/lib/arrow/create-nested-arrow-vector.js +89 -0
  45. package/dist/lib/arrow/create-nested-arrow-vector.js.map +1 -1
  46. package/dist/lib/constants.js +1 -1
  47. package/dist/lib/encoders/encode-table-to-parquet-js.d.ts.map +1 -1
  48. package/dist/lib/encoders/encode-table-to-parquet-js.js +202 -7
  49. package/dist/lib/encoders/encode-table-to-parquet-js.js.map +1 -1
  50. package/dist/lib/geo/geoparquet-covering.d.ts +19 -0
  51. package/dist/lib/geo/geoparquet-covering.d.ts.map +1 -0
  52. package/dist/lib/geo/geoparquet-covering.js +137 -0
  53. package/dist/lib/geo/geoparquet-covering.js.map +1 -0
  54. package/dist/lib/geo/geospatial-metadata.d.ts.map +1 -1
  55. package/dist/lib/geo/geospatial-metadata.js +39 -13
  56. package/dist/lib/geo/geospatial-metadata.js.map +1 -1
  57. package/dist/lib/parquet-bloom-filter-planner.d.ts +16 -0
  58. package/dist/lib/parquet-bloom-filter-planner.d.ts.map +1 -0
  59. package/dist/lib/parquet-bloom-filter-planner.js +57 -0
  60. package/dist/lib/parquet-bloom-filter-planner.js.map +1 -0
  61. package/dist/lib/parquet-bloom-filter.d.ts +30 -0
  62. package/dist/lib/parquet-bloom-filter.d.ts.map +1 -0
  63. package/dist/lib/parquet-bloom-filter.js +289 -0
  64. package/dist/lib/parquet-bloom-filter.js.map +1 -0
  65. package/dist/lib/parquet-encryption.d.ts +80 -0
  66. package/dist/lib/parquet-encryption.d.ts.map +1 -0
  67. package/dist/lib/parquet-encryption.js +190 -0
  68. package/dist/lib/parquet-encryption.js.map +1 -0
  69. package/dist/lib/parquet-page-index.d.ts +34 -5
  70. package/dist/lib/parquet-page-index.d.ts.map +1 -1
  71. package/dist/lib/parquet-page-index.js +114 -28
  72. package/dist/lib/parquet-page-index.js.map +1 -1
  73. package/dist/lib/parquet-predicate.d.ts +5 -1
  74. package/dist/lib/parquet-predicate.d.ts.map +1 -1
  75. package/dist/lib/parquet-predicate.js +42 -14
  76. package/dist/lib/parquet-predicate.js.map +1 -1
  77. package/dist/lib/parquet-source-worker-decoder.d.ts +4 -1
  78. package/dist/lib/parquet-source-worker-decoder.d.ts.map +1 -1
  79. package/dist/lib/parquet-source-worker-decoder.js +83 -17
  80. package/dist/lib/parquet-source-worker-decoder.js.map +1 -1
  81. package/dist/lib/parquet-source-worker-types.d.ts +24 -0
  82. package/dist/lib/parquet-source-worker-types.d.ts.map +1 -1
  83. package/dist/lib/parsers/get-parquet-schema.d.ts.map +1 -1
  84. package/dist/lib/parsers/get-parquet-schema.js +3 -1
  85. package/dist/lib/parsers/get-parquet-schema.js.map +1 -1
  86. package/dist/lib/parsers/parse-parquet-to-arrow-js.d.ts.map +1 -1
  87. package/dist/lib/parsers/parse-parquet-to-arrow-js.js +327 -18
  88. package/dist/lib/parsers/parse-parquet-to-arrow-js.js.map +1 -1
  89. package/dist/lib/parsers/parse-parquet-to-arrow.d.ts.map +1 -1
  90. package/dist/lib/parsers/parse-parquet-to-arrow.js +5 -5
  91. package/dist/lib/parsers/parse-parquet-to-arrow.js.map +1 -1
  92. package/dist/lib/parsers/parse-parquet-to-columns.d.ts.map +1 -1
  93. package/dist/lib/parsers/parse-parquet-to-columns.js +3 -1
  94. package/dist/lib/parsers/parse-parquet-to-columns.js.map +1 -1
  95. package/dist/lib/parsers/parse-parquet-to-json.d.ts.map +1 -1
  96. package/dist/lib/parsers/parse-parquet-to-json.js +18 -2
  97. package/dist/lib/parsers/parse-parquet-to-json.js.map +1 -1
  98. package/dist/lib/slice-parquet-batch.d.ts +9 -0
  99. package/dist/lib/slice-parquet-batch.d.ts.map +1 -0
  100. package/dist/lib/slice-parquet-batch.js +28 -0
  101. package/dist/lib/slice-parquet-batch.js.map +1 -0
  102. package/dist/lib/sources/parquet-range-file.d.ts +1 -1
  103. package/dist/lib/sources/parquet-range-file.d.ts.map +1 -1
  104. package/dist/lib/sources/parquet-range-file.js +28 -22
  105. package/dist/lib/sources/parquet-range-file.js.map +1 -1
  106. package/dist/lib/utils/normalize-parquet-options.d.ts.map +1 -1
  107. package/dist/lib/utils/normalize-parquet-options.js +15 -1
  108. package/dist/lib/utils/normalize-parquet-options.js.map +1 -1
  109. package/dist/parquet-dataset-source.cjs +16528 -4928
  110. package/dist/parquet-dataset-source.cjs.map +3 -3
  111. package/dist/parquet-dataset-source.d.ts +31 -4
  112. package/dist/parquet-dataset-source.d.ts.map +1 -1
  113. package/dist/parquet-dataset-source.js +296 -74
  114. package/dist/parquet-dataset-source.js.map +1 -1
  115. package/dist/parquet-encoded-page-types.d.ts +108 -0
  116. package/dist/parquet-encoded-page-types.d.ts.map +1 -0
  117. package/dist/parquet-encoded-page-types.js +5 -0
  118. package/dist/parquet-encoded-page-types.js.map +1 -0
  119. package/dist/parquet-js-loader-types.d.ts +2 -0
  120. package/dist/parquet-js-loader-types.d.ts.map +1 -1
  121. package/dist/parquet-js-loader-types.js +2 -1
  122. package/dist/parquet-js-loader-types.js.map +1 -1
  123. package/dist/parquet-js-loader.d.ts +1 -0
  124. package/dist/parquet-js-loader.d.ts.map +1 -1
  125. package/dist/parquet-js-loader.js +2 -1
  126. package/dist/parquet-js-loader.js.map +1 -1
  127. package/dist/parquet-js-writer.d.ts +23 -2
  128. package/dist/parquet-js-writer.d.ts.map +1 -1
  129. package/dist/parquet-js-writer.js +1 -1
  130. package/dist/parquet-js-writer.js.map +1 -1
  131. package/dist/parquet-loader-base.js +1 -1
  132. package/dist/parquet-loader-options.d.ts +11 -0
  133. package/dist/parquet-loader-options.d.ts.map +1 -1
  134. package/dist/parquet-loader-options.js.map +1 -1
  135. package/dist/parquet-source-capabilities.d.ts +8 -1
  136. package/dist/parquet-source-capabilities.d.ts.map +1 -1
  137. package/dist/parquet-source-capabilities.js +10 -0
  138. package/dist/parquet-source-capabilities.js.map +1 -1
  139. package/dist/parquet-source-loader-types.d.ts +10 -0
  140. package/dist/parquet-source-loader-types.d.ts.map +1 -1
  141. package/dist/parquet-source-loader-types.js +11 -1
  142. package/dist/parquet-source-loader-types.js.map +1 -1
  143. package/dist/parquet-source-loader.cjs +14121 -2796
  144. package/dist/parquet-source-loader.cjs.map +3 -3
  145. package/dist/parquet-source-loader.d.ts +51 -4
  146. package/dist/parquet-source-loader.d.ts.map +1 -1
  147. package/dist/parquet-source-loader.js +651 -38
  148. package/dist/parquet-source-loader.js.map +1 -1
  149. package/dist/parquet-source-types.d.ts +180 -30
  150. package/dist/parquet-source-types.d.ts.map +1 -1
  151. package/dist/parquet-source-worker.js +7378 -6989
  152. package/dist/parquet-source-worker.js.map +4 -4
  153. package/dist/parquet-worker-node.cjs +8501 -1045
  154. package/dist/parquet-worker-node.cjs.map +4 -4
  155. package/dist/parquet-worker-url.js +5 -1
  156. package/dist/parquet-worker-url.js.map +1 -1
  157. package/dist/parquet-worker.js +289 -218
  158. package/dist/parquet-worker.js.map +4 -4
  159. package/dist/parquetjs/codecs/declare.d.ts +15 -0
  160. package/dist/parquetjs/codecs/declare.d.ts.map +1 -1
  161. package/dist/parquetjs/codecs/declare.js +10 -0
  162. package/dist/parquetjs/codecs/declare.js.map +1 -1
  163. package/dist/parquetjs/codecs/delta.d.ts.map +1 -1
  164. package/dist/parquetjs/codecs/delta.js +356 -7
  165. package/dist/parquetjs/codecs/delta.js.map +1 -1
  166. package/dist/parquetjs/codecs/index.d.ts.map +1 -1
  167. package/dist/parquetjs/codecs/index.js +4 -0
  168. package/dist/parquetjs/codecs/index.js.map +1 -1
  169. package/dist/parquetjs/codecs/plain.d.ts +1 -1
  170. package/dist/parquetjs/codecs/plain.d.ts.map +1 -1
  171. package/dist/parquetjs/codecs/plain.js +153 -12
  172. package/dist/parquetjs/codecs/plain.js.map +1 -1
  173. package/dist/parquetjs/codecs/rle.d.ts +4 -0
  174. package/dist/parquetjs/codecs/rle.d.ts.map +1 -1
  175. package/dist/parquetjs/codecs/rle.js +406 -3
  176. package/dist/parquetjs/codecs/rle.js.map +1 -1
  177. package/dist/parquetjs/compression.d.ts +9 -0
  178. package/dist/parquetjs/compression.d.ts.map +1 -1
  179. package/dist/parquetjs/compression.js +86 -67
  180. package/dist/parquetjs/compression.js.map +1 -1
  181. package/dist/parquetjs/encoder/dictionary-planner.d.ts.map +1 -1
  182. package/dist/parquetjs/encoder/dictionary-planner.js +5 -2
  183. package/dist/parquetjs/encoder/dictionary-planner.js.map +1 -1
  184. package/dist/parquetjs/encoder/parquet-encoder.d.ts +43 -1
  185. package/dist/parquetjs/encoder/parquet-encoder.d.ts.map +1 -1
  186. package/dist/parquetjs/encoder/parquet-encoder.js +691 -34
  187. package/dist/parquetjs/encoder/parquet-encoder.js.map +1 -1
  188. package/dist/parquetjs/parquet-thrift/BoundingBox.d.ts +29 -0
  189. package/dist/parquetjs/parquet-thrift/BoundingBox.d.ts.map +1 -0
  190. package/dist/parquetjs/parquet-thrift/BoundingBox.js +85 -0
  191. package/dist/parquetjs/parquet-thrift/BoundingBox.js.map +1 -0
  192. package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts +5 -0
  193. package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts.map +1 -1
  194. package/dist/parquetjs/parquet-thrift/ColumnChunk.js +35 -0
  195. package/dist/parquetjs/parquet-thrift/ColumnChunk.js.map +1 -1
  196. package/dist/parquetjs/parquet-thrift/ColumnCryptoMetaData.d.ts +35 -0
  197. package/dist/parquetjs/parquet-thrift/ColumnCryptoMetaData.d.ts.map +1 -0
  198. package/dist/parquetjs/parquet-thrift/ColumnCryptoMetaData.js +135 -0
  199. package/dist/parquetjs/parquet-thrift/ColumnCryptoMetaData.js.map +1 -0
  200. package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts +10 -0
  201. package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts.map +1 -1
  202. package/dist/parquetjs/parquet-thrift/ColumnMetaData.js +73 -0
  203. package/dist/parquetjs/parquet-thrift/ColumnMetaData.js.map +1 -1
  204. package/dist/parquetjs/parquet-thrift/EncryptionAlgorithm.d.ts +22 -0
  205. package/dist/parquetjs/parquet-thrift/EncryptionAlgorithm.d.ts.map +1 -0
  206. package/dist/parquetjs/parquet-thrift/EncryptionAlgorithm.js +111 -0
  207. package/dist/parquetjs/parquet-thrift/EncryptionAlgorithm.js.map +1 -0
  208. package/dist/parquetjs/parquet-thrift/FileCryptoMetaData.d.ts +16 -0
  209. package/dist/parquetjs/parquet-thrift/FileCryptoMetaData.d.ts.map +1 -0
  210. package/dist/parquetjs/parquet-thrift/FileCryptoMetaData.js +57 -0
  211. package/dist/parquetjs/parquet-thrift/FileCryptoMetaData.js.map +1 -0
  212. package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts +5 -0
  213. package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts.map +1 -1
  214. package/dist/parquetjs/parquet-thrift/FileMetaData.js +35 -0
  215. package/dist/parquetjs/parquet-thrift/FileMetaData.js.map +1 -1
  216. package/dist/parquetjs/parquet-thrift/GeospatialStatistics.d.ts +18 -0
  217. package/dist/parquetjs/parquet-thrift/GeospatialStatistics.d.ts.map +1 -0
  218. package/dist/parquetjs/parquet-thrift/GeospatialStatistics.js +62 -0
  219. package/dist/parquetjs/parquet-thrift/GeospatialStatistics.js.map +1 -0
  220. package/dist/parquetjs/parquet-thrift/SizeStatistics.d.ts +26 -0
  221. package/dist/parquetjs/parquet-thrift/SizeStatistics.d.ts.map +1 -0
  222. package/dist/parquetjs/parquet-thrift/SizeStatistics.js +85 -0
  223. package/dist/parquetjs/parquet-thrift/SizeStatistics.js.map +1 -0
  224. package/dist/parquetjs/parquet-thrift/index.d.ts +6 -0
  225. package/dist/parquetjs/parquet-thrift/index.d.ts.map +1 -1
  226. package/dist/parquetjs/parquet-thrift/index.js +6 -0
  227. package/dist/parquetjs/parquet-thrift/index.js.map +1 -1
  228. package/dist/parquetjs/parser/decoders.d.ts +10 -1
  229. package/dist/parquetjs/parser/decoders.d.ts.map +1 -1
  230. package/dist/parquetjs/parser/decoders.js +318 -14
  231. package/dist/parquetjs/parser/decoders.js.map +1 -1
  232. package/dist/parquetjs/parser/encoded-pages.d.ts +24 -0
  233. package/dist/parquetjs/parser/encoded-pages.d.ts.map +1 -0
  234. package/dist/parquetjs/parser/encoded-pages.js +206 -0
  235. package/dist/parquetjs/parser/encoded-pages.js.map +1 -0
  236. package/dist/parquetjs/parser/parquet-reader.d.ts +88 -12
  237. package/dist/parquetjs/parser/parquet-reader.d.ts.map +1 -1
  238. package/dist/parquetjs/parser/parquet-reader.js +713 -66
  239. package/dist/parquetjs/parser/parquet-reader.js.map +1 -1
  240. package/dist/parquetjs/schema/declare.d.ts +22 -3
  241. package/dist/parquetjs/schema/declare.d.ts.map +1 -1
  242. package/dist/parquetjs/schema/declare.js.map +1 -1
  243. package/dist/parquetjs/schema/schema.d.ts.map +1 -1
  244. package/dist/parquetjs/schema/schema.js +10 -0
  245. package/dist/parquetjs/schema/schema.js.map +1 -1
  246. package/dist/parquetjs/schema/shred.d.ts.map +1 -1
  247. package/dist/parquetjs/schema/shred.js +219 -11
  248. package/dist/parquetjs/schema/shred.js.map +1 -1
  249. package/dist/parquetjs/schema/types.js +19 -21
  250. package/dist/parquetjs/schema/types.js.map +1 -1
  251. package/dist/parquetjs/schema/variant.d.ts +3 -0
  252. package/dist/parquetjs/schema/variant.d.ts.map +1 -0
  253. package/dist/parquetjs/schema/variant.js +248 -0
  254. package/dist/parquetjs/schema/variant.js.map +1 -0
  255. package/dist/parquetjs/utils/crc32.d.ts +3 -0
  256. package/dist/parquetjs/utils/crc32.d.ts.map +1 -0
  257. package/dist/parquetjs/utils/crc32.js +15 -0
  258. package/dist/parquetjs/utils/crc32.js.map +1 -0
  259. package/dist/parquetjs/utils/read-utils.d.ts +11 -1
  260. package/dist/parquetjs/utils/read-utils.d.ts.map +1 -1
  261. package/dist/parquetjs/utils/read-utils.js +21 -1
  262. package/dist/parquetjs/utils/read-utils.js.map +1 -1
  263. package/dist/unbundled.d.ts +2 -1
  264. package/dist/unbundled.d.ts.map +1 -1
  265. package/dist/unbundled.js +1 -0
  266. package/dist/unbundled.js.map +1 -1
  267. package/package.json +36 -13
  268. package/src/bundled.ts +10 -0
  269. package/src/delta-format.ts +12 -0
  270. package/src/delta-source-loader-types.ts +40 -0
  271. package/src/delta-source.ts +305 -0
  272. package/src/delta-types.ts +40 -0
  273. package/src/iceberg-rest-catalog.ts +122 -0
  274. package/src/iceberg-table-source.ts +1037 -0
  275. package/src/iceberg-types.ts +165 -0
  276. package/src/index.ts +59 -1
  277. package/src/lib/arrow/convert-schema-from-parquet.ts +113 -19
  278. package/src/lib/arrow/create-nested-arrow-vector.ts +116 -0
  279. package/src/lib/encoders/encode-table-to-parquet-js.ts +268 -7
  280. package/src/lib/geo/geoparquet-covering.ts +201 -0
  281. package/src/lib/geo/geospatial-metadata.ts +42 -15
  282. package/src/lib/parquet-bloom-filter-planner.ts +86 -0
  283. package/src/lib/parquet-bloom-filter.ts +345 -0
  284. package/src/lib/parquet-encryption.ts +344 -0
  285. package/src/lib/parquet-page-index.ts +180 -34
  286. package/src/lib/parquet-predicate.ts +52 -16
  287. package/src/lib/parquet-source-worker-decoder.ts +116 -20
  288. package/src/lib/parquet-source-worker-types.ts +25 -0
  289. package/src/lib/parsers/get-parquet-schema.ts +3 -1
  290. package/src/lib/parsers/parse-parquet-to-arrow-js.ts +397 -17
  291. package/src/lib/parsers/parse-parquet-to-arrow.ts +4 -5
  292. package/src/lib/parsers/parse-parquet-to-columns.ts +3 -1
  293. package/src/lib/parsers/parse-parquet-to-json.ts +18 -2
  294. package/src/lib/slice-parquet-batch.ts +32 -0
  295. package/src/lib/sources/parquet-range-file.ts +35 -29
  296. package/src/lib/utils/normalize-parquet-options.ts +17 -1
  297. package/src/parquet-dataset-source.ts +397 -85
  298. package/src/parquet-encoded-page-types.ts +122 -0
  299. package/src/parquet-js-loader-types.ts +1 -0
  300. package/src/parquet-js-loader.ts +2 -1
  301. package/src/parquet-js-writer.ts +30 -0
  302. package/src/parquet-loader-options.ts +11 -0
  303. package/src/parquet-source-capabilities.ts +18 -1
  304. package/src/parquet-source-loader-types.ts +10 -0
  305. package/src/parquet-source-loader.ts +1024 -52
  306. package/src/parquet-source-types.ts +197 -28
  307. package/src/parquet-worker-url.ts +6 -1
  308. package/src/parquetjs/codecs/declare.ts +27 -0
  309. package/src/parquetjs/codecs/delta.ts +466 -6
  310. package/src/parquetjs/codecs/index.ts +4 -0
  311. package/src/parquetjs/codecs/plain.ts +177 -11
  312. package/src/parquetjs/codecs/rle.ts +573 -3
  313. package/src/parquetjs/compression.ts +102 -76
  314. package/src/parquetjs/encoder/dictionary-planner.ts +7 -2
  315. package/src/parquetjs/encoder/parquet-encoder.ts +1016 -38
  316. package/src/parquetjs/parquet-thrift/BoundingBox.ts +108 -0
  317. package/src/parquetjs/parquet-thrift/ColumnChunk.ts +35 -0
  318. package/src/parquetjs/parquet-thrift/ColumnCryptoMetaData.ts +139 -0
  319. package/src/parquetjs/parquet-thrift/ColumnMetaData.ts +73 -0
  320. package/src/parquetjs/parquet-thrift/EncryptionAlgorithm.ts +127 -0
  321. package/src/parquetjs/parquet-thrift/FileCryptoMetaData.ts +60 -0
  322. package/src/parquetjs/parquet-thrift/FileMetaData.ts +35 -0
  323. package/src/parquetjs/parquet-thrift/GeospatialStatistics.ts +68 -0
  324. package/src/parquetjs/parquet-thrift/SizeStatistics.ts +98 -0
  325. package/src/parquetjs/parquet-thrift/index.ts +6 -0
  326. package/src/parquetjs/parser/decoders.ts +451 -26
  327. package/src/parquetjs/parser/encoded-pages.ts +278 -0
  328. package/src/parquetjs/parser/parquet-reader.ts +1112 -87
  329. package/src/parquetjs/schema/declare.ts +22 -2
  330. package/src/parquetjs/schema/schema.ts +10 -0
  331. package/src/parquetjs/schema/shred.ts +238 -11
  332. package/src/parquetjs/schema/types.ts +16 -25
  333. package/src/parquetjs/schema/variant.ts +313 -0
  334. package/src/parquetjs/utils/crc32.ts +15 -0
  335. package/src/parquetjs/utils/read-utils.ts +26 -1
  336. package/src/unbundled.ts +14 -0
package/LICENSE CHANGED
@@ -37,7 +37,7 @@ License reproduced above.
37
37
  Copyright (c) 2016 Axel Rauschmayer
38
38
 
39
39
  loaders.gl includes certain files from Cesium (https://github.com/CesiumGS/cesium)
40
- under the Apache 2.0 License, including files in modules/3d-tiles and modules/math.
40
+ under the Apache 2.0 License, including files in modules/3d-tiles.
41
41
 
42
42
  Copyright 2011-2018 CesiumJS Contributors
43
43
 
package/dist/bundled.d.ts CHANGED
@@ -3,7 +3,7 @@ export type { GeoParquetLoaderOptions } from "./geoparquet-loader.js";
3
3
  export { ParquetLoaderWithParser as ParquetLoader } from "./parquet-loader.js";
4
4
  export { GeoParquetLoaderWithParser as GeoParquetLoader } from "./geoparquet-loader-with-parser.js";
5
5
  export { ParquetJSLoaderWithParser as ParquetJSLoader } from "./parquet-js-loader.js";
6
- export { ParquetSourceLoader, ParquetSource, type ParquetSourceLoaderOptions, type ParquetSourceReadOptions, type ParquetSourceMetadata, type ParquetRowGroupMetadata, type ParquetColumnChunkMetadata, type ParquetBatchMetadata, type ParquetSourceBatch } from "./parquet-source-loader.js";
6
+ export { ParquetSourceLoader, ParquetSource, type ParquetDeferredPageFilter, type ParquetEncodedColumnChunk, type ParquetEncodedPage, type ParquetEncodedPageBatch, type ParquetEncodedPageReadOptions, type ParquetEncodedPageSection, type ParquetPageCompressionState, type ParquetSourceLoaderOptions, type ParquetSourceReadOptions, type ParquetSourceMetadata, type ParquetRowGroupMetadata, type ParquetSortingColumn, type ParquetColumnChunkMetadata, type ParquetGeospatialBoundingBox, type ParquetGeospatialStatistics, type ParquetBatchMetadata, type ParquetSourceBatch } from "./parquet-source-loader.js";
7
7
  export { ParquetDatasetSource, type ParquetDatasetBatch, type ParquetDatasetFile, type ParquetDatasetFileProvider, type ParquetDatasetReadOptions, type ParquetDatasetSourceOptions, type ParquetDatasetTelemetry } from "./parquet-dataset-source.js";
8
8
  export { PARQUET_SOURCE_CAPABILITIES, type ParquetSourceCapabilities } from "./parquet-source-capabilities.js";
9
9
  //# sourceMappingURL=bundled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bundled.d.ts","sourceRoot":"","sources":["../src/bundled.ts"],"names":[],"mappings":"AAIA,YAAY,EAAC,oBAAoB,EAAC,kCAA+B;AACjE,YAAY,EAAC,uBAAuB,EAAC,+BAA4B;AACjE,OAAO,EAAC,uBAAuB,IAAI,aAAa,EAAC,4BAAyB;AAC1E,OAAO,EAAC,0BAA0B,IAAI,gBAAgB,EAAC,2CAAwC;AAC/F,OAAO,EAAC,yBAAyB,IAAI,eAAe,EAAC,+BAA4B;AACjF,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACxB,mCAAgC;AACjC,OAAO,EACL,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC7B,oCAAiC;AAClC,OAAO,EACL,2BAA2B,EAC3B,KAAK,yBAAyB,EAC/B,yCAAsC"}
1
+ {"version":3,"file":"bundled.d.ts","sourceRoot":"","sources":["../src/bundled.ts"],"names":[],"mappings":"AAIA,YAAY,EAAC,oBAAoB,EAAC,kCAA+B;AACjE,YAAY,EAAC,uBAAuB,EAAC,+BAA4B;AACjE,OAAO,EAAC,uBAAuB,IAAI,aAAa,EAAC,4BAAyB;AAC1E,OAAO,EAAC,0BAA0B,IAAI,gBAAgB,EAAC,2CAAwC;AAC/F,OAAO,EAAC,yBAAyB,IAAI,eAAe,EAAC,+BAA4B;AACjF,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACxB,mCAAgC;AACjC,OAAO,EACL,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC7B,oCAAiC;AAClC,OAAO,EACL,2BAA2B,EAC3B,KAAK,yBAAyB,EAC/B,yCAAsC"}
@@ -1 +1 @@
1
- {"version":3,"file":"bundled.js","sourceRoot":"","sources":["../src/bundled.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,uBAAuB,IAAI,aAAa,EAAC,4BAAyB;AAC1E,OAAO,EAAC,0BAA0B,IAAI,gBAAgB,EAAC,2CAAwC;AAC/F,OAAO,EAAC,yBAAyB,IAAI,eAAe,EAAC,+BAA4B;AACjF,OAAO,EACL,mBAAmB,EACnB,aAAa,EAQd,mCAAgC;AACjC,OAAO,EACL,oBAAoB,EAOrB,oCAAiC;AAClC,OAAO,EACL,2BAA2B,EAE5B,yCAAsC"}
1
+ {"version":3,"file":"bundled.js","sourceRoot":"","sources":["../src/bundled.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAIpC,OAAO,EAAC,uBAAuB,IAAI,aAAa,EAAC,4BAAyB;AAC1E,OAAO,EAAC,0BAA0B,IAAI,gBAAgB,EAAC,2CAAwC;AAC/F,OAAO,EAAC,yBAAyB,IAAI,eAAe,EAAC,+BAA4B;AACjF,OAAO,EACL,mBAAmB,EACnB,aAAa,EAkBd,mCAAgC;AACjC,OAAO,EACL,oBAAoB,EAOrB,oCAAiC;AAClC,OAAO,EACL,2BAA2B,EAE5B,yCAAsC"}
@@ -0,0 +1,9 @@
1
+ /** Metadata describing the Delta Lake transaction-log format. */
2
+ export declare const DeltaFormat: {
3
+ name: string;
4
+ id: string;
5
+ module: string;
6
+ extensions: string[];
7
+ mimeTypes: string[];
8
+ };
9
+ //# sourceMappingURL=delta-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delta-format.d.ts","sourceRoot":"","sources":["../src/delta-format.ts"],"names":[],"mappings":"AAIA,iEAAiE;AACjE,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC"}
@@ -0,0 +1,12 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ /** Metadata describing the Delta Lake transaction-log format. */
5
+ export const DeltaFormat = {
6
+ name: 'Delta Lake',
7
+ id: 'delta',
8
+ module: 'parquet',
9
+ extensions: ['json', 'checkpoint.parquet'],
10
+ mimeTypes: ['application/json']
11
+ };
12
+ //# sourceMappingURL=delta-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delta-format.js","sourceRoot":"","sources":["../src/delta-format.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,iEAAiE;AACjE,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,OAAO;IACX,MAAM,EAAE,SAAS;IACjB,UAAU,EAAE,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAC1C,SAAS,EAAE,CAAC,kBAAkB,CAAC;CAChC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { SourceLoader } from '@loaders.gl/loader-utils';
2
+ import type { DeltaSourceOptions } from "./delta-types.js";
3
+ import type { DeltaTableSource } from "./delta-source.js";
4
+ /** Metadata-only Delta source loader options. */
5
+ export type DeltaSourceLoaderOptions = DeltaSourceOptions;
6
+ /** Loads the parser-bearing Delta source implementation on demand. */
7
+ declare function preloadDeltaSourceLoader(): Promise<SourceLoader<DeltaTableSource>>;
8
+ /** Metadata-only Delta source loader; runtime code is available through `preload()`. */
9
+ export declare const DeltaSourceLoader: {
10
+ readonly dataType: DeltaTableSource;
11
+ readonly batchType: never;
12
+ readonly name: "DeltaSourceLoader";
13
+ readonly version: any;
14
+ readonly type: "delta";
15
+ readonly fromUrl: true;
16
+ readonly fromBlob: true;
17
+ readonly options: {};
18
+ readonly defaultOptions: {};
19
+ readonly testURL: (url: string) => boolean;
20
+ readonly preload: typeof preloadDeltaSourceLoader;
21
+ readonly id: string;
22
+ readonly module: string;
23
+ readonly extensions: string[];
24
+ readonly mimeTypes: string[];
25
+ };
26
+ export {};
27
+ //# sourceMappingURL=delta-source-loader-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delta-source-loader-types.d.ts","sourceRoot":"","sources":["../src/delta-source-loader-types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAE3D,OAAO,KAAK,EAAC,kBAAkB,EAAC,yBAAsB;AACtD,OAAO,KAAK,EAAC,gBAAgB,EAAC,0BAAuB;AAMrD,iDAAiD;AACjD,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAE1D,sEAAsE;AACtE,iBAAe,wBAAwB,IAAI,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAGjF;AAED,wFAAwF;AACxF,eAAO,MAAM,iBAAiB;uBAEC,gBAAgB;wBAC1B,KAAK;;;;;;;;4BAQT,MAAM,KAAG,OAAO;;;;;;CAKhC,CAAC"}
@@ -0,0 +1,28 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ import { DeltaFormat } from "./delta-format.js";
5
+ // __VERSION__ is injected by babel-plugin-version-inline
6
+ // @ts-ignore TS2304: Cannot find name '__VERSION__'.
7
+ const VERSION = typeof "5.0.0-alpha.4" !== 'undefined' ? "5.0.0-alpha.4" : 'latest';
8
+ /** Loads the parser-bearing Delta source implementation on demand. */
9
+ async function preloadDeltaSourceLoader() {
10
+ const { DeltaSourceLoaderWithParser } = await import('@loaders.gl/parquet/delta-source');
11
+ return DeltaSourceLoaderWithParser;
12
+ }
13
+ /** Metadata-only Delta source loader; runtime code is available through `preload()`. */
14
+ export const DeltaSourceLoader = {
15
+ ...DeltaFormat,
16
+ dataType: null,
17
+ batchType: null,
18
+ name: 'DeltaSourceLoader',
19
+ version: VERSION,
20
+ type: 'delta',
21
+ fromUrl: true,
22
+ fromBlob: true,
23
+ options: {},
24
+ defaultOptions: {},
25
+ testURL: (url) => /\/_delta_log\/(?:\d{20}\.json|_last_checkpoint)(?:$|[?#])/i.test(url),
26
+ preload: preloadDeltaSourceLoader
27
+ };
28
+ //# sourceMappingURL=delta-source-loader-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delta-source-loader-types.js","sourceRoot":"","sources":["../src/delta-source-loader-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAGpC,OAAO,EAAC,WAAW,EAAC,0BAAuB;AAI3C,yDAAyD;AACzD,qDAAqD;AACrD,MAAM,OAAO,GAAG,sBAAkB,KAAK,WAAW,CAAC,CAAC,iBAAa,CAAC,CAAC,QAAQ,CAAC;AAK5E,sEAAsE;AACtE,KAAK,UAAU,wBAAwB;IACrC,MAAM,EAAC,2BAA2B,EAAC,GAAG,MAAM,MAAM,CAAC,kCAAkC,CAAC,CAAC;IACvF,OAAO,2BAA2B,CAAC;AACrC,CAAC;AAED,wFAAwF;AACxF,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,GAAG,WAAW;IACd,QAAQ,EAAE,IAAmC;IAC7C,SAAS,EAAE,IAAa;IACxB,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,EAAE;IACX,cAAc,EAAE,EAAE;IAClB,OAAO,EAAE,CAAC,GAAW,EAAW,EAAE,CAChC,4DAA4D,CAAC,IAAI,CAAC,GAAG,CAAC;IACxE,OAAO,EAAE,wBAAwB;CAGlC,CAAC"}
@@ -0,0 +1,48 @@
1
+ import type { ScanFragment, ScanFragmentProvider, ScanQueryMetadata, ScanQueryMetadataOptions, TableScanSource } from '@loaders.gl/loader-utils';
2
+ import { DataSource } from '@loaders.gl/loader-utils';
3
+ import type { DeltaScanOptions, DeltaSourceOptions } from "./delta-types.js";
4
+ import type { ParquetDatasetBatch, ParquetDatasetExplain, ParquetPredicate } from "./parquet-source-types.js";
5
+ /** Lightweight Delta Lake snapshot source backed by a newline-delimited commit log. */
6
+ export declare class DeltaTableSource extends DataSource<string | Blob, DeltaSourceOptions> implements TableScanSource<ParquetDatasetBatch, ParquetPredicate>, ScanFragmentProvider<ParquetPredicate> {
7
+ private readonly actionsPromises;
8
+ /** Creates a source from a Delta commit JSON URL or Blob. */
9
+ constructor(data: string | Blob, options?: DeltaSourceOptions);
10
+ /** Discovers the active Parquet files represented by the commit log. */
11
+ getScanFragments(options?: DeltaScanOptions): Promise<readonly ScanFragment[]>;
12
+ /** Discovers schema and snapshot statistics without decoding all rows. */
13
+ getQueryMetadata(options?: ScanQueryMetadataOptions): Promise<ScanQueryMetadata>;
14
+ /** Explains the Delta snapshot and delegated Parquet physical plans. */
15
+ getScanPlan(options?: DeltaScanOptions): Promise<ParquetDatasetExplain>;
16
+ /** Reads the active snapshot through the shared Parquet dataset executor. */
17
+ read(options?: DeltaScanOptions): AsyncIterable<ParquetDatasetBatch>;
18
+ /** Alias for `read()` used by scan-aware consumers. */
19
+ scan(options?: DeltaScanOptions): AsyncIterable<ParquetDatasetBatch>;
20
+ private getActions;
21
+ /** Returns the configured or URL-derived snapshot version, when available. */
22
+ private getSnapshotVersion;
23
+ /** Reads one commit log or replays all commits through the requested version. */
24
+ private loadActions;
25
+ private readResponse;
26
+ private createDataset;
27
+ private createDatasetFromOptions;
28
+ private resolveDataFile;
29
+ }
30
+ /** Parser-bearing Delta source loader exposed through the explicit source subpath. */
31
+ export declare const DeltaSourceLoaderWithParser: {
32
+ readonly dataType: DeltaTableSource;
33
+ readonly batchType: never;
34
+ readonly name: "DeltaSourceLoader";
35
+ readonly version: any;
36
+ readonly type: "delta";
37
+ readonly fromUrl: true;
38
+ readonly fromBlob: true;
39
+ readonly options: {};
40
+ readonly defaultOptions: {};
41
+ readonly testURL: (url: string) => boolean;
42
+ readonly createDataSource: (data: string | Blob, options?: DeltaSourceOptions) => DeltaTableSource;
43
+ readonly id: string;
44
+ readonly module: string;
45
+ readonly extensions: string[];
46
+ readonly mimeTypes: string[];
47
+ };
48
+ //# sourceMappingURL=delta-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delta-source.d.ts","sourceRoot":"","sources":["../src/delta-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EAEhB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAA0B,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAG7E,OAAO,KAAK,EAAc,gBAAgB,EAAE,kBAAkB,EAAC,yBAAsB;AACrF,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EACjB,kCAA+B;AAOhC,uFAAuF;AACvF,qBAAa,gBACX,SAAQ,UAAU,CAAC,MAAM,GAAG,IAAI,EAAE,kBAAkB,CACpD,YACE,eAAe,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,EACtD,oBAAoB,CAAC,gBAAgB,CAAC;IAExC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsD;IAEtF,6DAA6D;gBACjD,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,GAAE,kBAAuB;IAIjE,wEAAwE;IAClE,gBAAgB,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;IAiBxF,0EAA0E;IACpE,gBAAgB,CAAC,OAAO,GAAE,wBAA6B,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwB1F,wEAAwE;IAClE,WAAW,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIjF,6EAA6E;IAC7E,IAAI,CAAC,OAAO,GAAE,gBAAqB,GAAG,aAAa,CAAC,mBAAmB,CAAC;IAIxE,uDAAuD;IACvD,IAAI,CAAC,OAAO,GAAE,gBAAqB,GAAG,aAAa,CAAC,mBAAmB,CAAC;YAI1D,UAAU;IAcxB,8EAA8E;IAC9E,OAAO,CAAC,kBAAkB;IAa1B,iFAAiF;YACnE,WAAW;YAoCX,YAAY;IAM1B,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,wBAAwB;IAchC,OAAO,CAAC,eAAe;CAQxB;AAED,sFAAsF;AACtF,eAAO,MAAM,2BAA2B;uBAET,gBAAgB;wBAC1B,KAAK;;;;;;;;4BAQT,MAAM,KAAG,OAAO;sCAEN,MAAM,GAAG,IAAI,YAAW,kBAAkB,KAAQ,gBAAgB;;;;;CAE1C,CAAC"}
@@ -0,0 +1,222 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ import { createScanQueryMetadata, DataSource } from '@loaders.gl/loader-utils';
5
+ import { ParquetDatasetSource } from "./parquet-dataset-source.js";
6
+ import { PARQUET_TABLE_QUERY_CAPABILITIES } from "./parquet-source-capabilities.js";
7
+ import { DeltaFormat } from "./delta-format.js";
8
+ // __VERSION__ is injected by babel-plugin-version-inline
9
+ // @ts-ignore TS2304: Cannot find name '__VERSION__'.
10
+ const VERSION = typeof "5.0.0-alpha.4" !== 'undefined' ? "5.0.0-alpha.4" : 'latest';
11
+ /** Lightweight Delta Lake snapshot source backed by a newline-delimited commit log. */
12
+ export class DeltaTableSource extends DataSource {
13
+ actionsPromises = new Map();
14
+ /** Creates a source from a Delta commit JSON URL or Blob. */
15
+ constructor(data, options = {}) {
16
+ super(data, options);
17
+ }
18
+ /** Discovers the active Parquet files represented by the commit log. */
19
+ async getScanFragments(options = {}) {
20
+ const actions = await this.getActions(options.version, options.signal);
21
+ const activeFiles = selectActiveDeltaFiles(actions);
22
+ return Object.freeze(activeFiles.map(file => Object.freeze({
23
+ id: file.path,
24
+ uri: this.resolveDataFile(file.path),
25
+ partitionValues: file.partitionValues,
26
+ byteLength: file.size,
27
+ rowCount: getDeltaRecordCount(file.stats),
28
+ metadata: { stats: file.stats }
29
+ })));
30
+ }
31
+ /** Discovers schema and snapshot statistics without decoding all rows. */
32
+ async getQueryMetadata(options = {}) {
33
+ const fragments = await this.getScanFragments(options);
34
+ if (!fragments.length) {
35
+ throw new Error('Delta snapshot contains no active Parquet files');
36
+ }
37
+ const dataset = this.createDataset(fragments);
38
+ const schema = await dataset.getSchema({ signal: options.signal });
39
+ return createScanQueryMetadata({
40
+ sourceType: 'delta',
41
+ queryType: 'table',
42
+ execution: { status: 'supported', method: 'read' },
43
+ name: this.data instanceof Blob ? undefined : this.data,
44
+ schema,
45
+ capabilities: { table: PARQUET_TABLE_QUERY_CAPABILITIES },
46
+ statistics: {
47
+ rowCount: fragments.reduce((total, fragment) => total + Number(fragment.rowCount || 0), 0),
48
+ byteLength: fragments.reduce((total, fragment) => total + Number(fragment.byteLength || 0), 0)
49
+ }
50
+ });
51
+ }
52
+ /** Explains the Delta snapshot and delegated Parquet physical plans. */
53
+ async getScanPlan(options = {}) {
54
+ return this.createDataset(await this.getScanFragments(options)).getScanPlan(options);
55
+ }
56
+ /** Reads the active snapshot through the shared Parquet dataset executor. */
57
+ read(options = {}) {
58
+ return this.createDatasetFromOptions(options).read(options);
59
+ }
60
+ /** Alias for `read()` used by scan-aware consumers. */
61
+ scan(options = {}) {
62
+ return this.read(options);
63
+ }
64
+ async getActions(requestedVersion, signal) {
65
+ const version = this.getSnapshotVersion(requestedVersion);
66
+ const cacheKey = version === undefined ? 'single-commit' : String(version);
67
+ let actionsPromise = this.actionsPromises.get(cacheKey);
68
+ if (!actionsPromise) {
69
+ actionsPromise = this.loadActions(version, signal);
70
+ this.actionsPromises.set(cacheKey, actionsPromise);
71
+ }
72
+ return actionsPromise;
73
+ }
74
+ /** Returns the configured or URL-derived snapshot version, when available. */
75
+ getSnapshotVersion(version) {
76
+ const selectedVersion = version ?? this.options.delta?.version;
77
+ if (selectedVersion !== undefined) {
78
+ if (!Number.isSafeInteger(selectedVersion) || selectedVersion < 0) {
79
+ throw new Error('Delta snapshot version must be a non-negative safe integer');
80
+ }
81
+ return selectedVersion;
82
+ }
83
+ if (typeof this.data !== 'string')
84
+ return undefined;
85
+ const match = /\/_delta_log\/(\d{20})\.json(?:$|[?#])/i.exec(this.data);
86
+ return match ? Number(match[1]) : undefined;
87
+ }
88
+ /** Reads one commit log or replays all commits through the requested version. */
89
+ async loadActions(version, signal) {
90
+ if (typeof this.data !== 'string' || version === undefined) {
91
+ const text = typeof this.data === 'string'
92
+ ? await this.readResponse(await this.fetch(this.url, {
93
+ headers: this.options.delta?.headers,
94
+ signal
95
+ }))
96
+ : await this.data.text();
97
+ const actions = parseDeltaActions(text);
98
+ validateDeltaActions(actions);
99
+ return actions;
100
+ }
101
+ const tableRoot = this.data.replace(/\/_delta_log\/[^/?#]+(?:[?#].*)?$/i, '');
102
+ const actions = [];
103
+ for (let currentVersion = 0; currentVersion <= version; currentVersion++) {
104
+ const commitURL = `${tableRoot}/_delta_log/${String(currentVersion).padStart(20, '0')}.json`;
105
+ const text = await this.readResponse(await this.fetch(commitURL, {
106
+ headers: this.options.delta?.headers,
107
+ signal
108
+ }));
109
+ actions.push(...parseDeltaActions(text));
110
+ }
111
+ const replayedActions = Object.freeze(actions);
112
+ validateDeltaActions(replayedActions);
113
+ return replayedActions;
114
+ }
115
+ async readResponse(response) {
116
+ if (!response.ok)
117
+ throw new Error(`Delta commit log request failed with status ${response.status}`);
118
+ return response.text();
119
+ }
120
+ createDataset(fragments) {
121
+ return new ParquetDatasetSource(fragments.map(fragment => ({
122
+ data: fragment.uri,
123
+ id: fragment.id,
124
+ partitions: fragment.partitionValues,
125
+ metadata: fragment.metadata
126
+ })), this.options);
127
+ }
128
+ createDatasetFromOptions(options) {
129
+ return new ParquetDatasetSource(() => this.getScanFragments(options).then(fragments => fragments.map(fragment => ({
130
+ data: fragment.uri,
131
+ id: fragment.id,
132
+ partitions: fragment.partitionValues
133
+ }))), this.options);
134
+ }
135
+ resolveDataFile(path) {
136
+ if (this.options.delta?.baseUrl)
137
+ return new URL(path, this.options.delta.baseUrl).toString();
138
+ if (typeof this.data === 'string') {
139
+ const tableRoot = this.data.replace(/\/_delta_log\/[^/]*$/i, '/');
140
+ return new URL(path, tableRoot).toString();
141
+ }
142
+ return path;
143
+ }
144
+ }
145
+ /** Parser-bearing Delta source loader exposed through the explicit source subpath. */
146
+ export const DeltaSourceLoaderWithParser = {
147
+ ...DeltaFormat,
148
+ dataType: null,
149
+ batchType: null,
150
+ name: 'DeltaSourceLoader',
151
+ version: VERSION,
152
+ type: 'delta',
153
+ fromUrl: true,
154
+ fromBlob: true,
155
+ options: {},
156
+ defaultOptions: {},
157
+ testURL: (url) => /\/_delta_log\/(?:\d{20}\.json|_last_checkpoint)(?:$|[?#])/i.test(url),
158
+ createDataSource: (data, options = {}) => new DeltaTableSource(data, options)
159
+ };
160
+ /** Extracts Delta's optional `numRecords` statistic from an add action. */
161
+ function getDeltaRecordCount(stats) {
162
+ const parsed = typeof stats === 'string' ? parseDeltaStats(stats) : stats;
163
+ const value = parsed?.numRecords;
164
+ return typeof value === 'number' && Number.isSafeInteger(value) ? value : undefined;
165
+ }
166
+ function parseDeltaStats(stats) {
167
+ try {
168
+ const value = JSON.parse(stats);
169
+ return value && typeof value === 'object'
170
+ ? value
171
+ : undefined;
172
+ }
173
+ catch {
174
+ return undefined;
175
+ }
176
+ }
177
+ function selectActiveDeltaFiles(actions) {
178
+ const files = new Map();
179
+ for (const action of actions) {
180
+ if (action.add) {
181
+ files.set(action.add.path, action.add);
182
+ }
183
+ if (action.remove)
184
+ files.delete(action.remove.path);
185
+ }
186
+ const activeFiles = [...files.values()];
187
+ const deletionVectorFile = activeFiles.find(file => file.deletionVector !== undefined);
188
+ if (deletionVectorFile) {
189
+ throw new Error(`Delta deletion vectors are not supported for active file ${deletionVectorFile.path}`);
190
+ }
191
+ return activeFiles;
192
+ }
193
+ /** Parses a newline-delimited Delta commit into typed actions. */
194
+ function parseDeltaActions(text) {
195
+ return Object.freeze(text
196
+ .split(/\r?\n/)
197
+ .filter(line => line.trim().length > 0)
198
+ .map(line => JSON.parse(line)));
199
+ }
200
+ /** Rejects Delta protocol features that this Parquet snapshot adapter cannot interpret safely. */
201
+ function validateDeltaActions(actions) {
202
+ for (const action of actions) {
203
+ const protocol = action.protocol;
204
+ if (protocol) {
205
+ if (protocol.minReaderVersion !== undefined &&
206
+ (!Number.isSafeInteger(protocol.minReaderVersion) || protocol.minReaderVersion < 1)) {
207
+ throw new Error('Delta protocol has an invalid minReaderVersion');
208
+ }
209
+ if ((protocol.minReaderVersion ?? 1) > 1) {
210
+ throw new Error(`Delta reader protocol ${protocol.minReaderVersion} is not supported by this source`);
211
+ }
212
+ if (protocol.readerFeatures?.length) {
213
+ throw new Error(`Delta reader features are not supported: ${protocol.readerFeatures.join(', ')}`);
214
+ }
215
+ }
216
+ const columnMappingMode = action.metaData?.configuration?.['delta.columnMapping.mode'];
217
+ if (columnMappingMode && columnMappingMode !== 'none') {
218
+ throw new Error(`Delta column mapping mode "${columnMappingMode}" is not supported by this source`);
219
+ }
220
+ }
221
+ }
222
+ //# sourceMappingURL=delta-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delta-source.js","sourceRoot":"","sources":["../src/delta-source.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAUpC,OAAO,EAAC,uBAAuB,EAAE,UAAU,EAAC,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAC,oBAAoB,EAAC,oCAAiC;AAC9D,OAAO,EAAC,gCAAgC,EAAC,yCAAsC;AAO/E,OAAO,EAAC,WAAW,EAAC,0BAAuB;AAE3C,yDAAyD;AACzD,qDAAqD;AACrD,MAAM,OAAO,GAAG,sBAAkB,KAAK,WAAW,CAAC,CAAC,iBAAa,CAAC,CAAC,QAAQ,CAAC;AAE5E,uFAAuF;AACvF,MAAM,OAAO,gBACX,SAAQ,UAA6C;IAKpC,eAAe,GAAG,IAAI,GAAG,EAA2C,CAAC;IAEtF,6DAA6D;IAC7D,YAAY,IAAmB,EAAE,UAA8B,EAAE;QAC/D,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvB,CAAC;IAED,wEAAwE;IACxE,KAAK,CAAC,gBAAgB,CAAC,UAA4B,EAAE;QACnD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QACvE,MAAM,WAAW,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC,MAAM,CAClB,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACrB,MAAM,CAAC,MAAM,CAAC;YACZ,EAAE,EAAE,IAAI,CAAC,IAAI;YACb,GAAG,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;YACpC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,UAAU,EAAE,IAAI,CAAC,IAAI;YACrB,QAA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C,IAAI,CAAC,IAAI,CAAC,EAAE,CACjF,CAAC;YACJ,CAAC;QACH,CAAC;QAED,MAAM,iBAAiB,GAAG,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC,0BAA0B,CAAC,CAAC;QACvF,IAAI,iBAAiB,IAAI,iBAAiB,KAAK,MAAM,EAAE,CAAC;YACtD,MAAM,IAAI,KAAK,CACb,8BAA8B,iBAAiB,mCAAmC,CACnF,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,38 @@
1
+ import type { ParquetDatasetSourceOptions, ParquetDatasetReadOptions } from "./parquet-source-types.js";
2
+ /** One Delta Lake transaction action from a commit log or checkpoint projection. */
3
+ export type DeltaAction = Readonly<{
4
+ protocol?: Readonly<{
5
+ minReaderVersion?: number;
6
+ readerFeatures?: readonly string[];
7
+ }>;
8
+ metaData?: Readonly<{
9
+ configuration?: Readonly<Record<string, string | null>>;
10
+ }>;
11
+ add?: Readonly<{
12
+ path: string;
13
+ size?: number;
14
+ partitionValues?: Readonly<Record<string, string | null>>;
15
+ stats?: string | Readonly<Record<string, unknown>>;
16
+ /** Delta deletion-vector descriptor, which is not decoded by this source. */
17
+ deletionVector?: unknown;
18
+ }>;
19
+ remove?: Readonly<{
20
+ path: string;
21
+ }>;
22
+ }>;
23
+ /** Options for reading a Delta snapshot from its newline-delimited commit log. */
24
+ export type DeltaSourceOptions = ParquetDatasetSourceOptions & {
25
+ delta?: {
26
+ /** Snapshot version to replay when the source is a commit-log URL. */
27
+ version?: number;
28
+ /** Table root used to resolve relative Parquet add-file paths. */
29
+ baseUrl?: string;
30
+ /** Headers sent while reading commit-log files. */
31
+ headers?: HeadersInit;
32
+ };
33
+ };
34
+ /** Query options accepted by a Delta snapshot scan. */
35
+ export type DeltaScanOptions = ParquetDatasetReadOptions & {
36
+ version?: number;
37
+ };
38
+ //# sourceMappingURL=delta-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delta-types.d.ts","s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G,yBAAyB,GAAG;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ export {};
5
+ //# sourceMappingURL=delta-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delta-types.js","sourceRoot":"","sources":["../src/delta-types.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC"}
@@ -5,7 +5,7 @@ import { ParquetFormat } from "./parquet-format.js";
5
5
  import { PARQUET_LOADER_DEFAULT_OPTIONS } from "./parquet-loader-options.js";
6
6
  // __VERSION__ is injected by babel-plugin-version-inline
7
7
  // @ts-ignore TS2304: Cannot find name '__VERSION__'.
8
- const VERSION = typeof "5.0.0-alpha.2" !== 'undefined' ? "5.0.0-alpha.2" : 'latest';
8
+ const VERSION = typeof "5.0.0-alpha.4" !== 'undefined' ? "5.0.0-alpha.4" : 'latest';
9
9
  /** Preloads the parser-bearing GeoParquet loader implementation. */
10
10
  async function preloadGeoParquetLoader() {
11
11
  const { GeoParquetLoaderWithParser } = await import("./geoparquet-loader-with-parser.js");
@@ -0,0 +1,49 @@
1
+ import { IcebergTableSource } from "./iceberg-table-source.js";
2
+ import type { IcebergTableMetadata } from "./iceberg-types.js";
3
+ import type { RequestScheduler } from '@loaders.gl/loader-utils';
4
+ /** Configuration for the minimal Iceberg REST Catalog adapter. */
5
+ export type IcebergRestCatalogOptions = {
6
+ /** Catalog base URL, for example `https://catalog.example.com`. */
7
+ readonly endpoint: string;
8
+ /** Headers sent to catalog and metadata requests. */
9
+ readonly headers?: HeadersInit;
10
+ /** Fetch implementation, useful for browser auth and deterministic tests. */
11
+ readonly fetch?: (url: string, options?: RequestInit) => Promise<Response>;
12
+ /** Optional shared request gate for catalog metadata calls. */
13
+ readonly requestScheduler?: RequestScheduler;
14
+ };
15
+ /** Fully qualified Iceberg REST table identifier. */
16
+ export type IcebergRestTableIdentifier = {
17
+ /** Namespace components in catalog order. */
18
+ readonly namespace: readonly string[];
19
+ /** Table name within the namespace. */
20
+ readonly table: string;
21
+ };
22
+ /** A table source returned by the REST Catalog adapter. */
23
+ export type IcebergRestTable = {
24
+ /** Inline metadata returned by the catalog, when available. */
25
+ readonly metadata?: IcebergTableMetadata;
26
+ /** Metadata location returned by the catalog, when available. */
27
+ readonly metadataLocation?: string;
28
+ /** Read-only source that plans and scans the table. */
29
+ readonly source: IcebergTableSource;
30
+ };
31
+ /**
32
+ * Minimal read-only Iceberg REST Catalog client.
33
+ *
34
+ * This deliberately stops at table loading. Scan planning and file access remain in
35
+ * `IcebergTableSource`, so catalog authentication and table-format decoding stay separate.
36
+ */
37
+ export declare class IcebergRestCatalog {
38
+ private readonly options;
39
+ constructor(options: IcebergRestCatalogOptions);
40
+ /** Loads one table's metadata through the Iceberg REST Catalog `/v1` endpoint. */
41
+ loadTable(identifier: IcebergRestTableIdentifier, signal?: AbortSignal): Promise<IcebergRestTable>;
42
+ /** Fetches one catalog response through the optional shared request scheduler. */
43
+ private fetchJson;
44
+ /** Builds the standard REST Catalog table endpoint. */
45
+ private getTableUrl;
46
+ /** Carries catalog headers and fetch through to the metadata/data source. */
47
+ private getSourceOptions;
48
+ }
49
+ //# sourceMappingURL=iceberg-rest-catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iceberg-rest-catalog.d.ts","sourceRoot":"","sources":["../src/iceberg-rest-catalog.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAE1D,OAAO,KAAK,EAAC,oBAAoB,EAAC,2BAAwB;AAC1D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAE/D,kEAAkE;AAClE,MAAM,MAAM,yBAAyB,GAAG;IACtC,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3E,+DAA+D;IAC/D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CAC9C,CAAC;AAEF,qDAAqD;AACrD,MAAM,MAAM,0BAA0B,GAAG;IACvC,6CAA6C;IAC7C,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,uCAAuC;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,2DAA2D;AAC3D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IACzC,iEAAiE;IACjE,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,uDAAuD;IACvD,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;CACrC,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4B;gBAExC,OAAO,EAAE,yBAAyB;IAI9C,kFAAkF;IAC5E,SAAS,CACb,UAAU,EAAE,0BAA0B,EACtC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,gBAAgB,CAAC;IAoB5B,kFAAkF;YACpE,SAAS;IAgBvB,uDAAuD;IACvD,OAAO,CAAC,WAAW;IAKnB,6EAA6E;IAC7E,OAAO,CAAC,gBAAgB;CAOzB"}
@@ -0,0 +1,78 @@
1
+ // loaders.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright (c) vis.gl contributors
4
+ import { IcebergTableSource } from "./iceberg-table-source.js";
5
+ /**
6
+ * Minimal read-only Iceberg REST Catalog client.
7
+ *
8
+ * This deliberately stops at table loading. Scan planning and file access remain in
9
+ * `IcebergTableSource`, so catalog authentication and table-format decoding stay separate.
10
+ */
11
+ export class IcebergRestCatalog {
12
+ options;
13
+ constructor(options) {
14
+ this.options = options;
15
+ }
16
+ /** Loads one table's metadata through the Iceberg REST Catalog `/v1` endpoint. */
17
+ async loadTable(identifier, signal) {
18
+ const tableUrl = this.getTableUrl(identifier);
19
+ const response = await this.fetchJson(tableUrl, signal);
20
+ if (!response.ok) {
21
+ throw new Error(`Iceberg REST Catalog request failed: ${response.status} ${response.statusText}`);
22
+ }
23
+ const responseJson = (await response.json());
24
+ const metadataLocation = getString(responseJson['metadata-location']);
25
+ const metadata = isIcebergMetadata(responseJson.metadata) ? responseJson.metadata : undefined;
26
+ if (!metadataLocation && !metadata) {
27
+ throw new Error('Iceberg REST Catalog response did not include table metadata');
28
+ }
29
+ const source = metadata
30
+ ? new IcebergTableSource(createMetadataUrl(metadata), this.getSourceOptions())
31
+ : new IcebergTableSource(metadataLocation, this.getSourceOptions());
32
+ return { metadata, metadataLocation, source };
33
+ }
34
+ /** Fetches one catalog response through the optional shared request scheduler. */
35
+ async fetchJson(url, signal) {
36
+ const scheduler = this.options.requestScheduler;
37
+ const request = scheduler
38
+ ? await scheduler.scheduleRequest(url, () => (signal?.aborted ? -1 : 0))
39
+ : { done: () => { } };
40
+ if (!request)
41
+ throw new DOMException('The operation was aborted', 'AbortError');
42
+ try {
43
+ return await (this.options.fetch ?? fetch)(url, {
44
+ headers: this.options.headers,
45
+ signal
46
+ });
47
+ }
48
+ finally {
49
+ request.done();
50
+ }
51
+ }
52
+ /** Builds the standard REST Catalog table endpoint. */
53
+ getTableUrl(identifier) {
54
+ const namespace = identifier.namespace.map(encodeURIComponent).join('%1F');
55
+ return `${this.options.endpoint.replace(/\/$/, '')}/v1/namespaces/${namespace}/tables/${encodeURIComponent(identifier.table)}`;
56
+ }
57
+ /** Carries catalog headers and fetch through to the metadata/data source. */
58
+ getSourceOptions() {
59
+ const options = { iceberg: { headers: this.options.headers } };
60
+ if (this.options.fetch) {
61
+ options.core = { loadOptions: { core: { fetch: this.options.fetch } } };
62
+ }
63
+ return options;
64
+ }
65
+ }
66
+ function getString(value) {
67
+ return typeof value === 'string' && value.length > 0 ? value : undefined;
68
+ }
69
+ function isIcebergMetadata(value) {
70
+ if (!value || typeof value !== 'object')
71
+ return false;
72
+ const metadata = value;
73
+ return typeof metadata['format-version'] === 'number' && typeof metadata.location === 'string';
74
+ }
75
+ function createMetadataUrl(metadata) {
76
+ return `data:application/json,${encodeURIComponent(JSON.stringify(metadata))}`;
77
+ }
78
+ //# sourceMappingURL=iceberg-rest-catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iceberg-rest-catalog.js","sourceRoot":"","sources":["../src/iceberg-rest-catalog.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAEpC,OAAO,EAAC,kBAAkB,EAAC,kCAA+B;AAmC1D;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IACZ,OAAO,CAA4B;IAEpD,YAAY,OAAkC;QAC5C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,kFAAkF;IAClF,KAAK,CAAC,SAAS,CACb,UAAsC,EACtC,MAAoB;QAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC9C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACxD,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CACb,wCAAwC,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CACjF,CAAC;QACJ,CAAC;QACD,MAAM,YAAY,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAA4B,CAAC;QACxE,MAAM,gBAAgB,GAAG,SAAS,CAAC,YAAY,CAAC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