@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
@@ -1,186 +1,203 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /*
4
+ * Autogenerated by @creditkarma/thrift-typescript v3.7.2
5
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6
+ */
1
7
  import * as thrift from 'thrift';
2
8
  import * as Statistics from "./Statistics.js";
3
9
  export class DataPageHeaderV2 {
4
- constructor(args) {
5
- this.num_values = void 0;
6
- this.num_nulls = void 0;
7
- this.num_rows = void 0;
8
- this.encoding = void 0;
9
- this.definition_levels_byte_length = void 0;
10
- this.repetition_levels_byte_length = void 0;
11
- this.is_compressed = true;
12
- this.statistics = void 0;
13
- if (args != null && args.num_values != null) {
14
- this.num_values = args.num_values;
15
- } else {
16
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_values] is unset!');
10
+ constructor(args) {
11
+ this.is_compressed = true;
12
+ if (args != null && args.num_values != null) {
13
+ this.num_values = args.num_values;
14
+ }
15
+ else {
16
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_values] is unset!');
17
+ }
18
+ if (args != null && args.num_nulls != null) {
19
+ this.num_nulls = args.num_nulls;
20
+ }
21
+ else {
22
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_nulls] is unset!');
23
+ }
24
+ if (args != null && args.num_rows != null) {
25
+ this.num_rows = args.num_rows;
26
+ }
27
+ else {
28
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_rows] is unset!');
29
+ }
30
+ if (args != null && args.encoding != null) {
31
+ this.encoding = args.encoding;
32
+ }
33
+ else {
34
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[encoding] is unset!');
35
+ }
36
+ if (args != null && args.definition_levels_byte_length != null) {
37
+ this.definition_levels_byte_length = args.definition_levels_byte_length;
38
+ }
39
+ else {
40
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[definition_levels_byte_length] is unset!');
41
+ }
42
+ if (args != null && args.repetition_levels_byte_length != null) {
43
+ this.repetition_levels_byte_length = args.repetition_levels_byte_length;
44
+ }
45
+ else {
46
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[repetition_levels_byte_length] is unset!');
47
+ }
48
+ if (args != null && args.is_compressed != null) {
49
+ this.is_compressed = args.is_compressed;
50
+ }
51
+ if (args != null && args.statistics != null) {
52
+ this.statistics = args.statistics;
53
+ }
54
+ }
55
+ write(output) {
56
+ output.writeStructBegin('DataPageHeaderV2');
57
+ if (this.num_values != null) {
58
+ output.writeFieldBegin('num_values', thrift.Thrift.Type.I32, 1);
59
+ output.writeI32(this.num_values);
60
+ output.writeFieldEnd();
61
+ }
62
+ if (this.num_nulls != null) {
63
+ output.writeFieldBegin('num_nulls', thrift.Thrift.Type.I32, 2);
64
+ output.writeI32(this.num_nulls);
65
+ output.writeFieldEnd();
66
+ }
67
+ if (this.num_rows != null) {
68
+ output.writeFieldBegin('num_rows', thrift.Thrift.Type.I32, 3);
69
+ output.writeI32(this.num_rows);
70
+ output.writeFieldEnd();
71
+ }
72
+ if (this.encoding != null) {
73
+ output.writeFieldBegin('encoding', thrift.Thrift.Type.I32, 4);
74
+ output.writeI32(this.encoding);
75
+ output.writeFieldEnd();
76
+ }
77
+ if (this.definition_levels_byte_length != null) {
78
+ output.writeFieldBegin('definition_levels_byte_length', thrift.Thrift.Type.I32, 5);
79
+ output.writeI32(this.definition_levels_byte_length);
80
+ output.writeFieldEnd();
81
+ }
82
+ if (this.repetition_levels_byte_length != null) {
83
+ output.writeFieldBegin('repetition_levels_byte_length', thrift.Thrift.Type.I32, 6);
84
+ output.writeI32(this.repetition_levels_byte_length);
85
+ output.writeFieldEnd();
86
+ }
87
+ if (this.is_compressed != null) {
88
+ output.writeFieldBegin('is_compressed', thrift.Thrift.Type.BOOL, 7);
89
+ output.writeBool(this.is_compressed);
90
+ output.writeFieldEnd();
91
+ }
92
+ if (this.statistics != null) {
93
+ output.writeFieldBegin('statistics', thrift.Thrift.Type.STRUCT, 8);
94
+ this.statistics.write(output);
95
+ output.writeFieldEnd();
96
+ }
97
+ output.writeFieldStop();
98
+ output.writeStructEnd();
99
+ return;
100
+ }
101
+ static read(input) {
102
+ input.readStructBegin();
103
+ let _args = {};
104
+ while (true) {
105
+ const ret = input.readFieldBegin();
106
+ const fieldType = ret.ftype;
107
+ const fieldId = ret.fid;
108
+ if (fieldType === thrift.Thrift.Type.STOP) {
109
+ break;
110
+ }
111
+ switch (fieldId) {
112
+ case 1:
113
+ if (fieldType === thrift.Thrift.Type.I32) {
114
+ const value_1 = input.readI32();
115
+ _args.num_values = value_1;
116
+ }
117
+ else {
118
+ input.skip(fieldType);
119
+ }
120
+ break;
121
+ case 2:
122
+ if (fieldType === thrift.Thrift.Type.I32) {
123
+ const value_2 = input.readI32();
124
+ _args.num_nulls = value_2;
125
+ }
126
+ else {
127
+ input.skip(fieldType);
128
+ }
129
+ break;
130
+ case 3:
131
+ if (fieldType === thrift.Thrift.Type.I32) {
132
+ const value_3 = input.readI32();
133
+ _args.num_rows = value_3;
134
+ }
135
+ else {
136
+ input.skip(fieldType);
137
+ }
138
+ break;
139
+ case 4:
140
+ if (fieldType === thrift.Thrift.Type.I32) {
141
+ const value_4 = input.readI32();
142
+ _args.encoding = value_4;
143
+ }
144
+ else {
145
+ input.skip(fieldType);
146
+ }
147
+ break;
148
+ case 5:
149
+ if (fieldType === thrift.Thrift.Type.I32) {
150
+ const value_5 = input.readI32();
151
+ _args.definition_levels_byte_length = value_5;
152
+ }
153
+ else {
154
+ input.skip(fieldType);
155
+ }
156
+ break;
157
+ case 6:
158
+ if (fieldType === thrift.Thrift.Type.I32) {
159
+ const value_6 = input.readI32();
160
+ _args.repetition_levels_byte_length = value_6;
161
+ }
162
+ else {
163
+ input.skip(fieldType);
164
+ }
165
+ break;
166
+ case 7:
167
+ if (fieldType === thrift.Thrift.Type.BOOL) {
168
+ const value_7 = input.readBool();
169
+ _args.is_compressed = value_7;
170
+ }
171
+ else {
172
+ input.skip(fieldType);
173
+ }
174
+ break;
175
+ case 8:
176
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
177
+ const value_8 = Statistics.Statistics.read(input);
178
+ _args.statistics = value_8;
179
+ }
180
+ else {
181
+ input.skip(fieldType);
182
+ }
183
+ break;
184
+ default: {
185
+ input.skip(fieldType);
186
+ }
187
+ }
188
+ input.readFieldEnd();
189
+ }
190
+ input.readStructEnd();
191
+ if (_args.num_values !== undefined &&
192
+ _args.num_nulls !== undefined &&
193
+ _args.num_rows !== undefined &&
194
+ _args.encoding !== undefined &&
195
+ _args.definition_levels_byte_length !== undefined &&
196
+ _args.repetition_levels_byte_length !== undefined) {
197
+ return new DataPageHeaderV2(_args);
198
+ }
199
+ else {
200
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read DataPageHeaderV2 from input');
201
+ }
17
202
  }
18
- if (args != null && args.num_nulls != null) {
19
- this.num_nulls = args.num_nulls;
20
- } else {
21
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_nulls] is unset!');
22
- }
23
- if (args != null && args.num_rows != null) {
24
- this.num_rows = args.num_rows;
25
- } else {
26
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_rows] is unset!');
27
- }
28
- if (args != null && args.encoding != null) {
29
- this.encoding = args.encoding;
30
- } else {
31
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[encoding] is unset!');
32
- }
33
- if (args != null && args.definition_levels_byte_length != null) {
34
- this.definition_levels_byte_length = args.definition_levels_byte_length;
35
- } else {
36
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[definition_levels_byte_length] is unset!');
37
- }
38
- if (args != null && args.repetition_levels_byte_length != null) {
39
- this.repetition_levels_byte_length = args.repetition_levels_byte_length;
40
- } else {
41
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[repetition_levels_byte_length] is unset!');
42
- }
43
- if (args != null && args.is_compressed != null) {
44
- this.is_compressed = args.is_compressed;
45
- }
46
- if (args != null && args.statistics != null) {
47
- this.statistics = args.statistics;
48
- }
49
- }
50
- write(output) {
51
- output.writeStructBegin('DataPageHeaderV2');
52
- if (this.num_values != null) {
53
- output.writeFieldBegin('num_values', thrift.Thrift.Type.I32, 1);
54
- output.writeI32(this.num_values);
55
- output.writeFieldEnd();
56
- }
57
- if (this.num_nulls != null) {
58
- output.writeFieldBegin('num_nulls', thrift.Thrift.Type.I32, 2);
59
- output.writeI32(this.num_nulls);
60
- output.writeFieldEnd();
61
- }
62
- if (this.num_rows != null) {
63
- output.writeFieldBegin('num_rows', thrift.Thrift.Type.I32, 3);
64
- output.writeI32(this.num_rows);
65
- output.writeFieldEnd();
66
- }
67
- if (this.encoding != null) {
68
- output.writeFieldBegin('encoding', thrift.Thrift.Type.I32, 4);
69
- output.writeI32(this.encoding);
70
- output.writeFieldEnd();
71
- }
72
- if (this.definition_levels_byte_length != null) {
73
- output.writeFieldBegin('definition_levels_byte_length', thrift.Thrift.Type.I32, 5);
74
- output.writeI32(this.definition_levels_byte_length);
75
- output.writeFieldEnd();
76
- }
77
- if (this.repetition_levels_byte_length != null) {
78
- output.writeFieldBegin('repetition_levels_byte_length', thrift.Thrift.Type.I32, 6);
79
- output.writeI32(this.repetition_levels_byte_length);
80
- output.writeFieldEnd();
81
- }
82
- if (this.is_compressed != null) {
83
- output.writeFieldBegin('is_compressed', thrift.Thrift.Type.BOOL, 7);
84
- output.writeBool(this.is_compressed);
85
- output.writeFieldEnd();
86
- }
87
- if (this.statistics != null) {
88
- output.writeFieldBegin('statistics', thrift.Thrift.Type.STRUCT, 8);
89
- this.statistics.write(output);
90
- output.writeFieldEnd();
91
- }
92
- output.writeFieldStop();
93
- output.writeStructEnd();
94
- return;
95
- }
96
- static read(input) {
97
- input.readStructBegin();
98
- let _args = {};
99
- while (true) {
100
- const ret = input.readFieldBegin();
101
- const fieldType = ret.ftype;
102
- const fieldId = ret.fid;
103
- if (fieldType === thrift.Thrift.Type.STOP) {
104
- break;
105
- }
106
- switch (fieldId) {
107
- case 1:
108
- if (fieldType === thrift.Thrift.Type.I32) {
109
- const value_1 = input.readI32();
110
- _args.num_values = value_1;
111
- } else {
112
- input.skip(fieldType);
113
- }
114
- break;
115
- case 2:
116
- if (fieldType === thrift.Thrift.Type.I32) {
117
- const value_2 = input.readI32();
118
- _args.num_nulls = value_2;
119
- } else {
120
- input.skip(fieldType);
121
- }
122
- break;
123
- case 3:
124
- if (fieldType === thrift.Thrift.Type.I32) {
125
- const value_3 = input.readI32();
126
- _args.num_rows = value_3;
127
- } else {
128
- input.skip(fieldType);
129
- }
130
- break;
131
- case 4:
132
- if (fieldType === thrift.Thrift.Type.I32) {
133
- const value_4 = input.readI32();
134
- _args.encoding = value_4;
135
- } else {
136
- input.skip(fieldType);
137
- }
138
- break;
139
- case 5:
140
- if (fieldType === thrift.Thrift.Type.I32) {
141
- const value_5 = input.readI32();
142
- _args.definition_levels_byte_length = value_5;
143
- } else {
144
- input.skip(fieldType);
145
- }
146
- break;
147
- case 6:
148
- if (fieldType === thrift.Thrift.Type.I32) {
149
- const value_6 = input.readI32();
150
- _args.repetition_levels_byte_length = value_6;
151
- } else {
152
- input.skip(fieldType);
153
- }
154
- break;
155
- case 7:
156
- if (fieldType === thrift.Thrift.Type.BOOL) {
157
- const value_7 = input.readBool();
158
- _args.is_compressed = value_7;
159
- } else {
160
- input.skip(fieldType);
161
- }
162
- break;
163
- case 8:
164
- if (fieldType === thrift.Thrift.Type.STRUCT) {
165
- const value_8 = Statistics.Statistics.read(input);
166
- _args.statistics = value_8;
167
- } else {
168
- input.skip(fieldType);
169
- }
170
- break;
171
- default:
172
- {
173
- input.skip(fieldType);
174
- }
175
- }
176
- input.readFieldEnd();
177
- }
178
- input.readStructEnd();
179
- if (_args.num_values !== undefined && _args.num_nulls !== undefined && _args.num_rows !== undefined && _args.encoding !== undefined && _args.definition_levels_byte_length !== undefined && _args.repetition_levels_byte_length !== undefined) {
180
- return new DataPageHeaderV2(_args);
181
- } else {
182
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read DataPageHeaderV2 from input');
183
- }
184
- }
185
203
  }
186
- //# sourceMappingURL=DataPageHeaderV2.js.map
@@ -1,31 +1,35 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /*
4
+ * Autogenerated by @creditkarma/thrift-typescript v3.7.2
5
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6
+ */
1
7
  import * as thrift from 'thrift';
2
8
  export class DateType {
3
- constructor() {}
4
- write(output) {
5
- output.writeStructBegin('DateType');
6
- output.writeFieldStop();
7
- output.writeStructEnd();
8
- return;
9
- }
10
- static read(input) {
11
- input.readStructBegin();
12
- while (true) {
13
- const ret = input.readFieldBegin();
14
- const fieldType = ret.ftype;
15
- const fieldId = ret.fid;
16
- if (fieldType === thrift.Thrift.Type.STOP) {
17
- break;
18
- }
19
- switch (fieldId) {
20
- default:
21
- {
22
- input.skip(fieldType);
23
- }
24
- }
25
- input.readFieldEnd();
9
+ constructor() { }
10
+ write(output) {
11
+ output.writeStructBegin('DateType');
12
+ output.writeFieldStop();
13
+ output.writeStructEnd();
14
+ return;
15
+ }
16
+ static read(input) {
17
+ input.readStructBegin();
18
+ while (true) {
19
+ const ret = input.readFieldBegin();
20
+ const fieldType = ret.ftype;
21
+ const fieldId = ret.fid;
22
+ if (fieldType === thrift.Thrift.Type.STOP) {
23
+ break;
24
+ }
25
+ switch (fieldId) {
26
+ default: {
27
+ input.skip(fieldType);
28
+ }
29
+ }
30
+ input.readFieldEnd();
31
+ }
32
+ input.readStructEnd();
33
+ return new DateType();
26
34
  }
27
- input.readStructEnd();
28
- return new DateType();
29
- }
30
35
  }
31
- //# sourceMappingURL=DateType.js.map
@@ -1,75 +1,82 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /*
4
+ * Autogenerated by @creditkarma/thrift-typescript v3.7.2
5
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
6
+ */
1
7
  import * as thrift from 'thrift';
2
8
  export class DecimalType {
3
- constructor(args) {
4
- this.scale = void 0;
5
- this.precision = void 0;
6
- if (args != null && args.scale != null) {
7
- this.scale = args.scale;
8
- } else {
9
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[scale] is unset!');
9
+ constructor(args) {
10
+ if (args != null && args.scale != null) {
11
+ this.scale = args.scale;
12
+ }
13
+ else {
14
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[scale] is unset!');
15
+ }
16
+ if (args != null && args.precision != null) {
17
+ this.precision = args.precision;
18
+ }
19
+ else {
20
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[precision] is unset!');
21
+ }
10
22
  }
11
- if (args != null && args.precision != null) {
12
- this.precision = args.precision;
13
- } else {
14
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[precision] is unset!');
23
+ write(output) {
24
+ output.writeStructBegin('DecimalType');
25
+ if (this.scale != null) {
26
+ output.writeFieldBegin('scale', thrift.Thrift.Type.I32, 1);
27
+ output.writeI32(this.scale);
28
+ output.writeFieldEnd();
29
+ }
30
+ if (this.precision != null) {
31
+ output.writeFieldBegin('precision', thrift.Thrift.Type.I32, 2);
32
+ output.writeI32(this.precision);
33
+ output.writeFieldEnd();
34
+ }
35
+ output.writeFieldStop();
36
+ output.writeStructEnd();
37
+ return;
15
38
  }
16
- }
17
- write(output) {
18
- output.writeStructBegin('DecimalType');
19
- if (this.scale != null) {
20
- output.writeFieldBegin('scale', thrift.Thrift.Type.I32, 1);
21
- output.writeI32(this.scale);
22
- output.writeFieldEnd();
39
+ static read(input) {
40
+ input.readStructBegin();
41
+ let _args = {};
42
+ while (true) {
43
+ const ret = input.readFieldBegin();
44
+ const fieldType = ret.ftype;
45
+ const fieldId = ret.fid;
46
+ if (fieldType === thrift.Thrift.Type.STOP) {
47
+ break;
48
+ }
49
+ switch (fieldId) {
50
+ case 1:
51
+ if (fieldType === thrift.Thrift.Type.I32) {
52
+ const value_1 = input.readI32();
53
+ _args.scale = value_1;
54
+ }
55
+ else {
56
+ input.skip(fieldType);
57
+ }
58
+ break;
59
+ case 2:
60
+ if (fieldType === thrift.Thrift.Type.I32) {
61
+ const value_2 = input.readI32();
62
+ _args.precision = value_2;
63
+ }
64
+ else {
65
+ input.skip(fieldType);
66
+ }
67
+ break;
68
+ default: {
69
+ input.skip(fieldType);
70
+ }
71
+ }
72
+ input.readFieldEnd();
73
+ }
74
+ input.readStructEnd();
75
+ if (_args.scale !== undefined && _args.precision !== undefined) {
76
+ return new DecimalType(_args);
77
+ }
78
+ else {
79
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read DecimalType from input');
80
+ }
23
81
  }
24
- if (this.precision != null) {
25
- output.writeFieldBegin('precision', thrift.Thrift.Type.I32, 2);
26
- output.writeI32(this.precision);
27
- output.writeFieldEnd();
28
- }
29
- output.writeFieldStop();
30
- output.writeStructEnd();
31
- return;
32
- }
33
- static read(input) {
34
- input.readStructBegin();
35
- let _args = {};
36
- while (true) {
37
- const ret = input.readFieldBegin();
38
- const fieldType = ret.ftype;
39
- const fieldId = ret.fid;
40
- if (fieldType === thrift.Thrift.Type.STOP) {
41
- break;
42
- }
43
- switch (fieldId) {
44
- case 1:
45
- if (fieldType === thrift.Thrift.Type.I32) {
46
- const value_1 = input.readI32();
47
- _args.scale = value_1;
48
- } else {
49
- input.skip(fieldType);
50
- }
51
- break;
52
- case 2:
53
- if (fieldType === thrift.Thrift.Type.I32) {
54
- const value_2 = input.readI32();
55
- _args.precision = value_2;
56
- } else {
57
- input.skip(fieldType);
58
- }
59
- break;
60
- default:
61
- {
62
- input.skip(fieldType);
63
- }
64
- }
65
- input.readFieldEnd();
66
- }
67
- input.readStructEnd();
68
- if (_args.scale !== undefined && _args.precision !== undefined) {
69
- return new DecimalType(_args);
70
- } else {
71
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read DecimalType from input');
72
- }
73
- }
74
82
  }
75
- //# sourceMappingURL=DecimalType.js.map
@@ -1,5 +1,5 @@
1
1
  import * as thrift from 'thrift';
2
- import * as Encoding from './Encoding';
2
+ import * as Encoding from "./Encoding.js";
3
3
  export interface IDictionaryPageHeaderArgs {
4
4
  num_values: number;
5
5
  encoding: Encoding.Encoding;
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryPageHeader.d.ts","sourceRoot":"","sources":["../../../src/parquetjs/parquet-thrift/DictionaryPageHeader.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AACD,qBAAa,oBAAoB;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;gBACf,IAAI,EAAE,yBAAyB;IAqBpC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI;WAqB9B,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,GAAG,oBAAoB;CAmDlE"}
1
+ {"version":3,"file":"DictionaryPageHeader.d.ts","sourceRoot":"","sources":["../../../src/parquetjs/parquet-thrift/DictionaryPageHeader.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,QAAQ,sBAAmB;AACvC,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AACD,qBAAa,oBAAoB;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;gBACf,IAAI,EAAE,yBAAyB;IAqBpC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI;WAqB9B,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,SAAS,GAAG,oBAAoB;CAmDlE"}