@loaders.gl/parquet 4.2.0-alpha.3 → 4.2.0-alpha.5

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 (265) hide show
  1. package/dist/index.cjs +269 -616
  2. package/dist/index.cjs.map +7 -0
  3. package/dist/index.d.ts +12 -12
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +6 -1
  6. package/dist/lib/arrow/convert-columns-to-row-group.js +1 -2
  7. package/dist/lib/arrow/convert-row-group-to-columns.js +8 -6
  8. package/dist/lib/arrow/convert-schema-from-parquet.d.ts +3 -3
  9. package/dist/lib/arrow/convert-schema-from-parquet.d.ts.map +1 -1
  10. package/dist/lib/arrow/convert-schema-from-parquet.js +71 -82
  11. package/dist/lib/arrow/convert-schema-to-parquet.d.ts +1 -1
  12. package/dist/lib/arrow/convert-schema-to-parquet.d.ts.map +1 -1
  13. package/dist/lib/arrow/convert-schema-to-parquet.js +65 -35
  14. package/dist/lib/constants.js +15 -2
  15. package/dist/lib/parsers/get-parquet-schema.d.ts +1 -1
  16. package/dist/lib/parsers/get-parquet-schema.d.ts.map +1 -1
  17. package/dist/lib/parsers/get-parquet-schema.js +9 -7
  18. package/dist/lib/parsers/parse-geoparquet.d.ts +1 -1
  19. package/dist/lib/parsers/parse-geoparquet.d.ts.map +1 -1
  20. package/dist/lib/parsers/parse-geoparquet.js +47 -45
  21. package/dist/lib/parsers/parse-parquet-to-columns.d.ts +1 -1
  22. package/dist/lib/parsers/parse-parquet-to-columns.d.ts.map +1 -1
  23. package/dist/lib/parsers/parse-parquet-to-columns.js +36 -25
  24. package/dist/lib/parsers/parse-parquet.d.ts +1 -1
  25. package/dist/lib/parsers/parse-parquet.d.ts.map +1 -1
  26. package/dist/lib/parsers/parse-parquet.js +62 -50
  27. package/dist/lib/wasm/encode-parquet-wasm.d.ts +1 -1
  28. package/dist/lib/wasm/encode-parquet-wasm.d.ts.map +1 -1
  29. package/dist/lib/wasm/encode-parquet-wasm.js +49 -12
  30. package/dist/lib/wasm/load-wasm.js +13 -10
  31. package/dist/lib/wasm/parse-parquet-wasm.d.ts +1 -1
  32. package/dist/lib/wasm/parse-parquet-wasm.d.ts.map +1 -1
  33. package/dist/lib/wasm/parse-parquet-wasm.js +19 -15
  34. package/dist/parquet-loader.d.ts +1 -1
  35. package/dist/parquet-loader.d.ts.map +1 -1
  36. package/dist/parquet-loader.js +78 -65
  37. package/dist/parquet-wasm-loader.js +25 -28
  38. package/dist/parquet-wasm-writer.js +19 -23
  39. package/dist/parquet-writer.js +17 -13
  40. package/dist/parquetjs/codecs/declare.d.ts +1 -1
  41. package/dist/parquetjs/codecs/declare.d.ts.map +1 -1
  42. package/dist/parquetjs/codecs/declare.js +0 -1
  43. package/dist/parquetjs/codecs/dictionary.js +4 -8
  44. package/dist/parquetjs/codecs/index.d.ts +3 -3
  45. package/dist/parquetjs/codecs/index.d.ts.map +1 -1
  46. package/dist/parquetjs/codecs/index.js +20 -17
  47. package/dist/parquetjs/codecs/plain.d.ts +2 -2
  48. package/dist/parquetjs/codecs/plain.d.ts.map +1 -1
  49. package/dist/parquetjs/codecs/plain.js +166 -162
  50. package/dist/parquetjs/codecs/rle.d.ts +2 -2
  51. package/dist/parquetjs/codecs/rle.d.ts.map +1 -1
  52. package/dist/parquetjs/codecs/rle.js +124 -105
  53. package/dist/parquetjs/compression.d.ts +1 -1
  54. package/dist/parquetjs/compression.d.ts.map +1 -1
  55. package/dist/parquetjs/compression.js +157 -43
  56. package/dist/parquetjs/encoder/parquet-encoder.d.ts +3 -3
  57. package/dist/parquetjs/encoder/parquet-encoder.d.ts.map +1 -1
  58. package/dist/parquetjs/encoder/parquet-encoder.js +406 -275
  59. package/dist/parquetjs/parquet-thrift/BoundaryOrder.js +12 -7
  60. package/dist/parquetjs/parquet-thrift/BsonType.js +31 -27
  61. package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts +1 -1
  62. package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts.map +1 -1
  63. package/dist/parquetjs/parquet-thrift/ColumnChunk.js +175 -166
  64. package/dist/parquetjs/parquet-thrift/ColumnIndex.d.ts +1 -1
  65. package/dist/parquetjs/parquet-thrift/ColumnIndex.d.ts.map +1 -1
  66. package/dist/parquetjs/parquet-thrift/ColumnIndex.js +178 -166
  67. package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts +6 -6
  68. package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts.map +1 -1
  69. package/dist/parquetjs/parquet-thrift/ColumnMetaData.js +359 -333
  70. package/dist/parquetjs/parquet-thrift/ColumnOrder.d.ts +1 -1
  71. package/dist/parquetjs/parquet-thrift/ColumnOrder.d.ts.map +1 -1
  72. package/dist/parquetjs/parquet-thrift/ColumnOrder.js +73 -68
  73. package/dist/parquetjs/parquet-thrift/CompressionCodec.js +17 -12
  74. package/dist/parquetjs/parquet-thrift/ConvertedType.js +31 -26
  75. package/dist/parquetjs/parquet-thrift/DataPageHeader.d.ts +2 -2
  76. package/dist/parquetjs/parquet-thrift/DataPageHeader.d.ts.map +1 -1
  77. package/dist/parquetjs/parquet-thrift/DataPageHeader.js +136 -124
  78. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.d.ts +2 -2
  79. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.d.ts.map +1 -1
  80. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js +198 -181
  81. package/dist/parquetjs/parquet-thrift/DateType.js +31 -27
  82. package/dist/parquetjs/parquet-thrift/DecimalType.js +76 -69
  83. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.d.ts +1 -1
  84. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.d.ts.map +1 -1
  85. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js +93 -86
  86. package/dist/parquetjs/parquet-thrift/Encoding.js +17 -12
  87. package/dist/parquetjs/parquet-thrift/EnumType.js +31 -27
  88. package/dist/parquetjs/parquet-thrift/FieldRepetitionType.js +12 -7
  89. package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts +4 -4
  90. package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts.map +1 -1
  91. package/dist/parquetjs/parquet-thrift/FileMetaData.js +217 -205
  92. package/dist/parquetjs/parquet-thrift/IndexPageHeader.js +31 -27
  93. package/dist/parquetjs/parquet-thrift/IntType.js +76 -69
  94. package/dist/parquetjs/parquet-thrift/JsonType.js +31 -27
  95. package/dist/parquetjs/parquet-thrift/KeyValue.js +73 -67
  96. package/dist/parquetjs/parquet-thrift/ListType.js +31 -27
  97. package/dist/parquetjs/parquet-thrift/LogicalType.d.ts +13 -13
  98. package/dist/parquetjs/parquet-thrift/LogicalType.d.ts.map +1 -1
  99. package/dist/parquetjs/parquet-thrift/LogicalType.js +325 -344
  100. package/dist/parquetjs/parquet-thrift/MapType.js +31 -27
  101. package/dist/parquetjs/parquet-thrift/MicroSeconds.js +31 -27
  102. package/dist/parquetjs/parquet-thrift/MilliSeconds.js +31 -27
  103. package/dist/parquetjs/parquet-thrift/NullType.js +31 -27
  104. package/dist/parquetjs/parquet-thrift/OffsetIndex.d.ts +1 -1
  105. package/dist/parquetjs/parquet-thrift/OffsetIndex.d.ts.map +1 -1
  106. package/dist/parquetjs/parquet-thrift/OffsetIndex.js +66 -60
  107. package/dist/parquetjs/parquet-thrift/PageEncodingStats.d.ts +2 -2
  108. package/dist/parquetjs/parquet-thrift/PageEncodingStats.d.ts.map +1 -1
  109. package/dist/parquetjs/parquet-thrift/PageEncodingStats.js +98 -88
  110. package/dist/parquetjs/parquet-thrift/PageHeader.d.ts +5 -5
  111. package/dist/parquetjs/parquet-thrift/PageHeader.d.ts.map +1 -1
  112. package/dist/parquetjs/parquet-thrift/PageHeader.js +185 -175
  113. package/dist/parquetjs/parquet-thrift/PageLocation.js +108 -96
  114. package/dist/parquetjs/parquet-thrift/PageType.js +13 -8
  115. package/dist/parquetjs/parquet-thrift/RowGroup.d.ts +2 -2
  116. package/dist/parquetjs/parquet-thrift/RowGroup.d.ts.map +1 -1
  117. package/dist/parquetjs/parquet-thrift/RowGroup.js +145 -133
  118. package/dist/parquetjs/parquet-thrift/SchemaElement.d.ts +4 -4
  119. package/dist/parquetjs/parquet-thrift/SchemaElement.d.ts.map +1 -1
  120. package/dist/parquetjs/parquet-thrift/SchemaElement.js +211 -205
  121. package/dist/parquetjs/parquet-thrift/SortingColumn.js +98 -88
  122. package/dist/parquetjs/parquet-thrift/Statistics.js +143 -137
  123. package/dist/parquetjs/parquet-thrift/StringType.js +31 -27
  124. package/dist/parquetjs/parquet-thrift/TimeType.d.ts +1 -1
  125. package/dist/parquetjs/parquet-thrift/TimeType.d.ts.map +1 -1
  126. package/dist/parquetjs/parquet-thrift/TimeType.js +76 -69
  127. package/dist/parquetjs/parquet-thrift/TimeUnit.d.ts +2 -2
  128. package/dist/parquetjs/parquet-thrift/TimeUnit.d.ts.map +1 -1
  129. package/dist/parquetjs/parquet-thrift/TimeUnit.js +94 -91
  130. package/dist/parquetjs/parquet-thrift/TimestampType.d.ts +1 -1
  131. package/dist/parquetjs/parquet-thrift/TimestampType.d.ts.map +1 -1
  132. package/dist/parquetjs/parquet-thrift/TimestampType.js +76 -69
  133. package/dist/parquetjs/parquet-thrift/Type.js +17 -12
  134. package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.js +31 -27
  135. package/dist/parquetjs/parquet-thrift/UUIDType.js +31 -27
  136. package/dist/parquetjs/parquet-thrift/index.d.ts +44 -44
  137. package/dist/parquetjs/parquet-thrift/index.d.ts.map +1 -1
  138. package/dist/parquetjs/parquet-thrift/index.js +6 -1
  139. package/dist/parquetjs/parser/decoders.d.ts +3 -3
  140. package/dist/parquetjs/parser/decoders.d.ts.map +1 -1
  141. package/dist/parquetjs/parser/decoders.js +306 -242
  142. package/dist/parquetjs/parser/parquet-reader.d.ts +3 -3
  143. package/dist/parquetjs/parser/parquet-reader.d.ts.map +1 -1
  144. package/dist/parquetjs/parser/parquet-reader.js +179 -157
  145. package/dist/parquetjs/schema/declare.d.ts +1 -1
  146. package/dist/parquetjs/schema/declare.d.ts.map +1 -1
  147. package/dist/parquetjs/schema/declare.js +6 -9
  148. package/dist/parquetjs/schema/schema.d.ts +1 -1
  149. package/dist/parquetjs/schema/schema.d.ts.map +1 -1
  150. package/dist/parquetjs/schema/schema.js +139 -120
  151. package/dist/parquetjs/schema/shred.d.ts +2 -2
  152. package/dist/parquetjs/schema/shred.d.ts.map +1 -1
  153. package/dist/parquetjs/schema/shred.js +301 -204
  154. package/dist/parquetjs/schema/types.d.ts +1 -1
  155. package/dist/parquetjs/schema/types.d.ts.map +1 -1
  156. package/dist/parquetjs/schema/types.js +328 -314
  157. package/dist/parquetjs/utils/file-utils.js +24 -23
  158. package/dist/parquetjs/utils/read-utils.d.ts +1 -1
  159. package/dist/parquetjs/utils/read-utils.d.ts.map +1 -1
  160. package/dist/parquetjs/utils/read-utils.js +79 -69
  161. package/dist/polyfills/buffer/buffer-polyfill.browser.js +8 -3
  162. package/dist/polyfills/buffer/buffer-polyfill.node.js +13 -8
  163. package/dist/polyfills/buffer/buffer.js +1750 -1367
  164. package/dist/polyfills/buffer/index.d.ts +3 -3
  165. package/dist/polyfills/buffer/index.d.ts.map +1 -1
  166. package/dist/polyfills/buffer/index.js +5 -1
  167. package/dist/polyfills/buffer/install-buffer-polyfill.js +2 -1
  168. package/dist/polyfills/util.js +4 -1
  169. package/dist/workers/parquet-worker.js +3 -1
  170. package/package.json +15 -13
  171. package/src/index.ts +1 -1
  172. package/src/lib/parsers/parse-parquet-to-columns.ts +1 -1
  173. package/src/lib/parsers/parse-parquet.ts +1 -1
  174. package/src/parquetjs/encoder/parquet-encoder.ts +2 -2
  175. package/src/parquetjs/parser/decoders.ts +2 -2
  176. package/src/parquetjs/parser/parquet-reader.ts +1 -1
  177. package/src/parquetjs/schema/schema.ts +1 -1
  178. package/src/parquetjs/utils/read-utils.ts +2 -2
  179. package/dist/index.js.map +0 -1
  180. package/dist/lib/arrow/convert-columns-to-row-group.js.map +0 -1
  181. package/dist/lib/arrow/convert-row-group-to-columns.js.map +0 -1
  182. package/dist/lib/arrow/convert-schema-from-parquet.js.map +0 -1
  183. package/dist/lib/arrow/convert-schema-to-parquet.js.map +0 -1
  184. package/dist/lib/constants.js.map +0 -1
  185. package/dist/lib/parsers/get-parquet-schema.js.map +0 -1
  186. package/dist/lib/parsers/parse-geoparquet.js.map +0 -1
  187. package/dist/lib/parsers/parse-parquet-to-columns.js.map +0 -1
  188. package/dist/lib/parsers/parse-parquet.js.map +0 -1
  189. package/dist/lib/wasm/encode-parquet-wasm.js.map +0 -1
  190. package/dist/lib/wasm/load-wasm.js.map +0 -1
  191. package/dist/lib/wasm/parse-parquet-wasm.js.map +0 -1
  192. package/dist/lib/wip/convert-schema-deep.java.disabled +0 -910
  193. package/dist/lib/wip/convert-schema-deep.rs.disabled +0 -976
  194. package/dist/parquet-loader.js.map +0 -1
  195. package/dist/parquet-wasm-loader.js.map +0 -1
  196. package/dist/parquet-wasm-writer.js.map +0 -1
  197. package/dist/parquet-writer.js.map +0 -1
  198. package/dist/parquetjs/LICENSE +0 -20
  199. package/dist/parquetjs/codecs/declare.js.map +0 -1
  200. package/dist/parquetjs/codecs/dictionary.js.map +0 -1
  201. package/dist/parquetjs/codecs/index.js.map +0 -1
  202. package/dist/parquetjs/codecs/plain.js.map +0 -1
  203. package/dist/parquetjs/codecs/rle.js.map +0 -1
  204. package/dist/parquetjs/compression.js.map +0 -1
  205. package/dist/parquetjs/encoder/parquet-encoder.js.map +0 -1
  206. package/dist/parquetjs/modules.d.ts +0 -21
  207. package/dist/parquetjs/parquet-thrift/BoundaryOrder.js.map +0 -1
  208. package/dist/parquetjs/parquet-thrift/BsonType.js.map +0 -1
  209. package/dist/parquetjs/parquet-thrift/ColumnChunk.js.map +0 -1
  210. package/dist/parquetjs/parquet-thrift/ColumnIndex.js.map +0 -1
  211. package/dist/parquetjs/parquet-thrift/ColumnMetaData.js.map +0 -1
  212. package/dist/parquetjs/parquet-thrift/ColumnOrder.js.map +0 -1
  213. package/dist/parquetjs/parquet-thrift/CompressionCodec.js.map +0 -1
  214. package/dist/parquetjs/parquet-thrift/ConvertedType.js.map +0 -1
  215. package/dist/parquetjs/parquet-thrift/DataPageHeader.js.map +0 -1
  216. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js.map +0 -1
  217. package/dist/parquetjs/parquet-thrift/DateType.js.map +0 -1
  218. package/dist/parquetjs/parquet-thrift/DecimalType.js.map +0 -1
  219. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js.map +0 -1
  220. package/dist/parquetjs/parquet-thrift/Encoding.js.map +0 -1
  221. package/dist/parquetjs/parquet-thrift/EnumType.js.map +0 -1
  222. package/dist/parquetjs/parquet-thrift/FieldRepetitionType.js.map +0 -1
  223. package/dist/parquetjs/parquet-thrift/FileMetaData.js.map +0 -1
  224. package/dist/parquetjs/parquet-thrift/IndexPageHeader.js.map +0 -1
  225. package/dist/parquetjs/parquet-thrift/IntType.js.map +0 -1
  226. package/dist/parquetjs/parquet-thrift/JsonType.js.map +0 -1
  227. package/dist/parquetjs/parquet-thrift/KeyValue.js.map +0 -1
  228. package/dist/parquetjs/parquet-thrift/ListType.js.map +0 -1
  229. package/dist/parquetjs/parquet-thrift/LogicalType.js.map +0 -1
  230. package/dist/parquetjs/parquet-thrift/MapType.js.map +0 -1
  231. package/dist/parquetjs/parquet-thrift/MicroSeconds.js.map +0 -1
  232. package/dist/parquetjs/parquet-thrift/MilliSeconds.js.map +0 -1
  233. package/dist/parquetjs/parquet-thrift/NullType.js.map +0 -1
  234. package/dist/parquetjs/parquet-thrift/OffsetIndex.js.map +0 -1
  235. package/dist/parquetjs/parquet-thrift/PageEncodingStats.js.map +0 -1
  236. package/dist/parquetjs/parquet-thrift/PageHeader.js.map +0 -1
  237. package/dist/parquetjs/parquet-thrift/PageLocation.js.map +0 -1
  238. package/dist/parquetjs/parquet-thrift/PageType.js.map +0 -1
  239. package/dist/parquetjs/parquet-thrift/RowGroup.js.map +0 -1
  240. package/dist/parquetjs/parquet-thrift/SchemaElement.js.map +0 -1
  241. package/dist/parquetjs/parquet-thrift/SortingColumn.js.map +0 -1
  242. package/dist/parquetjs/parquet-thrift/Statistics.js.map +0 -1
  243. package/dist/parquetjs/parquet-thrift/StringType.js.map +0 -1
  244. package/dist/parquetjs/parquet-thrift/TimeType.js.map +0 -1
  245. package/dist/parquetjs/parquet-thrift/TimeUnit.js.map +0 -1
  246. package/dist/parquetjs/parquet-thrift/TimestampType.js.map +0 -1
  247. package/dist/parquetjs/parquet-thrift/Type.js.map +0 -1
  248. package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.js.map +0 -1
  249. package/dist/parquetjs/parquet-thrift/UUIDType.js.map +0 -1
  250. package/dist/parquetjs/parquet-thrift/index.js.map +0 -1
  251. package/dist/parquetjs/parser/decoders.js.map +0 -1
  252. package/dist/parquetjs/parser/parquet-reader.js.map +0 -1
  253. package/dist/parquetjs/schema/declare.js.map +0 -1
  254. package/dist/parquetjs/schema/schema.js.map +0 -1
  255. package/dist/parquetjs/schema/shred.js.map +0 -1
  256. package/dist/parquetjs/schema/types.js.map +0 -1
  257. package/dist/parquetjs/utils/file-utils.js.map +0 -1
  258. package/dist/parquetjs/utils/read-utils.js.map +0 -1
  259. package/dist/polyfills/buffer/buffer-polyfill.browser.js.map +0 -1
  260. package/dist/polyfills/buffer/buffer-polyfill.node.js.map +0 -1
  261. package/dist/polyfills/buffer/buffer.js.map +0 -1
  262. package/dist/polyfills/buffer/index.js.map +0 -1
  263. package/dist/polyfills/buffer/install-buffer-polyfill.js.map +0 -1
  264. package/dist/polyfills/util.js.map +0 -1
  265. package/dist/workers/parquet-worker.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
- // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
30
+ // dist/index.js
31
+ var dist_exports = {};
32
+ __export(dist_exports, {
33
33
  Buffer: () => Buffer3,
34
34
  BufferPolyfill: () => Buffer2,
35
35
  GeoParquetLoader: () => GeoParquetLoader,
@@ -50,17 +50,28 @@ __export(src_exports, {
50
50
  installBufferPolyfill: () => installBufferPolyfill,
51
51
  preloadCompressions: () => preloadCompressions
52
52
  });
53
- module.exports = __toCommonJS(src_exports);
53
+ module.exports = __toCommonJS(dist_exports);
54
54
 
55
- // src/polyfills/buffer/buffer.ts
55
+ // dist/polyfills/buffer/buffer.js
56
56
  var import_base64_js = __toESM(require("base64-js"), 1);
57
57
  var import_ieee754 = __toESM(require("ieee754"), 1);
58
58
  var kMaxLength = 2147483647;
59
59
  var INSPECT_MAX_BYTES = 50;
60
- var _Buffer = class extends Uint8Array {
60
+ var Buffer2 = class extends Uint8Array {
61
+ // length: number; inherited
62
+ get parent() {
63
+ if (!Buffer2.isBuffer(this))
64
+ return void 0;
65
+ return this.buffer;
66
+ }
67
+ get offset() {
68
+ if (!Buffer2.isBuffer(this))
69
+ return void 0;
70
+ return this.byteOffset;
71
+ }
61
72
  constructor(arg, encodingOrOffset, length) {
62
73
  if (typeof arg !== "number") {
63
- return _Buffer.from(arg, encodingOrOffset, length);
74
+ return Buffer2.from(arg, encodingOrOffset, length);
64
75
  }
65
76
  const size = arg;
66
77
  if (size > kMaxLength) {
@@ -70,28 +81,9 @@ var _Buffer = class extends Uint8Array {
70
81
  throw new TypeError('The "string" argument must be of type string. Received type number');
71
82
  }
72
83
  super(size < 0 ? 0 : checked(size) | 0);
73
- /** This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
74
- * to detect a Buffer instance. It's not possible to use `instanceof Buffer`
75
- * reliably in a browserify context because there could be multiple different
76
- * copies of the 'buffer' package in use. This method works even for Buffer
77
- * instances that were created from another copy of the `buffer` package.
78
- * @see: https://github.com/feross/buffer/issues/154
79
- */
80
84
  this._isBuffer = true;
81
85
  return;
82
86
  }
83
- // not used by this implementation
84
- // length: number; inherited
85
- get parent() {
86
- if (!_Buffer.isBuffer(this))
87
- return void 0;
88
- return this.buffer;
89
- }
90
- get offset() {
91
- if (!_Buffer.isBuffer(this))
92
- return void 0;
93
- return this.byteOffset;
94
- }
95
87
  static from(value, encodingOrOffset, length) {
96
88
  if (typeof value === "string") {
97
89
  return fromString(value, encodingOrOffset);
@@ -100,9 +92,7 @@ var _Buffer = class extends Uint8Array {
100
92
  return fromArrayView(value);
101
93
  }
102
94
  if (value == null) {
103
- throw new TypeError(
104
- `${"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "}${typeof value}`
105
- );
95
+ throw new TypeError(`${"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "}${typeof value}`);
106
96
  }
107
97
  if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
108
98
  return fromArrayBuffer(value, encodingOrOffset, length);
@@ -115,17 +105,15 @@ var _Buffer = class extends Uint8Array {
115
105
  }
116
106
  const valueOf = value.valueOf && value.valueOf();
117
107
  if (valueOf != null && valueOf !== value) {
118
- return _Buffer.from(valueOf, encodingOrOffset, length);
108
+ return Buffer2.from(valueOf, encodingOrOffset, length);
119
109
  }
120
110
  const b = fromObject(value);
121
111
  if (b)
122
112
  return b;
123
113
  if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
124
- return _Buffer.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
114
+ return Buffer2.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
125
115
  }
126
- throw new TypeError(
127
- `${"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "}${typeof value}`
128
- );
116
+ throw new TypeError(`${"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "}${typeof value}`);
129
117
  }
130
118
  /**
131
119
  * Returns true if {obj} is a Buffer
@@ -133,17 +121,17 @@ var _Buffer = class extends Uint8Array {
133
121
  * @param obj object to test.
134
122
  */
135
123
  static isBuffer(b) {
136
- return b != null && b._isBuffer === true && b !== _Buffer.prototype;
124
+ return b != null && b._isBuffer === true && b !== Buffer2.prototype;
137
125
  }
138
126
  /**
139
127
  * The same as buf1.compare(buf2).
140
128
  */
141
129
  static compare(a, b) {
142
- if (!_Buffer.isBuffer(a) && isInstance(a, Uint8Array))
143
- a = _Buffer.from(a, a.offset, a.byteLength);
144
- if (!_Buffer.isBuffer(b) && isInstance(b, Uint8Array))
145
- b = _Buffer.from(b, b.offset, b.byteLength);
146
- if (!_Buffer.isBuffer(a) || !_Buffer.isBuffer(b)) {
130
+ if (!Buffer2.isBuffer(a) && isInstance(a, Uint8Array))
131
+ a = Buffer2.from(a, a.offset, a.byteLength);
132
+ if (!Buffer2.isBuffer(b) && isInstance(b, Uint8Array))
133
+ b = Buffer2.from(b, b.offset, b.byteLength);
134
+ if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) {
147
135
  throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
148
136
  }
149
137
  if (a === b)
@@ -203,7 +191,7 @@ var _Buffer = class extends Uint8Array {
203
191
  throw new TypeError('"list" argument must be an Array of Buffers');
204
192
  }
205
193
  if (list.length === 0) {
206
- return _Buffer.alloc(0);
194
+ return Buffer2.alloc(0);
207
195
  }
208
196
  let i;
209
197
  if (length === void 0) {
@@ -212,20 +200,20 @@ var _Buffer = class extends Uint8Array {
212
200
  length += list[i].length;
213
201
  }
214
202
  }
215
- const buffer = _Buffer.allocUnsafe(length);
203
+ const buffer = Buffer2.allocUnsafe(length);
216
204
  let pos = 0;
217
205
  for (i = 0; i < list.length; ++i) {
218
206
  let buf = list[i];
219
207
  if (isInstance(buf, Uint8Array)) {
220
208
  if (pos + buf.length > buffer.length) {
221
- if (!_Buffer.isBuffer(buf)) {
222
- buf = _Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
209
+ if (!Buffer2.isBuffer(buf)) {
210
+ buf = Buffer2.from(buf.buffer, buf.byteOffset, buf.byteLength);
223
211
  }
224
212
  buf.copy(buffer, pos);
225
213
  } else {
226
214
  Uint8Array.prototype.set.call(buffer, buf, pos);
227
215
  }
228
- } else if (!_Buffer.isBuffer(buf)) {
216
+ } else if (!Buffer2.isBuffer(buf)) {
229
217
  throw new TypeError('"list" argument must be an Array of Buffers');
230
218
  } else {
231
219
  buf.copy(buffer, pos);
@@ -253,7 +241,7 @@ var _Buffer = class extends Uint8Array {
253
241
  */
254
242
  static allocUnsafe(size) {
255
243
  assertSize(size);
256
- return new _Buffer(size);
244
+ return new Buffer2(size);
257
245
  }
258
246
  /**
259
247
  * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
@@ -643,22 +631,10 @@ var _Buffer = class extends Uint8Array {
643
631
  return offset + 4;
644
632
  }
645
633
  writeBigInt64LE(value, offset = 0) {
646
- return wrtBigUInt64LE(
647
- this,
648
- value,
649
- offset,
650
- -BigInt("0x8000000000000000"),
651
- BigInt("0x7fffffffffffffff")
652
- );
634
+ return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
653
635
  }
654
636
  writeBigInt64BE(value, offset = 0) {
655
- return wrtBigUInt64BE(
656
- this,
657
- value,
658
- offset,
659
- -BigInt("0x8000000000000000"),
660
- BigInt("0x7fffffffffffffff")
661
- );
637
+ return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
662
638
  }
663
639
  writeFloatLE(value, offset, noAssert) {
664
640
  return writeFloat(this, value, offset, true, noAssert);
@@ -731,7 +707,7 @@ var _Buffer = class extends Uint8Array {
731
707
  }
732
708
  // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
733
709
  copy(target, targetStart, start, end) {
734
- if (!_Buffer.isBuffer(target))
710
+ if (!Buffer2.isBuffer(target))
735
711
  throw new TypeError("argument should be a Buffer");
736
712
  if (!start)
737
713
  start = 0;
@@ -784,7 +760,7 @@ var _Buffer = class extends Uint8Array {
784
760
  if (encoding !== void 0 && typeof encoding !== "string") {
785
761
  throw new TypeError("encoding must be a string");
786
762
  }
787
- if (typeof encoding === "string" && !_Buffer.isEncoding(encoding)) {
763
+ if (typeof encoding === "string" && !Buffer2.isEncoding(encoding)) {
788
764
  throw new TypeError(`Unknown encoding: ${encoding}`);
789
765
  }
790
766
  if (val.length === 1) {
@@ -814,7 +790,7 @@ var _Buffer = class extends Uint8Array {
814
790
  this[i] = val;
815
791
  }
816
792
  } else {
817
- const bytes = _Buffer.isBuffer(val) ? val : _Buffer.from(val, encoding);
793
+ const bytes = Buffer2.isBuffer(val) ? val : Buffer2.from(val, encoding);
818
794
  const len = bytes.length;
819
795
  if (len === 0) {
820
796
  throw new TypeError(`The value "${val}" is invalid for argument "value"`);
@@ -885,20 +861,18 @@ var _Buffer = class extends Uint8Array {
885
861
  // }
886
862
  // }
887
863
  equals(b) {
888
- if (!_Buffer.isBuffer(b))
864
+ if (!Buffer2.isBuffer(b))
889
865
  throw new TypeError("Argument must be a Buffer");
890
866
  if (this === b)
891
867
  return true;
892
- return _Buffer.compare(this, b) === 0;
868
+ return Buffer2.compare(this, b) === 0;
893
869
  }
894
870
  compare(target, start, end, thisStart, thisEnd) {
895
- if (!_Buffer.isBuffer(target) && isInstance(target, Uint8Array)) {
896
- target = _Buffer.from(target, target.offset, target.byteLength);
871
+ if (!Buffer2.isBuffer(target) && isInstance(target, Uint8Array)) {
872
+ target = Buffer2.from(target, target.offset, target.byteLength);
897
873
  }
898
- if (!_Buffer.isBuffer(target)) {
899
- throw new TypeError(
900
- `${'The "target" argument must be one of type Buffer or Uint8Array. Received type '}${typeof target}`
901
- );
874
+ if (!Buffer2.isBuffer(target)) {
875
+ throw new TypeError(`${'The "target" argument must be one of type Buffer or Uint8Array. Received type '}${typeof target}`);
902
876
  }
903
877
  if (start === void 0) {
904
878
  start = 0;
@@ -975,7 +949,7 @@ var _Buffer = class extends Uint8Array {
975
949
  if (end < start)
976
950
  end = start;
977
951
  const newBuf = this.subarray(start, end);
978
- Object.setPrototypeOf(newBuf, _Buffer.prototype);
952
+ Object.setPrototypeOf(newBuf, Buffer2.prototype);
979
953
  return newBuf;
980
954
  }
981
955
  // Typo support?
@@ -1050,7 +1024,6 @@ var _Buffer = class extends Uint8Array {
1050
1024
  }
1051
1025
  }
1052
1026
  };
1053
- var Buffer2 = _Buffer;
1054
1027
  Buffer2.poolSize = 8192;
1055
1028
  function checkInt(buf, value, offset, ext, max, min) {
1056
1029
  if (!Buffer2.isBuffer(buf))
@@ -1187,11 +1160,7 @@ function fromObject(obj) {
1187
1160
  }
1188
1161
  function checked(length) {
1189
1162
  if (length >= kMaxLength) {
1190
- throw new RangeError(
1191
- `${"Attempt to allocate Buffer larger than maximum size: 0x"}${kMaxLength.toString(
1192
- 16
1193
- )} bytes`
1194
- );
1163
+ throw new RangeError(`${"Attempt to allocate Buffer larger than maximum size: 0x"}${kMaxLength.toString(16)} bytes`);
1195
1164
  }
1196
1165
  return length | 0;
1197
1166
  }
@@ -1203,9 +1172,7 @@ function byteLength(string, encoding) {
1203
1172
  return string.byteLength;
1204
1173
  }
1205
1174
  if (typeof string !== "string") {
1206
- throw new TypeError(
1207
- `${'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '}${typeof string}`
1208
- );
1175
+ throw new TypeError(`${'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '}${typeof string}`);
1209
1176
  }
1210
1177
  const len = string.length;
1211
1178
  const mustMatch = arguments.length > 2 && arguments[2] === true;
@@ -1559,42 +1526,30 @@ function E(sym, getMessage, Base) {
1559
1526
  }
1560
1527
  };
1561
1528
  }
1562
- E(
1563
- "ERR_BUFFER_OUT_OF_BOUNDS",
1564
- function(name) {
1565
- if (name) {
1566
- return `${name} is outside of buffer bounds`;
1567
- }
1568
- return "Attempt to access memory outside buffer bounds";
1569
- },
1570
- RangeError
1571
- );
1572
- E(
1573
- "ERR_INVALID_ARG_TYPE",
1574
- function(name, actual) {
1575
- return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
1576
- },
1577
- TypeError
1578
- );
1579
- E(
1580
- "ERR_OUT_OF_RANGE",
1581
- function(str, range, input) {
1582
- let msg = `The value of "${str}" is out of range.`;
1583
- let received = input;
1584
- if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
1585
- received = addNumericalSeparator(String(input));
1586
- } else if (typeof input === "bigint") {
1587
- received = String(input);
1588
- if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
1589
- received = addNumericalSeparator(received);
1590
- }
1591
- received += "n";
1592
- }
1593
- msg += ` It must be ${range}. Received ${received}`;
1594
- return msg;
1595
- },
1596
- RangeError
1597
- );
1529
+ E("ERR_BUFFER_OUT_OF_BOUNDS", function(name) {
1530
+ if (name) {
1531
+ return `${name} is outside of buffer bounds`;
1532
+ }
1533
+ return "Attempt to access memory outside buffer bounds";
1534
+ }, RangeError);
1535
+ E("ERR_INVALID_ARG_TYPE", function(name, actual) {
1536
+ return `The "${name}" argument must be of type number. Received type ${typeof actual}`;
1537
+ }, TypeError);
1538
+ E("ERR_OUT_OF_RANGE", function(str, range, input) {
1539
+ let msg = `The value of "${str}" is out of range.`;
1540
+ let received = input;
1541
+ if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {
1542
+ received = addNumericalSeparator(String(input));
1543
+ } else if (typeof input === "bigint") {
1544
+ received = String(input);
1545
+ if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {
1546
+ received = addNumericalSeparator(received);
1547
+ }
1548
+ received += "n";
1549
+ }
1550
+ msg += ` It must be ${range}. Received ${received}`;
1551
+ return msg;
1552
+ }, RangeError);
1598
1553
  function addNumericalSeparator(val) {
1599
1554
  let res = "";
1600
1555
  let i = val.length;
@@ -1698,20 +1653,11 @@ function utf8ToBytes(string, units) {
1698
1653
  } else if (codePoint < 65536) {
1699
1654
  if ((units -= 3) < 0)
1700
1655
  break;
1701
- bytes.push(
1702
- codePoint >> 12 | 224,
1703
- codePoint >> 6 & 63 | 128,
1704
- codePoint & 63 | 128
1705
- );
1656
+ bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
1706
1657
  } else if (codePoint < 1114112) {
1707
1658
  if ((units -= 4) < 0)
1708
1659
  break;
1709
- bytes.push(
1710
- codePoint >> 18 | 240,
1711
- codePoint >> 12 & 63 | 128,
1712
- codePoint >> 6 & 63 | 128,
1713
- codePoint & 63 | 128
1714
- );
1660
+ bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
1715
1661
  } else {
1716
1662
  throw new Error("Invalid code point");
1717
1663
  }
@@ -1771,21 +1717,21 @@ var hexSliceLookupTable = function() {
1771
1717
  return table;
1772
1718
  }();
1773
1719
 
1774
- // src/polyfills/buffer/buffer-polyfill.browser.ts
1720
+ // dist/polyfills/buffer/buffer-polyfill.browser.js
1775
1721
  function installBufferPolyfill() {
1776
1722
  globalThis.Buffer = globalThis.Buffer || Buffer2;
1777
1723
  return globalThis.Buffer;
1778
1724
  }
1779
1725
 
1780
- // src/polyfills/buffer/install-buffer-polyfill.ts
1726
+ // dist/polyfills/buffer/install-buffer-polyfill.js
1781
1727
  globalThis.process = globalThis.process || {};
1782
1728
  globalThis.process.env = globalThis.process.env || {};
1783
1729
  var Buffer3 = installBufferPolyfill();
1784
1730
 
1785
- // src/parquet-loader.ts
1731
+ // dist/parquet-loader.js
1786
1732
  var import_loader_utils = require("@loaders.gl/loader-utils");
1787
1733
 
1788
- // src/parquetjs/codecs/plain.ts
1734
+ // dist/parquetjs/codecs/plain.js
1789
1735
  var import_int53 = __toESM(require("int53"), 1);
1790
1736
  function encodeValues(type, values, opts) {
1791
1737
  switch (type) {
@@ -1986,7 +1932,7 @@ function decodeValues_FIXED_LEN_BYTE_ARRAY(cursor, count, opts) {
1986
1932
  return values;
1987
1933
  }
1988
1934
 
1989
- // src/parquetjs/codecs/rle.ts
1935
+ // dist/parquetjs/codecs/rle.js
1990
1936
  var import_varint = __toESM(require("varint"), 1);
1991
1937
  function encodeValues2(type, values, opts) {
1992
1938
  if (!("bitWidth" in opts)) {
@@ -2106,7 +2052,7 @@ function encodeRunRepeated(value, count, opts) {
2106
2052
  return Buffer.concat([Buffer.from(import_varint.default.encode(count << 1)), buf]);
2107
2053
  }
2108
2054
 
2109
- // src/parquetjs/codecs/dictionary.ts
2055
+ // dist/parquetjs/codecs/dictionary.js
2110
2056
  function decodeValues3(type, cursor, count, opts) {
2111
2057
  opts.bitWidth = cursor.buffer.slice(cursor.offset, cursor.offset + 1).readInt8(0);
2112
2058
  cursor.offset += 1;
@@ -2116,7 +2062,7 @@ function encodeValues3(type, cursor, count, opts) {
2116
2062
  throw new Error("Encode dictionary functionality is not supported");
2117
2063
  }
2118
2064
 
2119
- // src/parquetjs/codecs/index.ts
2065
+ // dist/parquetjs/codecs/index.js
2120
2066
  var PARQUET_CODECS = {
2121
2067
  PLAIN: {
2122
2068
  encodeValues,
@@ -2140,7 +2086,7 @@ var PARQUET_CODECS = {
2140
2086
  }
2141
2087
  };
2142
2088
 
2143
- // src/parquetjs/compression.ts
2089
+ // dist/parquetjs/compression.js
2144
2090
  var import_compression = require("@loaders.gl/compression");
2145
2091
  var import_lz4js = __toESM(require("lz4js"), 1);
2146
2092
  function toBuffer(arrayBuffer) {
@@ -2200,7 +2146,7 @@ async function decompress(method, value, size) {
2200
2146
  return toBuffer(compressedArrayBuffer);
2201
2147
  }
2202
2148
 
2203
- // src/parquetjs/schema/types.ts
2149
+ // dist/parquetjs/schema/types.js
2204
2150
  var import_bson = require("@loaders.gl/bson");
2205
2151
  var PARQUET_LOGICAL_TYPES = {
2206
2152
  BOOLEAN: {
@@ -2558,9 +2504,7 @@ function fromPrimitive_TIMESTAMP_MICROS(value) {
2558
2504
  }
2559
2505
  function toPrimitive_INTERVAL(value) {
2560
2506
  if (!value.months || !value.days || !value.milliseconds) {
2561
- throw new Error(
2562
- "value for INTERVAL must be object { months: ..., days: ..., milliseconds: ... }"
2563
- );
2507
+ throw new Error("value for INTERVAL must be object { months: ..., days: ..., milliseconds: ... }");
2564
2508
  }
2565
2509
  const buf = Buffer.alloc(12);
2566
2510
  buf.writeUInt32LE(value.months, 0);
@@ -2592,13 +2536,11 @@ function decimalFromPrimitive_BYTE_ARRAY(value, field) {
2592
2536
  number += component;
2593
2537
  }
2594
2538
  }
2595
- const presisionInt = Math.round(
2596
- number * 10 ** -field.presision % 1 * 10 ** field.presision
2597
- );
2539
+ const presisionInt = Math.round(number * 10 ** -field.presision % 1 * 10 ** field.presision);
2598
2540
  return presisionInt * 10 ** -(field.scale || 0);
2599
2541
  }
2600
2542
 
2601
- // src/parquetjs/schema/shred.ts
2543
+ // dist/parquetjs/schema/shred.js
2602
2544
  function shredBuffer(schema) {
2603
2545
  const columnData = {};
2604
2546
  for (const field of schema.fieldList) {
@@ -2663,9 +2605,7 @@ function shredRecordFields(fields, record, data, rLevel, dLevel) {
2663
2605
  data[field.key].count += 1;
2664
2606
  data[field.key].rlevels.push(rlvl);
2665
2607
  data[field.key].dlevels.push(field.dLevelMax);
2666
- data[field.key].values.push(
2667
- toPrimitive(field.originalType || field.primitiveType, values[i])
2668
- );
2608
+ data[field.key].values.push(toPrimitive(field.originalType || field.primitiveType, values[i]));
2669
2609
  }
2670
2610
  }
2671
2611
  }
@@ -2831,7 +2771,7 @@ function materializeColumnAsColumnarArray(schema, columnData, rowCount, key, col
2831
2771
  }
2832
2772
  }
2833
2773
 
2834
- // src/parquetjs/schema/schema.ts
2774
+ // dist/parquetjs/schema/schema.js
2835
2775
  var ParquetSchema = class {
2836
2776
  /**
2837
2777
  * Create a new schema from a JSON schema definition
@@ -2974,11 +2914,12 @@ function listFields(fields) {
2974
2914
  return list;
2975
2915
  }
2976
2916
 
2977
- // src/parquetjs/parquet-thrift/index.ts
2917
+ // dist/parquetjs/parquet-thrift/index.js
2978
2918
  var import_thrift = require("thrift");
2979
2919
 
2980
- // src/parquetjs/parquet-thrift/Type.ts
2981
- var Type = /* @__PURE__ */ ((Type2) => {
2920
+ // dist/parquetjs/parquet-thrift/Type.js
2921
+ var Type;
2922
+ (function(Type2) {
2982
2923
  Type2[Type2["BOOLEAN"] = 0] = "BOOLEAN";
2983
2924
  Type2[Type2["INT32"] = 1] = "INT32";
2984
2925
  Type2[Type2["INT64"] = 2] = "INT64";
@@ -2987,11 +2928,11 @@ var Type = /* @__PURE__ */ ((Type2) => {
2987
2928
  Type2[Type2["DOUBLE"] = 5] = "DOUBLE";
2988
2929
  Type2[Type2["BYTE_ARRAY"] = 6] = "BYTE_ARRAY";
2989
2930
  Type2[Type2["FIXED_LEN_BYTE_ARRAY"] = 7] = "FIXED_LEN_BYTE_ARRAY";
2990
- return Type2;
2991
- })(Type || {});
2931
+ })(Type || (Type = {}));
2992
2932
 
2993
- // src/parquetjs/parquet-thrift/ConvertedType.ts
2994
- var ConvertedType = /* @__PURE__ */ ((ConvertedType2) => {
2933
+ // dist/parquetjs/parquet-thrift/ConvertedType.js
2934
+ var ConvertedType;
2935
+ (function(ConvertedType2) {
2995
2936
  ConvertedType2[ConvertedType2["UTF8"] = 0] = "UTF8";
2996
2937
  ConvertedType2[ConvertedType2["MAP"] = 1] = "MAP";
2997
2938
  ConvertedType2[ConvertedType2["MAP_KEY_VALUE"] = 2] = "MAP_KEY_VALUE";
@@ -3014,19 +2955,19 @@ var ConvertedType = /* @__PURE__ */ ((ConvertedType2) => {
3014
2955
  ConvertedType2[ConvertedType2["JSON"] = 19] = "JSON";
3015
2956
  ConvertedType2[ConvertedType2["BSON"] = 20] = "BSON";
3016
2957
  ConvertedType2[ConvertedType2["INTERVAL"] = 21] = "INTERVAL";
3017
- return ConvertedType2;
3018
- })(ConvertedType || {});
2958
+ })(ConvertedType || (ConvertedType = {}));
3019
2959
 
3020
- // src/parquetjs/parquet-thrift/FieldRepetitionType.ts
3021
- var FieldRepetitionType = /* @__PURE__ */ ((FieldRepetitionType2) => {
2960
+ // dist/parquetjs/parquet-thrift/FieldRepetitionType.js
2961
+ var FieldRepetitionType;
2962
+ (function(FieldRepetitionType2) {
3022
2963
  FieldRepetitionType2[FieldRepetitionType2["REQUIRED"] = 0] = "REQUIRED";
3023
2964
  FieldRepetitionType2[FieldRepetitionType2["OPTIONAL"] = 1] = "OPTIONAL";
3024
2965
  FieldRepetitionType2[FieldRepetitionType2["REPEATED"] = 2] = "REPEATED";
3025
- return FieldRepetitionType2;
3026
- })(FieldRepetitionType || {});
2966
+ })(FieldRepetitionType || (FieldRepetitionType = {}));
3027
2967
 
3028
- // src/parquetjs/parquet-thrift/Encoding.ts
3029
- var Encoding = /* @__PURE__ */ ((Encoding2) => {
2968
+ // dist/parquetjs/parquet-thrift/Encoding.js
2969
+ var Encoding;
2970
+ (function(Encoding2) {
3030
2971
  Encoding2[Encoding2["PLAIN"] = 0] = "PLAIN";
3031
2972
  Encoding2[Encoding2["PLAIN_DICTIONARY"] = 2] = "PLAIN_DICTIONARY";
3032
2973
  Encoding2[Encoding2["RLE"] = 3] = "RLE";
@@ -3035,11 +2976,11 @@ var Encoding = /* @__PURE__ */ ((Encoding2) => {
3035
2976
  Encoding2[Encoding2["DELTA_LENGTH_BYTE_ARRAY"] = 6] = "DELTA_LENGTH_BYTE_ARRAY";
3036
2977
  Encoding2[Encoding2["DELTA_BYTE_ARRAY"] = 7] = "DELTA_BYTE_ARRAY";
3037
2978
  Encoding2[Encoding2["RLE_DICTIONARY"] = 8] = "RLE_DICTIONARY";
3038
- return Encoding2;
3039
- })(Encoding || {});
2979
+ })(Encoding || (Encoding = {}));
3040
2980
 
3041
- // src/parquetjs/parquet-thrift/CompressionCodec.ts
3042
- var CompressionCodec = /* @__PURE__ */ ((CompressionCodec2) => {
2981
+ // dist/parquetjs/parquet-thrift/CompressionCodec.js
2982
+ var CompressionCodec;
2983
+ (function(CompressionCodec2) {
3043
2984
  CompressionCodec2[CompressionCodec2["UNCOMPRESSED"] = 0] = "UNCOMPRESSED";
3044
2985
  CompressionCodec2[CompressionCodec2["SNAPPY"] = 1] = "SNAPPY";
3045
2986
  CompressionCodec2[CompressionCodec2["GZIP"] = 2] = "GZIP";
@@ -3048,19 +2989,18 @@ var CompressionCodec = /* @__PURE__ */ ((CompressionCodec2) => {
3048
2989
  CompressionCodec2[CompressionCodec2["LZ4"] = 5] = "LZ4";
3049
2990
  CompressionCodec2[CompressionCodec2["ZSTD"] = 6] = "ZSTD";
3050
2991
  CompressionCodec2[CompressionCodec2["LZ4_RAW"] = 7] = "LZ4_RAW";
3051
- return CompressionCodec2;
3052
- })(CompressionCodec || {});
2992
+ })(CompressionCodec || (CompressionCodec = {}));
3053
2993
 
3054
- // src/parquetjs/parquet-thrift/PageType.ts
3055
- var PageType = /* @__PURE__ */ ((PageType2) => {
2994
+ // dist/parquetjs/parquet-thrift/PageType.js
2995
+ var PageType;
2996
+ (function(PageType2) {
3056
2997
  PageType2[PageType2["DATA_PAGE"] = 0] = "DATA_PAGE";
3057
2998
  PageType2[PageType2["INDEX_PAGE"] = 1] = "INDEX_PAGE";
3058
2999
  PageType2[PageType2["DICTIONARY_PAGE"] = 2] = "DICTIONARY_PAGE";
3059
3000
  PageType2[PageType2["DATA_PAGE_V2"] = 3] = "DATA_PAGE_V2";
3060
- return PageType2;
3061
- })(PageType || {});
3001
+ })(PageType || (PageType = {}));
3062
3002
 
3063
- // src/parquetjs/parquet-thrift/Statistics.ts
3003
+ // dist/parquetjs/parquet-thrift/Statistics.js
3064
3004
  var import_node_int64 = __toESM(require("node-int64"), 1);
3065
3005
  var thrift = __toESM(require("thrift"), 1);
3066
3006
  var Statistics = class {
@@ -3198,7 +3138,7 @@ var Statistics = class {
3198
3138
  }
3199
3139
  };
3200
3140
 
3201
- // src/parquetjs/parquet-thrift/StringType.ts
3141
+ // dist/parquetjs/parquet-thrift/StringType.js
3202
3142
  var thrift2 = __toESM(require("thrift"), 1);
3203
3143
  var StringType = class {
3204
3144
  constructor() {
@@ -3230,7 +3170,7 @@ var StringType = class {
3230
3170
  }
3231
3171
  };
3232
3172
 
3233
- // src/parquetjs/parquet-thrift/UUIDType.ts
3173
+ // dist/parquetjs/parquet-thrift/UUIDType.js
3234
3174
  var thrift3 = __toESM(require("thrift"), 1);
3235
3175
  var UUIDType = class {
3236
3176
  constructor() {
@@ -3262,7 +3202,7 @@ var UUIDType = class {
3262
3202
  }
3263
3203
  };
3264
3204
 
3265
- // src/parquetjs/parquet-thrift/MapType.ts
3205
+ // dist/parquetjs/parquet-thrift/MapType.js
3266
3206
  var thrift4 = __toESM(require("thrift"), 1);
3267
3207
  var MapType = class {
3268
3208
  constructor() {
@@ -3294,7 +3234,7 @@ var MapType = class {
3294
3234
  }
3295
3235
  };
3296
3236
 
3297
- // src/parquetjs/parquet-thrift/ListType.ts
3237
+ // dist/parquetjs/parquet-thrift/ListType.js
3298
3238
  var thrift5 = __toESM(require("thrift"), 1);
3299
3239
  var ListType = class {
3300
3240
  constructor() {
@@ -3326,7 +3266,7 @@ var ListType = class {
3326
3266
  }
3327
3267
  };
3328
3268
 
3329
- // src/parquetjs/parquet-thrift/EnumType.ts
3269
+ // dist/parquetjs/parquet-thrift/EnumType.js
3330
3270
  var thrift6 = __toESM(require("thrift"), 1);
3331
3271
  var EnumType = class {
3332
3272
  constructor() {
@@ -3358,7 +3298,7 @@ var EnumType = class {
3358
3298
  }
3359
3299
  };
3360
3300
 
3361
- // src/parquetjs/parquet-thrift/DateType.ts
3301
+ // dist/parquetjs/parquet-thrift/DateType.js
3362
3302
  var thrift7 = __toESM(require("thrift"), 1);
3363
3303
  var DateType = class {
3364
3304
  constructor() {
@@ -3390,7 +3330,7 @@ var DateType = class {
3390
3330
  }
3391
3331
  };
3392
3332
 
3393
- // src/parquetjs/parquet-thrift/NullType.ts
3333
+ // dist/parquetjs/parquet-thrift/NullType.js
3394
3334
  var thrift8 = __toESM(require("thrift"), 1);
3395
3335
  var NullType = class {
3396
3336
  constructor() {
@@ -3422,25 +3362,19 @@ var NullType = class {
3422
3362
  }
3423
3363
  };
3424
3364
 
3425
- // src/parquetjs/parquet-thrift/DecimalType.ts
3365
+ // dist/parquetjs/parquet-thrift/DecimalType.js
3426
3366
  var thrift9 = __toESM(require("thrift"), 1);
3427
3367
  var DecimalType = class {
3428
3368
  constructor(args) {
3429
3369
  if (args != null && args.scale != null) {
3430
3370
  this.scale = args.scale;
3431
3371
  } else {
3432
- throw new thrift9.Thrift.TProtocolException(
3433
- thrift9.Thrift.TProtocolExceptionType.UNKNOWN,
3434
- "Required field[scale] is unset!"
3435
- );
3372
+ throw new thrift9.Thrift.TProtocolException(thrift9.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[scale] is unset!");
3436
3373
  }
3437
3374
  if (args != null && args.precision != null) {
3438
3375
  this.precision = args.precision;
3439
3376
  } else {
3440
- throw new thrift9.Thrift.TProtocolException(
3441
- thrift9.Thrift.TProtocolExceptionType.UNKNOWN,
3442
- "Required field[precision] is unset!"
3443
- );
3377
+ throw new thrift9.Thrift.TProtocolException(thrift9.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[precision] is unset!");
3444
3378
  }
3445
3379
  }
3446
3380
  write(output) {
@@ -3496,15 +3430,12 @@ var DecimalType = class {
3496
3430
  if (_args.scale !== void 0 && _args.precision !== void 0) {
3497
3431
  return new DecimalType(_args);
3498
3432
  } else {
3499
- throw new thrift9.Thrift.TProtocolException(
3500
- thrift9.Thrift.TProtocolExceptionType.UNKNOWN,
3501
- "Unable to read DecimalType from input"
3502
- );
3433
+ throw new thrift9.Thrift.TProtocolException(thrift9.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read DecimalType from input");
3503
3434
  }
3504
3435
  }
3505
3436
  };
3506
3437
 
3507
- // src/parquetjs/parquet-thrift/MilliSeconds.ts
3438
+ // dist/parquetjs/parquet-thrift/MilliSeconds.js
3508
3439
  var thrift10 = __toESM(require("thrift"), 1);
3509
3440
  var MilliSeconds = class {
3510
3441
  constructor() {
@@ -3536,7 +3467,7 @@ var MilliSeconds = class {
3536
3467
  }
3537
3468
  };
3538
3469
 
3539
- // src/parquetjs/parquet-thrift/MicroSeconds.ts
3470
+ // dist/parquetjs/parquet-thrift/MicroSeconds.js
3540
3471
  var thrift11 = __toESM(require("thrift"), 1);
3541
3472
  var MicroSeconds = class {
3542
3473
  constructor() {
@@ -3568,10 +3499,10 @@ var MicroSeconds = class {
3568
3499
  }
3569
3500
  };
3570
3501
 
3571
- // src/parquetjs/parquet-thrift/TimestampType.ts
3502
+ // dist/parquetjs/parquet-thrift/TimestampType.js
3572
3503
  var thrift13 = __toESM(require("thrift"), 1);
3573
3504
 
3574
- // src/parquetjs/parquet-thrift/TimeUnit.ts
3505
+ // dist/parquetjs/parquet-thrift/TimeUnit.js
3575
3506
  var thrift12 = __toESM(require("thrift"), 1);
3576
3507
  var TimeUnit = class {
3577
3508
  constructor(args) {
@@ -3586,15 +3517,9 @@ var TimeUnit = class {
3586
3517
  this.MICROS = args.MICROS;
3587
3518
  }
3588
3519
  if (_fieldsSet > 1) {
3589
- throw new thrift12.Thrift.TProtocolException(
3590
- thrift12.Thrift.TProtocolExceptionType.INVALID_DATA,
3591
- "Cannot read a TUnion with more than one set value!"
3592
- );
3520
+ throw new thrift12.Thrift.TProtocolException(thrift12.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with more than one set value!");
3593
3521
  } else if (_fieldsSet < 1) {
3594
- throw new thrift12.Thrift.TProtocolException(
3595
- thrift12.Thrift.TProtocolExceptionType.INVALID_DATA,
3596
- "Cannot read a TUnion with no set value!"
3597
- );
3522
+ throw new thrift12.Thrift.TProtocolException(thrift12.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with no set value!");
3598
3523
  }
3599
3524
  }
3600
3525
  }
@@ -3658,45 +3583,30 @@ var TimeUnit = class {
3658
3583
  }
3659
3584
  input.readStructEnd();
3660
3585
  if (_fieldsSet > 1) {
3661
- throw new thrift12.Thrift.TProtocolException(
3662
- thrift12.Thrift.TProtocolExceptionType.INVALID_DATA,
3663
- "Cannot read a TUnion with more than one set value!"
3664
- );
3586
+ throw new thrift12.Thrift.TProtocolException(thrift12.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with more than one set value!");
3665
3587
  } else if (_fieldsSet < 1) {
3666
- throw new thrift12.Thrift.TProtocolException(
3667
- thrift12.Thrift.TProtocolExceptionType.INVALID_DATA,
3668
- "Cannot read a TUnion with no set value!"
3669
- );
3588
+ throw new thrift12.Thrift.TProtocolException(thrift12.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with no set value!");
3670
3589
  }
3671
3590
  if (_returnValue !== null) {
3672
3591
  return _returnValue;
3673
3592
  } else {
3674
- throw new thrift12.Thrift.TProtocolException(
3675
- thrift12.Thrift.TProtocolExceptionType.UNKNOWN,
3676
- "Unable to read data for TUnion"
3677
- );
3593
+ throw new thrift12.Thrift.TProtocolException(thrift12.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read data for TUnion");
3678
3594
  }
3679
3595
  }
3680
3596
  };
3681
3597
 
3682
- // src/parquetjs/parquet-thrift/TimestampType.ts
3598
+ // dist/parquetjs/parquet-thrift/TimestampType.js
3683
3599
  var TimestampType = class {
3684
3600
  constructor(args) {
3685
3601
  if (args != null && args.isAdjustedToUTC != null) {
3686
3602
  this.isAdjustedToUTC = args.isAdjustedToUTC;
3687
3603
  } else {
3688
- throw new thrift13.Thrift.TProtocolException(
3689
- thrift13.Thrift.TProtocolExceptionType.UNKNOWN,
3690
- "Required field[isAdjustedToUTC] is unset!"
3691
- );
3604
+ throw new thrift13.Thrift.TProtocolException(thrift13.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[isAdjustedToUTC] is unset!");
3692
3605
  }
3693
3606
  if (args != null && args.unit != null) {
3694
3607
  this.unit = args.unit;
3695
3608
  } else {
3696
- throw new thrift13.Thrift.TProtocolException(
3697
- thrift13.Thrift.TProtocolExceptionType.UNKNOWN,
3698
- "Required field[unit] is unset!"
3699
- );
3609
+ throw new thrift13.Thrift.TProtocolException(thrift13.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[unit] is unset!");
3700
3610
  }
3701
3611
  }
3702
3612
  write(output) {
@@ -3752,33 +3662,24 @@ var TimestampType = class {
3752
3662
  if (_args.isAdjustedToUTC !== void 0 && _args.unit !== void 0) {
3753
3663
  return new TimestampType(_args);
3754
3664
  } else {
3755
- throw new thrift13.Thrift.TProtocolException(
3756
- thrift13.Thrift.TProtocolExceptionType.UNKNOWN,
3757
- "Unable to read TimestampType from input"
3758
- );
3665
+ throw new thrift13.Thrift.TProtocolException(thrift13.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read TimestampType from input");
3759
3666
  }
3760
3667
  }
3761
3668
  };
3762
3669
 
3763
- // src/parquetjs/parquet-thrift/TimeType.ts
3670
+ // dist/parquetjs/parquet-thrift/TimeType.js
3764
3671
  var thrift14 = __toESM(require("thrift"), 1);
3765
3672
  var TimeType = class {
3766
3673
  constructor(args) {
3767
3674
  if (args != null && args.isAdjustedToUTC != null) {
3768
3675
  this.isAdjustedToUTC = args.isAdjustedToUTC;
3769
3676
  } else {
3770
- throw new thrift14.Thrift.TProtocolException(
3771
- thrift14.Thrift.TProtocolExceptionType.UNKNOWN,
3772
- "Required field[isAdjustedToUTC] is unset!"
3773
- );
3677
+ throw new thrift14.Thrift.TProtocolException(thrift14.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[isAdjustedToUTC] is unset!");
3774
3678
  }
3775
3679
  if (args != null && args.unit != null) {
3776
3680
  this.unit = args.unit;
3777
3681
  } else {
3778
- throw new thrift14.Thrift.TProtocolException(
3779
- thrift14.Thrift.TProtocolExceptionType.UNKNOWN,
3780
- "Required field[unit] is unset!"
3781
- );
3682
+ throw new thrift14.Thrift.TProtocolException(thrift14.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[unit] is unset!");
3782
3683
  }
3783
3684
  }
3784
3685
  write(output) {
@@ -3834,33 +3735,24 @@ var TimeType = class {
3834
3735
  if (_args.isAdjustedToUTC !== void 0 && _args.unit !== void 0) {
3835
3736
  return new TimeType(_args);
3836
3737
  } else {
3837
- throw new thrift14.Thrift.TProtocolException(
3838
- thrift14.Thrift.TProtocolExceptionType.UNKNOWN,
3839
- "Unable to read TimeType from input"
3840
- );
3738
+ throw new thrift14.Thrift.TProtocolException(thrift14.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read TimeType from input");
3841
3739
  }
3842
3740
  }
3843
3741
  };
3844
3742
 
3845
- // src/parquetjs/parquet-thrift/IntType.ts
3743
+ // dist/parquetjs/parquet-thrift/IntType.js
3846
3744
  var thrift15 = __toESM(require("thrift"), 1);
3847
3745
  var IntType = class {
3848
3746
  constructor(args) {
3849
3747
  if (args != null && args.bitWidth != null) {
3850
3748
  this.bitWidth = args.bitWidth;
3851
3749
  } else {
3852
- throw new thrift15.Thrift.TProtocolException(
3853
- thrift15.Thrift.TProtocolExceptionType.UNKNOWN,
3854
- "Required field[bitWidth] is unset!"
3855
- );
3750
+ throw new thrift15.Thrift.TProtocolException(thrift15.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[bitWidth] is unset!");
3856
3751
  }
3857
3752
  if (args != null && args.isSigned != null) {
3858
3753
  this.isSigned = args.isSigned;
3859
3754
  } else {
3860
- throw new thrift15.Thrift.TProtocolException(
3861
- thrift15.Thrift.TProtocolExceptionType.UNKNOWN,
3862
- "Required field[isSigned] is unset!"
3863
- );
3755
+ throw new thrift15.Thrift.TProtocolException(thrift15.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[isSigned] is unset!");
3864
3756
  }
3865
3757
  }
3866
3758
  write(output) {
@@ -3916,15 +3808,12 @@ var IntType = class {
3916
3808
  if (_args.bitWidth !== void 0 && _args.isSigned !== void 0) {
3917
3809
  return new IntType(_args);
3918
3810
  } else {
3919
- throw new thrift15.Thrift.TProtocolException(
3920
- thrift15.Thrift.TProtocolExceptionType.UNKNOWN,
3921
- "Unable to read IntType from input"
3922
- );
3811
+ throw new thrift15.Thrift.TProtocolException(thrift15.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read IntType from input");
3923
3812
  }
3924
3813
  }
3925
3814
  };
3926
3815
 
3927
- // src/parquetjs/parquet-thrift/JsonType.ts
3816
+ // dist/parquetjs/parquet-thrift/JsonType.js
3928
3817
  var thrift16 = __toESM(require("thrift"), 1);
3929
3818
  var JsonType = class {
3930
3819
  constructor() {
@@ -3956,7 +3845,7 @@ var JsonType = class {
3956
3845
  }
3957
3846
  };
3958
3847
 
3959
- // src/parquetjs/parquet-thrift/BsonType.ts
3848
+ // dist/parquetjs/parquet-thrift/BsonType.js
3960
3849
  var thrift17 = __toESM(require("thrift"), 1);
3961
3850
  var BsonType = class {
3962
3851
  constructor() {
@@ -3988,10 +3877,10 @@ var BsonType = class {
3988
3877
  }
3989
3878
  };
3990
3879
 
3991
- // src/parquetjs/parquet-thrift/SchemaElement.ts
3880
+ // dist/parquetjs/parquet-thrift/SchemaElement.js
3992
3881
  var thrift19 = __toESM(require("thrift"), 1);
3993
3882
 
3994
- // src/parquetjs/parquet-thrift/LogicalType.ts
3883
+ // dist/parquetjs/parquet-thrift/LogicalType.js
3995
3884
  var thrift18 = __toESM(require("thrift"), 1);
3996
3885
  var LogicalType = class {
3997
3886
  constructor(args) {
@@ -4050,15 +3939,9 @@ var LogicalType = class {
4050
3939
  this.UUID = args.UUID;
4051
3940
  }
4052
3941
  if (_fieldsSet > 1) {
4053
- throw new thrift18.Thrift.TProtocolException(
4054
- thrift18.Thrift.TProtocolExceptionType.INVALID_DATA,
4055
- "Cannot read a TUnion with more than one set value!"
4056
- );
3942
+ throw new thrift18.Thrift.TProtocolException(thrift18.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with more than one set value!");
4057
3943
  } else if (_fieldsSet < 1) {
4058
- throw new thrift18.Thrift.TProtocolException(
4059
- thrift18.Thrift.TProtocolExceptionType.INVALID_DATA,
4060
- "Cannot read a TUnion with no set value!"
4061
- );
3944
+ throw new thrift18.Thrift.TProtocolException(thrift18.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with no set value!");
4062
3945
  }
4063
3946
  }
4064
3947
  }
@@ -4309,28 +4192,19 @@ var LogicalType = class {
4309
4192
  }
4310
4193
  input.readStructEnd();
4311
4194
  if (_fieldsSet > 1) {
4312
- throw new thrift18.Thrift.TProtocolException(
4313
- thrift18.Thrift.TProtocolExceptionType.INVALID_DATA,
4314
- "Cannot read a TUnion with more than one set value!"
4315
- );
4195
+ throw new thrift18.Thrift.TProtocolException(thrift18.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with more than one set value!");
4316
4196
  } else if (_fieldsSet < 1) {
4317
- throw new thrift18.Thrift.TProtocolException(
4318
- thrift18.Thrift.TProtocolExceptionType.INVALID_DATA,
4319
- "Cannot read a TUnion with no set value!"
4320
- );
4197
+ throw new thrift18.Thrift.TProtocolException(thrift18.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with no set value!");
4321
4198
  }
4322
4199
  if (_returnValue !== null) {
4323
4200
  return _returnValue;
4324
4201
  } else {
4325
- throw new thrift18.Thrift.TProtocolException(
4326
- thrift18.Thrift.TProtocolExceptionType.UNKNOWN,
4327
- "Unable to read data for TUnion"
4328
- );
4202
+ throw new thrift18.Thrift.TProtocolException(thrift18.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read data for TUnion");
4329
4203
  }
4330
4204
  }
4331
4205
  };
4332
4206
 
4333
- // src/parquetjs/parquet-thrift/SchemaElement.ts
4207
+ // dist/parquetjs/parquet-thrift/SchemaElement.js
4334
4208
  var SchemaElement = class {
4335
4209
  constructor(args) {
4336
4210
  if (args != null && args.type != null) {
@@ -4345,10 +4219,7 @@ var SchemaElement = class {
4345
4219
  if (args != null && args.name != null) {
4346
4220
  this.name = args.name;
4347
4221
  } else {
4348
- throw new thrift19.Thrift.TProtocolException(
4349
- thrift19.Thrift.TProtocolExceptionType.UNKNOWN,
4350
- "Required field[name] is unset!"
4351
- );
4222
+ throw new thrift19.Thrift.TProtocolException(thrift19.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[name] is unset!");
4352
4223
  }
4353
4224
  if (args != null && args.num_children != null) {
4354
4225
  this.num_children = args.num_children;
@@ -4526,49 +4397,34 @@ var SchemaElement = class {
4526
4397
  if (_args.name !== void 0) {
4527
4398
  return new SchemaElement(_args);
4528
4399
  } else {
4529
- throw new thrift19.Thrift.TProtocolException(
4530
- thrift19.Thrift.TProtocolExceptionType.UNKNOWN,
4531
- "Unable to read SchemaElement from input"
4532
- );
4400
+ throw new thrift19.Thrift.TProtocolException(thrift19.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read SchemaElement from input");
4533
4401
  }
4534
4402
  }
4535
4403
  };
4536
4404
 
4537
- // src/parquetjs/parquet-thrift/DataPageHeader.ts
4405
+ // dist/parquetjs/parquet-thrift/DataPageHeader.js
4538
4406
  var thrift20 = __toESM(require("thrift"), 1);
4539
4407
  var DataPageHeader = class {
4540
4408
  constructor(args) {
4541
4409
  if (args != null && args.num_values != null) {
4542
4410
  this.num_values = args.num_values;
4543
4411
  } else {
4544
- throw new thrift20.Thrift.TProtocolException(
4545
- thrift20.Thrift.TProtocolExceptionType.UNKNOWN,
4546
- "Required field[num_values] is unset!"
4547
- );
4412
+ throw new thrift20.Thrift.TProtocolException(thrift20.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[num_values] is unset!");
4548
4413
  }
4549
4414
  if (args != null && args.encoding != null) {
4550
4415
  this.encoding = args.encoding;
4551
4416
  } else {
4552
- throw new thrift20.Thrift.TProtocolException(
4553
- thrift20.Thrift.TProtocolExceptionType.UNKNOWN,
4554
- "Required field[encoding] is unset!"
4555
- );
4417
+ throw new thrift20.Thrift.TProtocolException(thrift20.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[encoding] is unset!");
4556
4418
  }
4557
4419
  if (args != null && args.definition_level_encoding != null) {
4558
4420
  this.definition_level_encoding = args.definition_level_encoding;
4559
4421
  } else {
4560
- throw new thrift20.Thrift.TProtocolException(
4561
- thrift20.Thrift.TProtocolExceptionType.UNKNOWN,
4562
- "Required field[definition_level_encoding] is unset!"
4563
- );
4422
+ throw new thrift20.Thrift.TProtocolException(thrift20.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[definition_level_encoding] is unset!");
4564
4423
  }
4565
4424
  if (args != null && args.repetition_level_encoding != null) {
4566
4425
  this.repetition_level_encoding = args.repetition_level_encoding;
4567
4426
  } else {
4568
- throw new thrift20.Thrift.TProtocolException(
4569
- thrift20.Thrift.TProtocolExceptionType.UNKNOWN,
4570
- "Required field[repetition_level_encoding] is unset!"
4571
- );
4427
+ throw new thrift20.Thrift.TProtocolException(thrift20.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[repetition_level_encoding] is unset!");
4572
4428
  }
4573
4429
  if (args != null && args.statistics != null) {
4574
4430
  this.statistics = args.statistics;
@@ -4666,15 +4522,12 @@ var DataPageHeader = class {
4666
4522
  if (_args.num_values !== void 0 && _args.encoding !== void 0 && _args.definition_level_encoding !== void 0 && _args.repetition_level_encoding !== void 0) {
4667
4523
  return new DataPageHeader(_args);
4668
4524
  } else {
4669
- throw new thrift20.Thrift.TProtocolException(
4670
- thrift20.Thrift.TProtocolExceptionType.UNKNOWN,
4671
- "Unable to read DataPageHeader from input"
4672
- );
4525
+ throw new thrift20.Thrift.TProtocolException(thrift20.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read DataPageHeader from input");
4673
4526
  }
4674
4527
  }
4675
4528
  };
4676
4529
 
4677
- // src/parquetjs/parquet-thrift/IndexPageHeader.ts
4530
+ // dist/parquetjs/parquet-thrift/IndexPageHeader.js
4678
4531
  var thrift21 = __toESM(require("thrift"), 1);
4679
4532
  var IndexPageHeader = class {
4680
4533
  constructor() {
@@ -4706,25 +4559,19 @@ var IndexPageHeader = class {
4706
4559
  }
4707
4560
  };
4708
4561
 
4709
- // src/parquetjs/parquet-thrift/DictionaryPageHeader.ts
4562
+ // dist/parquetjs/parquet-thrift/DictionaryPageHeader.js
4710
4563
  var thrift22 = __toESM(require("thrift"), 1);
4711
4564
  var DictionaryPageHeader = class {
4712
4565
  constructor(args) {
4713
4566
  if (args != null && args.num_values != null) {
4714
4567
  this.num_values = args.num_values;
4715
4568
  } else {
4716
- throw new thrift22.Thrift.TProtocolException(
4717
- thrift22.Thrift.TProtocolExceptionType.UNKNOWN,
4718
- "Required field[num_values] is unset!"
4719
- );
4569
+ throw new thrift22.Thrift.TProtocolException(thrift22.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[num_values] is unset!");
4720
4570
  }
4721
4571
  if (args != null && args.encoding != null) {
4722
4572
  this.encoding = args.encoding;
4723
4573
  } else {
4724
- throw new thrift22.Thrift.TProtocolException(
4725
- thrift22.Thrift.TProtocolExceptionType.UNKNOWN,
4726
- "Required field[encoding] is unset!"
4727
- );
4574
+ throw new thrift22.Thrift.TProtocolException(thrift22.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[encoding] is unset!");
4728
4575
  }
4729
4576
  if (args != null && args.is_sorted != null) {
4730
4577
  this.is_sorted = args.is_sorted;
@@ -4796,15 +4643,12 @@ var DictionaryPageHeader = class {
4796
4643
  if (_args.num_values !== void 0 && _args.encoding !== void 0) {
4797
4644
  return new DictionaryPageHeader(_args);
4798
4645
  } else {
4799
- throw new thrift22.Thrift.TProtocolException(
4800
- thrift22.Thrift.TProtocolExceptionType.UNKNOWN,
4801
- "Unable to read DictionaryPageHeader from input"
4802
- );
4646
+ throw new thrift22.Thrift.TProtocolException(thrift22.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read DictionaryPageHeader from input");
4803
4647
  }
4804
4648
  }
4805
4649
  };
4806
4650
 
4807
- // src/parquetjs/parquet-thrift/DataPageHeaderV2.ts
4651
+ // dist/parquetjs/parquet-thrift/DataPageHeaderV2.js
4808
4652
  var thrift23 = __toESM(require("thrift"), 1);
4809
4653
  var DataPageHeaderV2 = class {
4810
4654
  constructor(args) {
@@ -4812,50 +4656,32 @@ var DataPageHeaderV2 = class {
4812
4656
  if (args != null && args.num_values != null) {
4813
4657
  this.num_values = args.num_values;
4814
4658
  } else {
4815
- throw new thrift23.Thrift.TProtocolException(
4816
- thrift23.Thrift.TProtocolExceptionType.UNKNOWN,
4817
- "Required field[num_values] is unset!"
4818
- );
4659
+ throw new thrift23.Thrift.TProtocolException(thrift23.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[num_values] is unset!");
4819
4660
  }
4820
4661
  if (args != null && args.num_nulls != null) {
4821
4662
  this.num_nulls = args.num_nulls;
4822
4663
  } else {
4823
- throw new thrift23.Thrift.TProtocolException(
4824
- thrift23.Thrift.TProtocolExceptionType.UNKNOWN,
4825
- "Required field[num_nulls] is unset!"
4826
- );
4664
+ throw new thrift23.Thrift.TProtocolException(thrift23.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[num_nulls] is unset!");
4827
4665
  }
4828
4666
  if (args != null && args.num_rows != null) {
4829
4667
  this.num_rows = args.num_rows;
4830
4668
  } else {
4831
- throw new thrift23.Thrift.TProtocolException(
4832
- thrift23.Thrift.TProtocolExceptionType.UNKNOWN,
4833
- "Required field[num_rows] is unset!"
4834
- );
4669
+ throw new thrift23.Thrift.TProtocolException(thrift23.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[num_rows] is unset!");
4835
4670
  }
4836
4671
  if (args != null && args.encoding != null) {
4837
4672
  this.encoding = args.encoding;
4838
4673
  } else {
4839
- throw new thrift23.Thrift.TProtocolException(
4840
- thrift23.Thrift.TProtocolExceptionType.UNKNOWN,
4841
- "Required field[encoding] is unset!"
4842
- );
4674
+ throw new thrift23.Thrift.TProtocolException(thrift23.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[encoding] is unset!");
4843
4675
  }
4844
4676
  if (args != null && args.definition_levels_byte_length != null) {
4845
4677
  this.definition_levels_byte_length = args.definition_levels_byte_length;
4846
4678
  } else {
4847
- throw new thrift23.Thrift.TProtocolException(
4848
- thrift23.Thrift.TProtocolExceptionType.UNKNOWN,
4849
- "Required field[definition_levels_byte_length] is unset!"
4850
- );
4679
+ throw new thrift23.Thrift.TProtocolException(thrift23.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[definition_levels_byte_length] is unset!");
4851
4680
  }
4852
4681
  if (args != null && args.repetition_levels_byte_length != null) {
4853
4682
  this.repetition_levels_byte_length = args.repetition_levels_byte_length;
4854
4683
  } else {
4855
- throw new thrift23.Thrift.TProtocolException(
4856
- thrift23.Thrift.TProtocolExceptionType.UNKNOWN,
4857
- "Required field[repetition_levels_byte_length] is unset!"
4858
- );
4684
+ throw new thrift23.Thrift.TProtocolException(thrift23.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[repetition_levels_byte_length] is unset!");
4859
4685
  }
4860
4686
  if (args != null && args.is_compressed != null) {
4861
4687
  this.is_compressed = args.is_compressed;
@@ -4995,41 +4821,29 @@ var DataPageHeaderV2 = class {
4995
4821
  if (_args.num_values !== void 0 && _args.num_nulls !== void 0 && _args.num_rows !== void 0 && _args.encoding !== void 0 && _args.definition_levels_byte_length !== void 0 && _args.repetition_levels_byte_length !== void 0) {
4996
4822
  return new DataPageHeaderV2(_args);
4997
4823
  } else {
4998
- throw new thrift23.Thrift.TProtocolException(
4999
- thrift23.Thrift.TProtocolExceptionType.UNKNOWN,
5000
- "Unable to read DataPageHeaderV2 from input"
5001
- );
4824
+ throw new thrift23.Thrift.TProtocolException(thrift23.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read DataPageHeaderV2 from input");
5002
4825
  }
5003
4826
  }
5004
4827
  };
5005
4828
 
5006
- // src/parquetjs/parquet-thrift/PageHeader.ts
4829
+ // dist/parquetjs/parquet-thrift/PageHeader.js
5007
4830
  var thrift24 = __toESM(require("thrift"), 1);
5008
4831
  var PageHeader = class {
5009
4832
  constructor(args) {
5010
4833
  if (args != null && args.type != null) {
5011
4834
  this.type = args.type;
5012
4835
  } else {
5013
- throw new thrift24.Thrift.TProtocolException(
5014
- thrift24.Thrift.TProtocolExceptionType.UNKNOWN,
5015
- "Required field[type] is unset!"
5016
- );
4836
+ throw new thrift24.Thrift.TProtocolException(thrift24.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[type] is unset!");
5017
4837
  }
5018
4838
  if (args != null && args.uncompressed_page_size != null) {
5019
4839
  this.uncompressed_page_size = args.uncompressed_page_size;
5020
4840
  } else {
5021
- throw new thrift24.Thrift.TProtocolException(
5022
- thrift24.Thrift.TProtocolExceptionType.UNKNOWN,
5023
- "Required field[uncompressed_page_size] is unset!"
5024
- );
4841
+ throw new thrift24.Thrift.TProtocolException(thrift24.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[uncompressed_page_size] is unset!");
5025
4842
  }
5026
4843
  if (args != null && args.compressed_page_size != null) {
5027
4844
  this.compressed_page_size = args.compressed_page_size;
5028
4845
  } else {
5029
- throw new thrift24.Thrift.TProtocolException(
5030
- thrift24.Thrift.TProtocolExceptionType.UNKNOWN,
5031
- "Required field[compressed_page_size] is unset!"
5032
- );
4846
+ throw new thrift24.Thrift.TProtocolException(thrift24.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[compressed_page_size] is unset!");
5033
4847
  }
5034
4848
  if (args != null && args.crc != null) {
5035
4849
  this.crc = args.crc;
@@ -5178,25 +4992,19 @@ var PageHeader = class {
5178
4992
  if (_args.type !== void 0 && _args.uncompressed_page_size !== void 0 && _args.compressed_page_size !== void 0) {
5179
4993
  return new PageHeader(_args);
5180
4994
  } else {
5181
- throw new thrift24.Thrift.TProtocolException(
5182
- thrift24.Thrift.TProtocolExceptionType.UNKNOWN,
5183
- "Unable to read PageHeader from input"
5184
- );
4995
+ throw new thrift24.Thrift.TProtocolException(thrift24.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read PageHeader from input");
5185
4996
  }
5186
4997
  }
5187
4998
  };
5188
4999
 
5189
- // src/parquetjs/parquet-thrift/KeyValue.ts
5000
+ // dist/parquetjs/parquet-thrift/KeyValue.js
5190
5001
  var thrift25 = __toESM(require("thrift"), 1);
5191
5002
  var KeyValue = class {
5192
5003
  constructor(args) {
5193
5004
  if (args != null && args.key != null) {
5194
5005
  this.key = args.key;
5195
5006
  } else {
5196
- throw new thrift25.Thrift.TProtocolException(
5197
- thrift25.Thrift.TProtocolExceptionType.UNKNOWN,
5198
- "Required field[key] is unset!"
5199
- );
5007
+ throw new thrift25.Thrift.TProtocolException(thrift25.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[key] is unset!");
5200
5008
  }
5201
5009
  if (args != null && args.value != null) {
5202
5010
  this.value = args.value;
@@ -5255,41 +5063,29 @@ var KeyValue = class {
5255
5063
  if (_args.key !== void 0) {
5256
5064
  return new KeyValue(_args);
5257
5065
  } else {
5258
- throw new thrift25.Thrift.TProtocolException(
5259
- thrift25.Thrift.TProtocolExceptionType.UNKNOWN,
5260
- "Unable to read KeyValue from input"
5261
- );
5066
+ throw new thrift25.Thrift.TProtocolException(thrift25.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read KeyValue from input");
5262
5067
  }
5263
5068
  }
5264
5069
  };
5265
5070
 
5266
- // src/parquetjs/parquet-thrift/SortingColumn.ts
5071
+ // dist/parquetjs/parquet-thrift/SortingColumn.js
5267
5072
  var thrift26 = __toESM(require("thrift"), 1);
5268
5073
  var SortingColumn = class {
5269
5074
  constructor(args) {
5270
5075
  if (args != null && args.column_idx != null) {
5271
5076
  this.column_idx = args.column_idx;
5272
5077
  } else {
5273
- throw new thrift26.Thrift.TProtocolException(
5274
- thrift26.Thrift.TProtocolExceptionType.UNKNOWN,
5275
- "Required field[column_idx] is unset!"
5276
- );
5078
+ throw new thrift26.Thrift.TProtocolException(thrift26.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[column_idx] is unset!");
5277
5079
  }
5278
5080
  if (args != null && args.descending != null) {
5279
5081
  this.descending = args.descending;
5280
5082
  } else {
5281
- throw new thrift26.Thrift.TProtocolException(
5282
- thrift26.Thrift.TProtocolExceptionType.UNKNOWN,
5283
- "Required field[descending] is unset!"
5284
- );
5083
+ throw new thrift26.Thrift.TProtocolException(thrift26.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[descending] is unset!");
5285
5084
  }
5286
5085
  if (args != null && args.nulls_first != null) {
5287
5086
  this.nulls_first = args.nulls_first;
5288
5087
  } else {
5289
- throw new thrift26.Thrift.TProtocolException(
5290
- thrift26.Thrift.TProtocolExceptionType.UNKNOWN,
5291
- "Required field[nulls_first] is unset!"
5292
- );
5088
+ throw new thrift26.Thrift.TProtocolException(thrift26.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[nulls_first] is unset!");
5293
5089
  }
5294
5090
  }
5295
5091
  write(output) {
@@ -5358,41 +5154,29 @@ var SortingColumn = class {
5358
5154
  if (_args.column_idx !== void 0 && _args.descending !== void 0 && _args.nulls_first !== void 0) {
5359
5155
  return new SortingColumn(_args);
5360
5156
  } else {
5361
- throw new thrift26.Thrift.TProtocolException(
5362
- thrift26.Thrift.TProtocolExceptionType.UNKNOWN,
5363
- "Unable to read SortingColumn from input"
5364
- );
5157
+ throw new thrift26.Thrift.TProtocolException(thrift26.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read SortingColumn from input");
5365
5158
  }
5366
5159
  }
5367
5160
  };
5368
5161
 
5369
- // src/parquetjs/parquet-thrift/PageEncodingStats.ts
5162
+ // dist/parquetjs/parquet-thrift/PageEncodingStats.js
5370
5163
  var thrift27 = __toESM(require("thrift"), 1);
5371
5164
  var PageEncodingStats = class {
5372
5165
  constructor(args) {
5373
5166
  if (args != null && args.page_type != null) {
5374
5167
  this.page_type = args.page_type;
5375
5168
  } else {
5376
- throw new thrift27.Thrift.TProtocolException(
5377
- thrift27.Thrift.TProtocolExceptionType.UNKNOWN,
5378
- "Required field[page_type] is unset!"
5379
- );
5169
+ throw new thrift27.Thrift.TProtocolException(thrift27.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[page_type] is unset!");
5380
5170
  }
5381
5171
  if (args != null && args.encoding != null) {
5382
5172
  this.encoding = args.encoding;
5383
5173
  } else {
5384
- throw new thrift27.Thrift.TProtocolException(
5385
- thrift27.Thrift.TProtocolExceptionType.UNKNOWN,
5386
- "Required field[encoding] is unset!"
5387
- );
5174
+ throw new thrift27.Thrift.TProtocolException(thrift27.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[encoding] is unset!");
5388
5175
  }
5389
5176
  if (args != null && args.count != null) {
5390
5177
  this.count = args.count;
5391
5178
  } else {
5392
- throw new thrift27.Thrift.TProtocolException(
5393
- thrift27.Thrift.TProtocolExceptionType.UNKNOWN,
5394
- "Required field[count] is unset!"
5395
- );
5179
+ throw new thrift27.Thrift.TProtocolException(thrift27.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[count] is unset!");
5396
5180
  }
5397
5181
  }
5398
5182
  write(output) {
@@ -5461,15 +5245,12 @@ var PageEncodingStats = class {
5461
5245
  if (_args.page_type !== void 0 && _args.encoding !== void 0 && _args.count !== void 0) {
5462
5246
  return new PageEncodingStats(_args);
5463
5247
  } else {
5464
- throw new thrift27.Thrift.TProtocolException(
5465
- thrift27.Thrift.TProtocolExceptionType.UNKNOWN,
5466
- "Unable to read PageEncodingStats from input"
5467
- );
5248
+ throw new thrift27.Thrift.TProtocolException(thrift27.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read PageEncodingStats from input");
5468
5249
  }
5469
5250
  }
5470
5251
  };
5471
5252
 
5472
- // src/parquetjs/parquet-thrift/ColumnMetaData.ts
5253
+ // dist/parquetjs/parquet-thrift/ColumnMetaData.js
5473
5254
  var import_node_int642 = __toESM(require("node-int64"), 1);
5474
5255
  var thrift28 = __toESM(require("thrift"), 1);
5475
5256
  var ColumnMetaData = class {
@@ -5477,34 +5258,22 @@ var ColumnMetaData = class {
5477
5258
  if (args != null && args.type != null) {
5478
5259
  this.type = args.type;
5479
5260
  } else {
5480
- throw new thrift28.Thrift.TProtocolException(
5481
- thrift28.Thrift.TProtocolExceptionType.UNKNOWN,
5482
- "Required field[type] is unset!"
5483
- );
5261
+ throw new thrift28.Thrift.TProtocolException(thrift28.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[type] is unset!");
5484
5262
  }
5485
5263
  if (args != null && args.encodings != null) {
5486
5264
  this.encodings = args.encodings;
5487
5265
  } else {
5488
- throw new thrift28.Thrift.TProtocolException(
5489
- thrift28.Thrift.TProtocolExceptionType.UNKNOWN,
5490
- "Required field[encodings] is unset!"
5491
- );
5266
+ throw new thrift28.Thrift.TProtocolException(thrift28.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[encodings] is unset!");
5492
5267
  }
5493
5268
  if (args != null && args.path_in_schema != null) {
5494
5269
  this.path_in_schema = args.path_in_schema;
5495
5270
  } else {
5496
- throw new thrift28.Thrift.TProtocolException(
5497
- thrift28.Thrift.TProtocolExceptionType.UNKNOWN,
5498
- "Required field[path_in_schema] is unset!"
5499
- );
5271
+ throw new thrift28.Thrift.TProtocolException(thrift28.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[path_in_schema] is unset!");
5500
5272
  }
5501
5273
  if (args != null && args.codec != null) {
5502
5274
  this.codec = args.codec;
5503
5275
  } else {
5504
- throw new thrift28.Thrift.TProtocolException(
5505
- thrift28.Thrift.TProtocolExceptionType.UNKNOWN,
5506
- "Required field[codec] is unset!"
5507
- );
5276
+ throw new thrift28.Thrift.TProtocolException(thrift28.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[codec] is unset!");
5508
5277
  }
5509
5278
  if (args != null && args.num_values != null) {
5510
5279
  if (typeof args.num_values === "number") {
@@ -5513,10 +5282,7 @@ var ColumnMetaData = class {
5513
5282
  this.num_values = args.num_values;
5514
5283
  }
5515
5284
  } else {
5516
- throw new thrift28.Thrift.TProtocolException(
5517
- thrift28.Thrift.TProtocolExceptionType.UNKNOWN,
5518
- "Required field[num_values] is unset!"
5519
- );
5285
+ throw new thrift28.Thrift.TProtocolException(thrift28.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[num_values] is unset!");
5520
5286
  }
5521
5287
  if (args != null && args.total_uncompressed_size != null) {
5522
5288
  if (typeof args.total_uncompressed_size === "number") {
@@ -5525,10 +5291,7 @@ var ColumnMetaData = class {
5525
5291
  this.total_uncompressed_size = args.total_uncompressed_size;
5526
5292
  }
5527
5293
  } else {
5528
- throw new thrift28.Thrift.TProtocolException(
5529
- thrift28.Thrift.TProtocolExceptionType.UNKNOWN,
5530
- "Required field[total_uncompressed_size] is unset!"
5531
- );
5294
+ throw new thrift28.Thrift.TProtocolException(thrift28.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[total_uncompressed_size] is unset!");
5532
5295
  }
5533
5296
  if (args != null && args.total_compressed_size != null) {
5534
5297
  if (typeof args.total_compressed_size === "number") {
@@ -5537,10 +5300,7 @@ var ColumnMetaData = class {
5537
5300
  this.total_compressed_size = args.total_compressed_size;
5538
5301
  }
5539
5302
  } else {
5540
- throw new thrift28.Thrift.TProtocolException(
5541
- thrift28.Thrift.TProtocolExceptionType.UNKNOWN,
5542
- "Required field[total_compressed_size] is unset!"
5543
- );
5303
+ throw new thrift28.Thrift.TProtocolException(thrift28.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[total_compressed_size] is unset!");
5544
5304
  }
5545
5305
  if (args != null && args.key_value_metadata != null) {
5546
5306
  this.key_value_metadata = args.key_value_metadata;
@@ -5552,10 +5312,7 @@ var ColumnMetaData = class {
5552
5312
  this.data_page_offset = args.data_page_offset;
5553
5313
  }
5554
5314
  } else {
5555
- throw new thrift28.Thrift.TProtocolException(
5556
- thrift28.Thrift.TProtocolExceptionType.UNKNOWN,
5557
- "Required field[data_page_offset] is unset!"
5558
- );
5315
+ throw new thrift28.Thrift.TProtocolException(thrift28.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[data_page_offset] is unset!");
5559
5316
  }
5560
5317
  if (args != null && args.index_page_offset != null) {
5561
5318
  if (typeof args.index_page_offset === "number") {
@@ -5818,15 +5575,12 @@ var ColumnMetaData = class {
5818
5575
  if (_args.type !== void 0 && _args.encodings !== void 0 && _args.path_in_schema !== void 0 && _args.codec !== void 0 && _args.num_values !== void 0 && _args.total_uncompressed_size !== void 0 && _args.total_compressed_size !== void 0 && _args.data_page_offset !== void 0) {
5819
5576
  return new ColumnMetaData(_args);
5820
5577
  } else {
5821
- throw new thrift28.Thrift.TProtocolException(
5822
- thrift28.Thrift.TProtocolExceptionType.UNKNOWN,
5823
- "Unable to read ColumnMetaData from input"
5824
- );
5578
+ throw new thrift28.Thrift.TProtocolException(thrift28.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read ColumnMetaData from input");
5825
5579
  }
5826
5580
  }
5827
5581
  };
5828
5582
 
5829
- // src/parquetjs/parquet-thrift/ColumnChunk.ts
5583
+ // dist/parquetjs/parquet-thrift/ColumnChunk.js
5830
5584
  var import_node_int643 = __toESM(require("node-int64"), 1);
5831
5585
  var thrift29 = __toESM(require("thrift"), 1);
5832
5586
  var ColumnChunk = class {
@@ -5841,10 +5595,7 @@ var ColumnChunk = class {
5841
5595
  this.file_offset = args.file_offset;
5842
5596
  }
5843
5597
  } else {
5844
- throw new thrift29.Thrift.TProtocolException(
5845
- thrift29.Thrift.TProtocolExceptionType.UNKNOWN,
5846
- "Required field[file_offset] is unset!"
5847
- );
5598
+ throw new thrift29.Thrift.TProtocolException(thrift29.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[file_offset] is unset!");
5848
5599
  }
5849
5600
  if (args != null && args.meta_data != null) {
5850
5601
  this.meta_data = args.meta_data;
@@ -5988,15 +5739,12 @@ var ColumnChunk = class {
5988
5739
  if (_args.file_offset !== void 0) {
5989
5740
  return new ColumnChunk(_args);
5990
5741
  } else {
5991
- throw new thrift29.Thrift.TProtocolException(
5992
- thrift29.Thrift.TProtocolExceptionType.UNKNOWN,
5993
- "Unable to read ColumnChunk from input"
5994
- );
5742
+ throw new thrift29.Thrift.TProtocolException(thrift29.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read ColumnChunk from input");
5995
5743
  }
5996
5744
  }
5997
5745
  };
5998
5746
 
5999
- // src/parquetjs/parquet-thrift/RowGroup.ts
5747
+ // dist/parquetjs/parquet-thrift/RowGroup.js
6000
5748
  var import_node_int644 = __toESM(require("node-int64"), 1);
6001
5749
  var thrift30 = __toESM(require("thrift"), 1);
6002
5750
  var RowGroup = class {
@@ -6004,10 +5752,7 @@ var RowGroup = class {
6004
5752
  if (args != null && args.columns != null) {
6005
5753
  this.columns = args.columns;
6006
5754
  } else {
6007
- throw new thrift30.Thrift.TProtocolException(
6008
- thrift30.Thrift.TProtocolExceptionType.UNKNOWN,
6009
- "Required field[columns] is unset!"
6010
- );
5755
+ throw new thrift30.Thrift.TProtocolException(thrift30.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[columns] is unset!");
6011
5756
  }
6012
5757
  if (args != null && args.total_byte_size != null) {
6013
5758
  if (typeof args.total_byte_size === "number") {
@@ -6016,10 +5761,7 @@ var RowGroup = class {
6016
5761
  this.total_byte_size = args.total_byte_size;
6017
5762
  }
6018
5763
  } else {
6019
- throw new thrift30.Thrift.TProtocolException(
6020
- thrift30.Thrift.TProtocolExceptionType.UNKNOWN,
6021
- "Required field[total_byte_size] is unset!"
6022
- );
5764
+ throw new thrift30.Thrift.TProtocolException(thrift30.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[total_byte_size] is unset!");
6023
5765
  }
6024
5766
  if (args != null && args.num_rows != null) {
6025
5767
  if (typeof args.num_rows === "number") {
@@ -6028,10 +5770,7 @@ var RowGroup = class {
6028
5770
  this.num_rows = args.num_rows;
6029
5771
  }
6030
5772
  } else {
6031
- throw new thrift30.Thrift.TProtocolException(
6032
- thrift30.Thrift.TProtocolExceptionType.UNKNOWN,
6033
- "Required field[num_rows] is unset!"
6034
- );
5773
+ throw new thrift30.Thrift.TProtocolException(thrift30.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[num_rows] is unset!");
6035
5774
  }
6036
5775
  if (args != null && args.sorting_columns != null) {
6037
5776
  this.sorting_columns = args.sorting_columns;
@@ -6138,15 +5877,12 @@ var RowGroup = class {
6138
5877
  if (_args.columns !== void 0 && _args.total_byte_size !== void 0 && _args.num_rows !== void 0) {
6139
5878
  return new RowGroup(_args);
6140
5879
  } else {
6141
- throw new thrift30.Thrift.TProtocolException(
6142
- thrift30.Thrift.TProtocolExceptionType.UNKNOWN,
6143
- "Unable to read RowGroup from input"
6144
- );
5880
+ throw new thrift30.Thrift.TProtocolException(thrift30.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read RowGroup from input");
6145
5881
  }
6146
5882
  }
6147
5883
  };
6148
5884
 
6149
- // src/parquetjs/parquet-thrift/TypeDefinedOrder.ts
5885
+ // dist/parquetjs/parquet-thrift/TypeDefinedOrder.js
6150
5886
  var thrift31 = __toESM(require("thrift"), 1);
6151
5887
  var TypeDefinedOrder = class {
6152
5888
  constructor() {
@@ -6178,11 +5914,11 @@ var TypeDefinedOrder = class {
6178
5914
  }
6179
5915
  };
6180
5916
 
6181
- // src/parquetjs/parquet-thrift/FileMetaData.ts
5917
+ // dist/parquetjs/parquet-thrift/FileMetaData.js
6182
5918
  var import_node_int645 = __toESM(require("node-int64"), 1);
6183
5919
  var thrift33 = __toESM(require("thrift"), 1);
6184
5920
 
6185
- // src/parquetjs/parquet-thrift/ColumnOrder.ts
5921
+ // dist/parquetjs/parquet-thrift/ColumnOrder.js
6186
5922
  var thrift32 = __toESM(require("thrift"), 1);
6187
5923
  var ColumnOrder = class {
6188
5924
  constructor(args) {
@@ -6193,15 +5929,9 @@ var ColumnOrder = class {
6193
5929
  this.TYPE_ORDER = args.TYPE_ORDER;
6194
5930
  }
6195
5931
  if (_fieldsSet > 1) {
6196
- throw new thrift32.Thrift.TProtocolException(
6197
- thrift32.Thrift.TProtocolExceptionType.INVALID_DATA,
6198
- "Cannot read a TUnion with more than one set value!"
6199
- );
5932
+ throw new thrift32.Thrift.TProtocolException(thrift32.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with more than one set value!");
6200
5933
  } else if (_fieldsSet < 1) {
6201
- throw new thrift32.Thrift.TProtocolException(
6202
- thrift32.Thrift.TProtocolExceptionType.INVALID_DATA,
6203
- "Cannot read a TUnion with no set value!"
6204
- );
5934
+ throw new thrift32.Thrift.TProtocolException(thrift32.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with no set value!");
6205
5935
  }
6206
5936
  }
6207
5937
  }
@@ -6248,45 +5978,30 @@ var ColumnOrder = class {
6248
5978
  }
6249
5979
  input.readStructEnd();
6250
5980
  if (_fieldsSet > 1) {
6251
- throw new thrift32.Thrift.TProtocolException(
6252
- thrift32.Thrift.TProtocolExceptionType.INVALID_DATA,
6253
- "Cannot read a TUnion with more than one set value!"
6254
- );
5981
+ throw new thrift32.Thrift.TProtocolException(thrift32.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with more than one set value!");
6255
5982
  } else if (_fieldsSet < 1) {
6256
- throw new thrift32.Thrift.TProtocolException(
6257
- thrift32.Thrift.TProtocolExceptionType.INVALID_DATA,
6258
- "Cannot read a TUnion with no set value!"
6259
- );
5983
+ throw new thrift32.Thrift.TProtocolException(thrift32.Thrift.TProtocolExceptionType.INVALID_DATA, "Cannot read a TUnion with no set value!");
6260
5984
  }
6261
5985
  if (_returnValue !== null) {
6262
5986
  return _returnValue;
6263
5987
  } else {
6264
- throw new thrift32.Thrift.TProtocolException(
6265
- thrift32.Thrift.TProtocolExceptionType.UNKNOWN,
6266
- "Unable to read data for TUnion"
6267
- );
5988
+ throw new thrift32.Thrift.TProtocolException(thrift32.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read data for TUnion");
6268
5989
  }
6269
5990
  }
6270
5991
  };
6271
5992
 
6272
- // src/parquetjs/parquet-thrift/FileMetaData.ts
5993
+ // dist/parquetjs/parquet-thrift/FileMetaData.js
6273
5994
  var FileMetaData = class {
6274
5995
  constructor(args = null) {
6275
5996
  if (args != null && args.version != null) {
6276
5997
  this.version = args.version;
6277
5998
  } else {
6278
- throw new thrift33.Thrift.TProtocolException(
6279
- thrift33.Thrift.TProtocolExceptionType.UNKNOWN,
6280
- "Required field[version] is unset!"
6281
- );
5999
+ throw new thrift33.Thrift.TProtocolException(thrift33.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[version] is unset!");
6282
6000
  }
6283
6001
  if (args != null && args.schema != null) {
6284
6002
  this.schema = args.schema;
6285
6003
  } else {
6286
- throw new thrift33.Thrift.TProtocolException(
6287
- thrift33.Thrift.TProtocolExceptionType.UNKNOWN,
6288
- "Required field[schema] is unset!"
6289
- );
6004
+ throw new thrift33.Thrift.TProtocolException(thrift33.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[schema] is unset!");
6290
6005
  }
6291
6006
  if (args != null && args.num_rows != null) {
6292
6007
  if (typeof args.num_rows === "number") {
@@ -6295,18 +6010,12 @@ var FileMetaData = class {
6295
6010
  this.num_rows = args.num_rows;
6296
6011
  }
6297
6012
  } else {
6298
- throw new thrift33.Thrift.TProtocolException(
6299
- thrift33.Thrift.TProtocolExceptionType.UNKNOWN,
6300
- "Required field[num_rows] is unset!"
6301
- );
6013
+ throw new thrift33.Thrift.TProtocolException(thrift33.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[num_rows] is unset!");
6302
6014
  }
6303
6015
  if (args != null && args.row_groups != null) {
6304
6016
  this.row_groups = args.row_groups;
6305
6017
  } else {
6306
- throw new thrift33.Thrift.TProtocolException(
6307
- thrift33.Thrift.TProtocolExceptionType.UNKNOWN,
6308
- "Required field[row_groups] is unset!"
6309
- );
6018
+ throw new thrift33.Thrift.TProtocolException(thrift33.Thrift.TProtocolExceptionType.UNKNOWN, "Required field[row_groups] is unset!");
6310
6019
  }
6311
6020
  if (args != null && args.key_value_metadata != null) {
6312
6021
  this.key_value_metadata = args.key_value_metadata;
@@ -6480,23 +6189,20 @@ var FileMetaData = class {
6480
6189
  if (_args.version !== void 0 && _args.schema !== void 0 && _args.num_rows !== void 0 && _args.row_groups !== void 0) {
6481
6190
  return new FileMetaData(_args);
6482
6191
  } else {
6483
- throw new thrift33.Thrift.TProtocolException(
6484
- thrift33.Thrift.TProtocolExceptionType.UNKNOWN,
6485
- "Unable to read FileMetaData from input"
6486
- );
6192
+ throw new thrift33.Thrift.TProtocolException(thrift33.Thrift.TProtocolExceptionType.UNKNOWN, "Unable to read FileMetaData from input");
6487
6193
  }
6488
6194
  }
6489
6195
  };
6490
6196
 
6491
- // src/lib/constants.ts
6492
- var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
6197
+ // dist/lib/constants.js
6198
+ var VERSION = true ? "4.2.0-alpha.4" : "latest";
6493
6199
  var PARQUET_WASM_URL = "https://unpkg.com/parquet-wasm@0.6.0-beta.1/esm/arrow1_bg.wasm";
6494
6200
  var PARQUET_MAGIC = "PAR1";
6495
6201
  var PARQUET_MAGIC_ENCRYPTED = "PARE";
6496
6202
  var PARQUET_RDLVL_TYPE = "INT32";
6497
6203
  var PARQUET_RDLVL_ENCODING = "RLE";
6498
6204
 
6499
- // src/parquetjs/utils/read-utils.ts
6205
+ // dist/parquetjs/utils/read-utils.js
6500
6206
  var UFramedTransport = class extends import_thrift.TFramedTransport {
6501
6207
  constructor() {
6502
6208
  super(...arguments);
@@ -6569,7 +6275,7 @@ function fieldIndexOf(arr, elem) {
6569
6275
  return -1;
6570
6276
  }
6571
6277
 
6572
- // src/parquetjs/parser/decoders.ts
6278
+ // dist/parquetjs/parser/decoders.js
6573
6279
  async function decodeDataPages(buffer, context) {
6574
6280
  const cursor = {
6575
6281
  buffer,
@@ -6698,11 +6404,7 @@ async function decodeDataPage(cursor, header, context) {
6698
6404
  const valueCount = (_a = header.data_page_header) == null ? void 0 : _a.num_values;
6699
6405
  let dataCursor = cursor;
6700
6406
  if (context.compression !== "UNCOMPRESSED") {
6701
- const valuesBuf = await decompress(
6702
- context.compression,
6703
- cursor.buffer.slice(cursor.offset, cursorEnd),
6704
- header.uncompressed_page_size
6705
- );
6407
+ const valuesBuf = await decompress(context.compression, cursor.buffer.slice(cursor.offset, cursorEnd), header.uncompressed_page_size);
6706
6408
  dataCursor = {
6707
6409
  buffer: valuesBuf,
6708
6410
  offset: 0,
@@ -6710,10 +6412,7 @@ async function decodeDataPage(cursor, header, context) {
6710
6412
  };
6711
6413
  cursor.offset = cursorEnd;
6712
6414
  }
6713
- const rLevelEncoding = getThriftEnum(
6714
- Encoding,
6715
- (_b = header.data_page_header) == null ? void 0 : _b.repetition_level_encoding
6716
- );
6415
+ const rLevelEncoding = getThriftEnum(Encoding, (_b = header.data_page_header) == null ? void 0 : _b.repetition_level_encoding);
6717
6416
  let rLevels = new Array(valueCount);
6718
6417
  if (context.column.rLevelMax > 0) {
6719
6418
  rLevels = decodeValues4(PARQUET_RDLVL_TYPE, rLevelEncoding, dataCursor, valueCount, {
@@ -6724,10 +6423,7 @@ async function decodeDataPage(cursor, header, context) {
6724
6423
  } else {
6725
6424
  rLevels.fill(0);
6726
6425
  }
6727
- const dLevelEncoding = getThriftEnum(
6728
- Encoding,
6729
- (_c = header.data_page_header) == null ? void 0 : _c.definition_level_encoding
6730
- );
6426
+ const dLevelEncoding = getThriftEnum(Encoding, (_c = header.data_page_header) == null ? void 0 : _c.definition_level_encoding);
6731
6427
  let dLevels = new Array(valueCount);
6732
6428
  if (context.column.dLevelMax > 0) {
6733
6429
  dLevels = decodeValues4(PARQUET_RDLVL_TYPE, dLevelEncoding, dataCursor, valueCount, {
@@ -6749,13 +6445,7 @@ async function decodeDataPage(cursor, header, context) {
6749
6445
  typeLength: context.column.typeLength,
6750
6446
  bitWidth: context.column.typeLength
6751
6447
  };
6752
- const values = decodeValues4(
6753
- context.column.primitiveType,
6754
- valueEncoding,
6755
- dataCursor,
6756
- valueCountNonNull,
6757
- decodeOptions
6758
- );
6448
+ const values = decodeValues4(context.column.primitiveType, valueEncoding, dataCursor, valueCountNonNull, decodeOptions);
6759
6449
  return {
6760
6450
  dlevels: dLevels,
6761
6451
  rlevels: rLevels,
@@ -6769,10 +6459,7 @@ async function decodeDataPageV2(cursor, header, context) {
6769
6459
  const cursorEnd = cursor.offset + header.compressed_page_size;
6770
6460
  const valueCount = (_a = header.data_page_header_v2) == null ? void 0 : _a.num_values;
6771
6461
  const valueCountNonNull = valueCount - ((_b = header.data_page_header_v2) == null ? void 0 : _b.num_nulls);
6772
- const valueEncoding = getThriftEnum(
6773
- Encoding,
6774
- (_c = header.data_page_header_v2) == null ? void 0 : _c.encoding
6775
- );
6462
+ const valueEncoding = getThriftEnum(Encoding, (_c = header.data_page_header_v2) == null ? void 0 : _c.encoding);
6776
6463
  let rLevels = new Array(valueCount);
6777
6464
  if (context.column.rLevelMax > 0) {
6778
6465
  rLevels = decodeValues4(PARQUET_RDLVL_TYPE, PARQUET_RDLVL_ENCODING, cursor, valueCount, {
@@ -6793,11 +6480,7 @@ async function decodeDataPageV2(cursor, header, context) {
6793
6480
  }
6794
6481
  let valuesBufCursor = cursor;
6795
6482
  if ((_d = header.data_page_header_v2) == null ? void 0 : _d.is_compressed) {
6796
- const valuesBuf = await decompress(
6797
- context.compression,
6798
- cursor.buffer.slice(cursor.offset, cursorEnd),
6799
- header.uncompressed_page_size
6800
- );
6483
+ const valuesBuf = await decompress(context.compression, cursor.buffer.slice(cursor.offset, cursorEnd), header.uncompressed_page_size);
6801
6484
  valuesBufCursor = {
6802
6485
  buffer: valuesBuf,
6803
6486
  offset: 0,
@@ -6809,13 +6492,7 @@ async function decodeDataPageV2(cursor, header, context) {
6809
6492
  typeLength: context.column.typeLength,
6810
6493
  bitWidth: context.column.typeLength
6811
6494
  };
6812
- const values = decodeValues4(
6813
- context.column.primitiveType,
6814
- valueEncoding,
6815
- valuesBufCursor,
6816
- valueCountNonNull,
6817
- decodeOptions
6818
- );
6495
+ const values = decodeValues4(context.column.primitiveType, valueEncoding, valuesBufCursor, valueCountNonNull, decodeOptions);
6819
6496
  return {
6820
6497
  dlevels: dLevels,
6821
6498
  rlevels: rLevels,
@@ -6834,11 +6511,7 @@ async function decodeDictionaryPage(cursor, pageHeader, context) {
6834
6511
  };
6835
6512
  cursor.offset = cursorEnd;
6836
6513
  if (context.compression !== "UNCOMPRESSED") {
6837
- const valuesBuf = await decompress(
6838
- context.compression,
6839
- dictCursor.buffer.slice(dictCursor.offset, cursorEnd),
6840
- pageHeader.uncompressed_page_size
6841
- );
6514
+ const valuesBuf = await decompress(context.compression, dictCursor.buffer.slice(dictCursor.offset, cursorEnd), pageHeader.uncompressed_page_size);
6842
6515
  dictCursor = {
6843
6516
  buffer: valuesBuf,
6844
6517
  offset: 0,
@@ -6873,12 +6546,12 @@ function preserveBinary(d) {
6873
6546
  return d.toString();
6874
6547
  }
6875
6548
 
6876
- // src/parquetjs/parser/parquet-reader.ts
6877
- var _ParquetReader = class {
6549
+ // dist/parquetjs/parser/parquet-reader.js
6550
+ var ParquetReader = class {
6878
6551
  constructor(file, props) {
6879
6552
  this.metadata = null;
6880
6553
  this.file = file;
6881
- this.props = { ..._ParquetReader.defaultProps, ...props };
6554
+ this.props = { ...ParquetReader.defaultProps, ...props };
6882
6555
  }
6883
6556
  close() {
6884
6557
  this.file.close();
@@ -6901,18 +6574,12 @@ var _ParquetReader = class {
6901
6574
  }
6902
6575
  /** Iterate over the raw row groups */
6903
6576
  async *rowGroupIterator(props) {
6904
- const columnList = ((props == null ? void 0 : props.columnList) || []).map(
6905
- (x) => Array.isArray(x) ? x : [x]
6906
- );
6577
+ const columnList = ((props == null ? void 0 : props.columnList) || []).map((x) => Array.isArray(x) ? x : [x]);
6907
6578
  const metadata = await this.getFileMetadata();
6908
6579
  const schema = await this.getSchema();
6909
6580
  const rowGroupCount = (metadata == null ? void 0 : metadata.row_groups.length) || 0;
6910
6581
  for (let rowGroupIndex = 0; rowGroupIndex < rowGroupCount; rowGroupIndex++) {
6911
- const rowGroup = await this.readRowGroup(
6912
- schema,
6913
- metadata.row_groups[rowGroupIndex],
6914
- columnList
6915
- );
6582
+ const rowGroup = await this.readRowGroup(schema, metadata.row_groups[rowGroupIndex], columnList);
6916
6583
  yield rowGroup;
6917
6584
  }
6918
6585
  }
@@ -7009,17 +6676,11 @@ var _ParquetReader = class {
7009
6676
  if (type !== field.primitiveType) {
7010
6677
  throw new Error(`chunk type not matching schema: ${type}`);
7011
6678
  }
7012
- const compression = getThriftEnum(
7013
- CompressionCodec,
7014
- (_c = colChunk.meta_data) == null ? void 0 : _c.codec
7015
- );
6679
+ const compression = getThriftEnum(CompressionCodec, (_c = colChunk.meta_data) == null ? void 0 : _c.codec);
7016
6680
  const pagesOffset = Number((_d = colChunk.meta_data) == null ? void 0 : _d.data_page_offset);
7017
6681
  let pagesSize = Number((_e = colChunk.meta_data) == null ? void 0 : _e.total_compressed_size);
7018
6682
  if (!colChunk.file_path) {
7019
- pagesSize = Math.min(
7020
- this.file.size - pagesOffset,
7021
- Number((_f = colChunk.meta_data) == null ? void 0 : _f.total_compressed_size)
7022
- );
6683
+ pagesSize = Math.min(this.file.size - pagesOffset, Number((_f = colChunk.meta_data) == null ? void 0 : _f.total_compressed_size));
7023
6684
  }
7024
6685
  const context = {
7025
6686
  type,
@@ -7054,10 +6715,7 @@ var _ParquetReader = class {
7054
6715
  if (dictionaryPageOffset === 0) {
7055
6716
  return [];
7056
6717
  }
7057
- const dictionarySize = Math.min(
7058
- this.file.size - dictionaryPageOffset,
7059
- this.props.defaultDictionarySize
7060
- );
6718
+ const dictionarySize = Math.min(this.file.size - dictionaryPageOffset, this.props.defaultDictionarySize);
7061
6719
  const arrayBuffer = await this.file.read(dictionaryPageOffset, dictionarySize);
7062
6720
  const pagesBuf = Buffer.from(arrayBuffer);
7063
6721
  const cursor = { buffer: pagesBuf, offset: 0, size: pagesBuf.length };
@@ -7065,13 +6723,12 @@ var _ParquetReader = class {
7065
6723
  return decodedPage.dictionary;
7066
6724
  }
7067
6725
  };
7068
- var ParquetReader = _ParquetReader;
7069
6726
  ParquetReader.defaultProps = {
7070
6727
  defaultDictionarySize: 1e6,
7071
6728
  preserveBinary: false
7072
6729
  };
7073
6730
 
7074
- // src/lib/arrow/convert-schema-from-parquet.ts
6731
+ // dist/lib/arrow/convert-schema-from-parquet.js
7075
6732
  var PARQUET_TYPE_MAPPING = {
7076
6733
  BOOLEAN: "bool",
7077
6734
  INT32: "int32",
@@ -7153,7 +6810,7 @@ function getSchemaMetadata(parquetMetadata) {
7153
6810
  return metadata;
7154
6811
  }
7155
6812
 
7156
- // src/lib/parsers/get-parquet-schema.ts
6813
+ // dist/lib/parsers/get-parquet-schema.js
7157
6814
  var import_gis = require("@loaders.gl/gis");
7158
6815
  async function getSchemaFromParquetReader(reader) {
7159
6816
  const parquetSchema = await reader.getSchema();
@@ -7164,7 +6821,7 @@ async function getSchemaFromParquetReader(reader) {
7164
6821
  return schema;
7165
6822
  }
7166
6823
 
7167
- // src/lib/parsers/parse-parquet.ts
6824
+ // dist/lib/parsers/parse-parquet.js
7168
6825
  async function parseParquetFile(file, options) {
7169
6826
  var _a, _b;
7170
6827
  installBufferPolyfill();
@@ -7221,7 +6878,7 @@ function convertTable(objectRowTable, shape) {
7221
6878
  }
7222
6879
  }
7223
6880
 
7224
- // src/lib/parsers/parse-geoparquet.ts
6881
+ // dist/lib/parsers/parse-geoparquet.js
7225
6882
  var import_gis2 = require("@loaders.gl/gis");
7226
6883
  var import_wkt = require("@loaders.gl/wkt");
7227
6884
  async function parseGeoParquetFile(file, options) {
@@ -7277,7 +6934,7 @@ function convertBatch(objectRowBatch, shape) {
7277
6934
  }
7278
6935
  }
7279
6936
 
7280
- // src/lib/parsers/parse-parquet-to-columns.ts
6937
+ // dist/lib/parsers/parse-parquet-to-columns.js
7281
6938
  async function parseParquetFileInColumns(file, options) {
7282
6939
  installBufferPolyfill();
7283
6940
  for await (const batch of parseParquetFileInColumnarBatches(file, options)) {
@@ -7309,8 +6966,8 @@ function convertRowGroupToTableBatch(rowGroup, parquetSchema, schema) {
7309
6966
  };
7310
6967
  }
7311
6968
 
7312
- // src/parquet-loader.ts
7313
- var VERSION2 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
6969
+ // dist/parquet-loader.js
6970
+ var VERSION2 = true ? "4.2.0-alpha.4" : "latest";
7314
6971
  var ParquetWorkerLoader = {
7315
6972
  name: "Apache Parquet",
7316
6973
  id: "parquet",
@@ -7390,8 +7047,8 @@ var ParquetColumnarLoader = {
7390
7047
  parseFileInBatches: parseParquetFileInColumnarBatches
7391
7048
  };
7392
7049
 
7393
- // src/parquet-writer.ts
7394
- var VERSION3 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
7050
+ // dist/parquet-writer.js
7051
+ var VERSION3 = true ? "4.2.0-alpha.4" : "latest";
7395
7052
  var ParquetWriter = {
7396
7053
  name: "Apache Parquet",
7397
7054
  id: "parquet",
@@ -7408,10 +7065,10 @@ function encodeSync(data, options) {
7408
7065
  return new ArrayBuffer(0);
7409
7066
  }
7410
7067
 
7411
- // src/lib/wasm/parse-parquet-wasm.ts
7068
+ // dist/lib/wasm/parse-parquet-wasm.js
7412
7069
  var import_arrow = require("@loaders.gl/arrow");
7413
7070
 
7414
- // src/lib/wasm/load-wasm.ts
7071
+ // dist/lib/wasm/load-wasm.js
7415
7072
  var import_parquet_wasm = __toESM(require("parquet-wasm"), 1);
7416
7073
  var parquetWasm = __toESM(require("parquet-wasm"), 1);
7417
7074
  var initializePromise;
@@ -7426,7 +7083,7 @@ async function loadWasm(wasmUrl = PARQUET_WASM_URL) {
7426
7083
  return parquetWasm;
7427
7084
  }
7428
7085
 
7429
- // src/lib/wasm/parse-parquet-wasm.ts
7086
+ // dist/lib/wasm/parse-parquet-wasm.js
7430
7087
  var arrow = __toESM(require("apache-arrow"), 1);
7431
7088
  async function parseParquetWasm(arrayBuffer, options) {
7432
7089
  var _a;
@@ -7446,7 +7103,7 @@ async function parseParquetWasm(arrayBuffer, options) {
7446
7103
  }
7447
7104
  }
7448
7105
 
7449
- // src/parquet-wasm-loader.ts
7106
+ // dist/parquet-wasm-loader.js
7450
7107
  var ParquetWasmWorkerLoader = {
7451
7108
  name: "Apache Parquet",
7452
7109
  id: "parquet-wasm",
@@ -7473,7 +7130,7 @@ var ParquetWasmLoader = {
7473
7130
  }
7474
7131
  };
7475
7132
 
7476
- // src/lib/wasm/encode-parquet-wasm.ts
7133
+ // dist/lib/wasm/encode-parquet-wasm.js
7477
7134
  var arrow2 = __toESM(require("apache-arrow"), 1);
7478
7135
  async function encode(table, options) {
7479
7136
  var _a;
@@ -7485,15 +7142,12 @@ async function encode(table, options) {
7485
7142
  const wasmProperties = new wasm.WriterPropertiesBuilder().build();
7486
7143
  try {
7487
7144
  const parquetBytes = wasm.writeParquet(wasmTable, wasmProperties);
7488
- return parquetBytes.buffer.slice(
7489
- parquetBytes.byteOffset,
7490
- parquetBytes.byteLength + parquetBytes.byteOffset
7491
- );
7145
+ return parquetBytes.buffer.slice(parquetBytes.byteOffset, parquetBytes.byteLength + parquetBytes.byteOffset);
7492
7146
  } finally {
7493
7147
  }
7494
7148
  }
7495
7149
 
7496
- // src/parquet-wasm-writer.ts
7150
+ // dist/parquet-wasm-writer.js
7497
7151
  var ParquetWasmWriter = {
7498
7152
  name: "Apache Parquet",
7499
7153
  id: "parquet-wasm",
@@ -7513,7 +7167,7 @@ var ParquetWasmWriter = {
7513
7167
  }
7514
7168
  };
7515
7169
 
7516
- // src/parquetjs/utils/file-utils.ts
7170
+ // dist/parquetjs/utils/file-utils.js
7517
7171
  var fs = __toESM(require("fs"), 1);
7518
7172
  function oswrite(os, buf) {
7519
7173
  return new Promise((resolve, reject) => {
@@ -7545,7 +7199,7 @@ function osopen(path, opts) {
7545
7199
  });
7546
7200
  }
7547
7201
 
7548
- // src/parquetjs/encoder/parquet-encoder.ts
7202
+ // dist/parquetjs/encoder/parquet-encoder.js
7549
7203
  var import_node_int646 = __toESM(require("node-int64"), 1);
7550
7204
  var PARQUET_MAGIC2 = "PAR1";
7551
7205
  var PARQUET_VERSION = 1;
@@ -7696,9 +7350,7 @@ var ParquetEnvelopeWriter = class {
7696
7350
  if (!userMetadata) {
7697
7351
  userMetadata = {};
7698
7352
  }
7699
- return this.writeSection(
7700
- encodeFooter(this.schema, this.rowCount, this.rowGroups, userMetadata)
7701
- );
7353
+ return this.writeSection(encodeFooter(this.schema, this.rowCount, this.rowGroups, userMetadata));
7702
7354
  }
7703
7355
  /**
7704
7356
  * Set the parquet data page size. The data page size controls the maximum
@@ -7736,7 +7388,7 @@ async function encodeDataPage(column, data) {
7736
7388
  const dataBuf = Buffer.concat([rLevelsBuf, dLevelsBuf, valuesBuf]);
7737
7389
  const compressedBuf = await deflate(column.compression, dataBuf);
7738
7390
  const header = new PageHeader({
7739
- type: 0 /* DATA_PAGE */,
7391
+ type: PageType.DATA_PAGE,
7740
7392
  data_page_header: new DataPageHeader({
7741
7393
  num_values: data.count,
7742
7394
  encoding: Encoding[column.encoding],
@@ -7773,7 +7425,7 @@ async function encodeDataPageV2(column, data, rowCount) {
7773
7425
  });
7774
7426
  }
7775
7427
  const header = new PageHeader({
7776
- type: 3 /* DATA_PAGE_V2 */,
7428
+ type: PageType.DATA_PAGE_V2,
7777
7429
  data_page_header_v2: new DataPageHeaderV2({
7778
7430
  num_values: data.count,
7779
7431
  num_nulls: data.count - data.values.length,
@@ -7895,3 +7547,4 @@ function encodeFooter(schema, rowCount, rowGroups, userMetadata) {
7895
7547
  * @license MIT
7896
7548
  * https://github.com/feross/buffer/blob/master/AUTHORS.md
7897
7549
  */
7550
+ //# sourceMappingURL=index.cjs.map