@loaders.gl/parquet 4.2.0-alpha.4 → 4.2.0-alpha.6

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 (269) hide show
  1. package/dist/index.cjs +385 -598
  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 +420 -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 +182 -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 +183 -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 +372 -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 +74 -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 +141 -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 +205 -181
  81. package/dist/parquetjs/parquet-thrift/DateType.js +31 -27
  82. package/dist/parquetjs/parquet-thrift/DecimalType.js +78 -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 +96 -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 +224 -205
  92. package/dist/parquetjs/parquet-thrift/IndexPageHeader.js +31 -27
  93. package/dist/parquetjs/parquet-thrift/IntType.js +78 -69
  94. package/dist/parquetjs/parquet-thrift/JsonType.js +31 -27
  95. package/dist/parquetjs/parquet-thrift/KeyValue.js +75 -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 +338 -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 +67 -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 +101 -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 +193 -175
  113. package/dist/parquetjs/parquet-thrift/PageLocation.js +111 -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 +149 -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 +221 -205
  121. package/dist/parquetjs/parquet-thrift/SortingColumn.js +101 -88
  122. package/dist/parquetjs/parquet-thrift/Statistics.js +149 -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 +78 -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 +96 -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 +78 -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 +183 -158
  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 +10 -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 +142 -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 +329 -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 +76 -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 +1747 -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.d.ts +28 -1
  168. package/dist/polyfills/buffer/install-buffer-polyfill.d.ts.map +1 -1
  169. package/dist/polyfills/buffer/install-buffer-polyfill.js +2 -1
  170. package/dist/polyfills/util.js +4 -1
  171. package/dist/workers/parquet-worker.js +3 -1
  172. package/package.json +21 -19
  173. package/src/index.ts +1 -1
  174. package/src/lib/parsers/parse-parquet-to-columns.ts +1 -1
  175. package/src/lib/parsers/parse-parquet.ts +1 -1
  176. package/src/parquetjs/encoder/parquet-encoder.ts +2 -2
  177. package/src/parquetjs/parser/decoders.ts +2 -2
  178. package/src/parquetjs/parser/parquet-reader.ts +3 -2
  179. package/src/parquetjs/schema/schema.ts +1 -1
  180. package/src/parquetjs/schema/types.ts +1 -0
  181. package/src/parquetjs/utils/read-utils.ts +2 -2
  182. package/src/polyfills/buffer/buffer.ts +0 -3
  183. package/dist/index.js.map +0 -1
  184. package/dist/lib/arrow/convert-columns-to-row-group.js.map +0 -1
  185. package/dist/lib/arrow/convert-row-group-to-columns.js.map +0 -1
  186. package/dist/lib/arrow/convert-schema-from-parquet.js.map +0 -1
  187. package/dist/lib/arrow/convert-schema-to-parquet.js.map +0 -1
  188. package/dist/lib/constants.js.map +0 -1
  189. package/dist/lib/parsers/get-parquet-schema.js.map +0 -1
  190. package/dist/lib/parsers/parse-geoparquet.js.map +0 -1
  191. package/dist/lib/parsers/parse-parquet-to-columns.js.map +0 -1
  192. package/dist/lib/parsers/parse-parquet.js.map +0 -1
  193. package/dist/lib/wasm/encode-parquet-wasm.js.map +0 -1
  194. package/dist/lib/wasm/load-wasm.js.map +0 -1
  195. package/dist/lib/wasm/parse-parquet-wasm.js.map +0 -1
  196. package/dist/lib/wip/convert-schema-deep.java.disabled +0 -910
  197. package/dist/lib/wip/convert-schema-deep.rs.disabled +0 -976
  198. package/dist/parquet-loader.js.map +0 -1
  199. package/dist/parquet-wasm-loader.js.map +0 -1
  200. package/dist/parquet-wasm-writer.js.map +0 -1
  201. package/dist/parquet-writer.js.map +0 -1
  202. package/dist/parquetjs/LICENSE +0 -20
  203. package/dist/parquetjs/codecs/declare.js.map +0 -1
  204. package/dist/parquetjs/codecs/dictionary.js.map +0 -1
  205. package/dist/parquetjs/codecs/index.js.map +0 -1
  206. package/dist/parquetjs/codecs/plain.js.map +0 -1
  207. package/dist/parquetjs/codecs/rle.js.map +0 -1
  208. package/dist/parquetjs/compression.js.map +0 -1
  209. package/dist/parquetjs/encoder/parquet-encoder.js.map +0 -1
  210. package/dist/parquetjs/modules.d.ts +0 -21
  211. package/dist/parquetjs/parquet-thrift/BoundaryOrder.js.map +0 -1
  212. package/dist/parquetjs/parquet-thrift/BsonType.js.map +0 -1
  213. package/dist/parquetjs/parquet-thrift/ColumnChunk.js.map +0 -1
  214. package/dist/parquetjs/parquet-thrift/ColumnIndex.js.map +0 -1
  215. package/dist/parquetjs/parquet-thrift/ColumnMetaData.js.map +0 -1
  216. package/dist/parquetjs/parquet-thrift/ColumnOrder.js.map +0 -1
  217. package/dist/parquetjs/parquet-thrift/CompressionCodec.js.map +0 -1
  218. package/dist/parquetjs/parquet-thrift/ConvertedType.js.map +0 -1
  219. package/dist/parquetjs/parquet-thrift/DataPageHeader.js.map +0 -1
  220. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js.map +0 -1
  221. package/dist/parquetjs/parquet-thrift/DateType.js.map +0 -1
  222. package/dist/parquetjs/parquet-thrift/DecimalType.js.map +0 -1
  223. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js.map +0 -1
  224. package/dist/parquetjs/parquet-thrift/Encoding.js.map +0 -1
  225. package/dist/parquetjs/parquet-thrift/EnumType.js.map +0 -1
  226. package/dist/parquetjs/parquet-thrift/FieldRepetitionType.js.map +0 -1
  227. package/dist/parquetjs/parquet-thrift/FileMetaData.js.map +0 -1
  228. package/dist/parquetjs/parquet-thrift/IndexPageHeader.js.map +0 -1
  229. package/dist/parquetjs/parquet-thrift/IntType.js.map +0 -1
  230. package/dist/parquetjs/parquet-thrift/JsonType.js.map +0 -1
  231. package/dist/parquetjs/parquet-thrift/KeyValue.js.map +0 -1
  232. package/dist/parquetjs/parquet-thrift/ListType.js.map +0 -1
  233. package/dist/parquetjs/parquet-thrift/LogicalType.js.map +0 -1
  234. package/dist/parquetjs/parquet-thrift/MapType.js.map +0 -1
  235. package/dist/parquetjs/parquet-thrift/MicroSeconds.js.map +0 -1
  236. package/dist/parquetjs/parquet-thrift/MilliSeconds.js.map +0 -1
  237. package/dist/parquetjs/parquet-thrift/NullType.js.map +0 -1
  238. package/dist/parquetjs/parquet-thrift/OffsetIndex.js.map +0 -1
  239. package/dist/parquetjs/parquet-thrift/PageEncodingStats.js.map +0 -1
  240. package/dist/parquetjs/parquet-thrift/PageHeader.js.map +0 -1
  241. package/dist/parquetjs/parquet-thrift/PageLocation.js.map +0 -1
  242. package/dist/parquetjs/parquet-thrift/PageType.js.map +0 -1
  243. package/dist/parquetjs/parquet-thrift/RowGroup.js.map +0 -1
  244. package/dist/parquetjs/parquet-thrift/SchemaElement.js.map +0 -1
  245. package/dist/parquetjs/parquet-thrift/SortingColumn.js.map +0 -1
  246. package/dist/parquetjs/parquet-thrift/Statistics.js.map +0 -1
  247. package/dist/parquetjs/parquet-thrift/StringType.js.map +0 -1
  248. package/dist/parquetjs/parquet-thrift/TimeType.js.map +0 -1
  249. package/dist/parquetjs/parquet-thrift/TimeUnit.js.map +0 -1
  250. package/dist/parquetjs/parquet-thrift/TimestampType.js.map +0 -1
  251. package/dist/parquetjs/parquet-thrift/Type.js.map +0 -1
  252. package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.js.map +0 -1
  253. package/dist/parquetjs/parquet-thrift/UUIDType.js.map +0 -1
  254. package/dist/parquetjs/parquet-thrift/index.js.map +0 -1
  255. package/dist/parquetjs/parser/decoders.js.map +0 -1
  256. package/dist/parquetjs/parser/parquet-reader.js.map +0 -1
  257. package/dist/parquetjs/schema/declare.js.map +0 -1
  258. package/dist/parquetjs/schema/schema.js.map +0 -1
  259. package/dist/parquetjs/schema/shred.js.map +0 -1
  260. package/dist/parquetjs/schema/types.js.map +0 -1
  261. package/dist/parquetjs/utils/file-utils.js.map +0 -1
  262. package/dist/parquetjs/utils/read-utils.js.map +0 -1
  263. package/dist/polyfills/buffer/buffer-polyfill.browser.js.map +0 -1
  264. package/dist/polyfills/buffer/buffer-polyfill.node.js.map +0 -1
  265. package/dist/polyfills/buffer/buffer.js.map +0 -1
  266. package/dist/polyfills/buffer/index.js.map +0 -1
  267. package/dist/polyfills/buffer/install-buffer-polyfill.js.map +0 -1
  268. package/dist/polyfills/util.js.map +0 -1
  269. package/dist/workers/parquet-worker.js.map +0 -1
@@ -1,3 +1,9 @@
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 Int64 from 'node-int64';
2
8
  import * as thrift from 'thrift';
3
9
  import * as ColumnOrder from "./ColumnOrder.js";
@@ -5,214 +11,227 @@ import * as KeyValue from "./KeyValue.js";
5
11
  import * as RowGroup from "./RowGroup.js";
6
12
  import * as SchemaElement from "./SchemaElement.js";
7
13
  export class FileMetaData {
8
- constructor() {
9
- let args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
10
- this.version = void 0;
11
- this.schema = void 0;
12
- this.num_rows = void 0;
13
- this.row_groups = void 0;
14
- this.key_value_metadata = void 0;
15
- this.created_by = void 0;
16
- this.column_orders = void 0;
17
- if (args != null && args.version != null) {
18
- this.version = args.version;
19
- } else {
20
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[version] is unset!');
21
- }
22
- if (args != null && args.schema != null) {
23
- this.schema = args.schema;
24
- } else {
25
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[schema] is unset!');
26
- }
27
- if (args != null && args.num_rows != null) {
28
- if (typeof args.num_rows === 'number') {
29
- this.num_rows = new Int64(args.num_rows);
30
- } else {
31
- this.num_rows = args.num_rows;
32
- }
33
- } else {
34
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_rows] is unset!');
35
- }
36
- if (args != null && args.row_groups != null) {
37
- this.row_groups = args.row_groups;
38
- } else {
39
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[row_groups] is unset!');
40
- }
41
- if (args != null && args.key_value_metadata != null) {
42
- this.key_value_metadata = args.key_value_metadata;
43
- }
44
- if (args != null && args.created_by != null) {
45
- this.created_by = args.created_by;
46
- }
47
- if (args != null && args.column_orders != null) {
48
- this.column_orders = args.column_orders;
49
- }
50
- }
51
- write(output) {
52
- output.writeStructBegin('FileMetaData');
53
- if (this.version != null) {
54
- output.writeFieldBegin('version', thrift.Thrift.Type.I32, 1);
55
- output.writeI32(this.version);
56
- output.writeFieldEnd();
57
- }
58
- if (this.schema != null) {
59
- output.writeFieldBegin('schema', thrift.Thrift.Type.LIST, 2);
60
- output.writeListBegin(thrift.Thrift.Type.STRUCT, this.schema.length);
61
- this.schema.forEach(value_1 => {
62
- value_1.write(output);
63
- });
64
- output.writeListEnd();
65
- output.writeFieldEnd();
66
- }
67
- if (this.num_rows != null) {
68
- output.writeFieldBegin('num_rows', thrift.Thrift.Type.I64, 3);
69
- output.writeI64(this.num_rows);
70
- output.writeFieldEnd();
71
- }
72
- if (this.row_groups != null) {
73
- output.writeFieldBegin('row_groups', thrift.Thrift.Type.LIST, 4);
74
- output.writeListBegin(thrift.Thrift.Type.STRUCT, this.row_groups.length);
75
- this.row_groups.forEach(value_2 => {
76
- value_2.write(output);
77
- });
78
- output.writeListEnd();
79
- output.writeFieldEnd();
80
- }
81
- if (this.key_value_metadata != null) {
82
- output.writeFieldBegin('key_value_metadata', thrift.Thrift.Type.LIST, 5);
83
- output.writeListBegin(thrift.Thrift.Type.STRUCT, this.key_value_metadata.length);
84
- this.key_value_metadata.forEach(value_3 => {
85
- value_3.write(output);
86
- });
87
- output.writeListEnd();
88
- output.writeFieldEnd();
89
- }
90
- if (this.created_by != null) {
91
- output.writeFieldBegin('created_by', thrift.Thrift.Type.STRING, 6);
92
- output.writeString(this.created_by);
93
- output.writeFieldEnd();
94
- }
95
- if (this.column_orders != null) {
96
- output.writeFieldBegin('column_orders', thrift.Thrift.Type.LIST, 7);
97
- output.writeListBegin(thrift.Thrift.Type.STRUCT, this.column_orders.length);
98
- this.column_orders.forEach(value_4 => {
99
- value_4.write(output);
100
- });
101
- output.writeListEnd();
102
- output.writeFieldEnd();
103
- }
104
- output.writeFieldStop();
105
- output.writeStructEnd();
106
- return;
107
- }
108
- static read(input) {
109
- input.readStructBegin();
110
- let _args = {};
111
- while (true) {
112
- const ret = input.readFieldBegin();
113
- const fieldType = ret.ftype;
114
- const fieldId = ret.fid;
115
- if (fieldType === thrift.Thrift.Type.STOP) {
116
- break;
117
- }
118
- switch (fieldId) {
119
- case 1:
120
- if (fieldType === thrift.Thrift.Type.I32) {
121
- const value_5 = input.readI32();
122
- _args.version = value_5;
123
- } else {
124
- input.skip(fieldType);
125
- }
126
- break;
127
- case 2:
128
- if (fieldType === thrift.Thrift.Type.LIST) {
129
- const value_6 = new Array();
130
- const metadata_1 = input.readListBegin();
131
- const size_1 = metadata_1.size;
132
- for (let i_1 = 0; i_1 < size_1; i_1++) {
133
- const value_7 = SchemaElement.SchemaElement.read(input);
134
- value_6.push(value_7);
14
+ version;
15
+ schema;
16
+ num_rows;
17
+ row_groups;
18
+ key_value_metadata;
19
+ created_by;
20
+ column_orders;
21
+ constructor(args = null) {
22
+ if (args != null && args.version != null) {
23
+ this.version = args.version;
24
+ }
25
+ else {
26
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[version] is unset!');
27
+ }
28
+ if (args != null && args.schema != null) {
29
+ this.schema = args.schema;
30
+ }
31
+ else {
32
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[schema] is unset!');
33
+ }
34
+ if (args != null && args.num_rows != null) {
35
+ if (typeof args.num_rows === 'number') {
36
+ this.num_rows = new Int64(args.num_rows);
135
37
  }
136
- input.readListEnd();
137
- _args.schema = value_6;
138
- } else {
139
- input.skip(fieldType);
140
- }
141
- break;
142
- case 3:
143
- if (fieldType === thrift.Thrift.Type.I64) {
144
- const value_8 = input.readI64();
145
- _args.num_rows = value_8;
146
- } else {
147
- input.skip(fieldType);
148
- }
149
- break;
150
- case 4:
151
- if (fieldType === thrift.Thrift.Type.LIST) {
152
- const value_9 = new Array();
153
- const metadata_2 = input.readListBegin();
154
- const size_2 = metadata_2.size;
155
- for (let i_2 = 0; i_2 < size_2; i_2++) {
156
- const value_10 = RowGroup.RowGroup.read(input);
157
- value_9.push(value_10);
38
+ else {
39
+ this.num_rows = args.num_rows;
158
40
  }
159
- input.readListEnd();
160
- _args.row_groups = value_9;
161
- } else {
162
- input.skip(fieldType);
163
- }
164
- break;
165
- case 5:
166
- if (fieldType === thrift.Thrift.Type.LIST) {
167
- const value_11 = new Array();
168
- const metadata_3 = input.readListBegin();
169
- const size_3 = metadata_3.size;
170
- for (let i_3 = 0; i_3 < size_3; i_3++) {
171
- const value_12 = KeyValue.KeyValue.read(input);
172
- value_11.push(value_12);
41
+ }
42
+ else {
43
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_rows] is unset!');
44
+ }
45
+ if (args != null && args.row_groups != null) {
46
+ this.row_groups = args.row_groups;
47
+ }
48
+ else {
49
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[row_groups] is unset!');
50
+ }
51
+ if (args != null && args.key_value_metadata != null) {
52
+ this.key_value_metadata = args.key_value_metadata;
53
+ }
54
+ if (args != null && args.created_by != null) {
55
+ this.created_by = args.created_by;
56
+ }
57
+ if (args != null && args.column_orders != null) {
58
+ this.column_orders = args.column_orders;
59
+ }
60
+ }
61
+ write(output) {
62
+ output.writeStructBegin('FileMetaData');
63
+ if (this.version != null) {
64
+ output.writeFieldBegin('version', thrift.Thrift.Type.I32, 1);
65
+ output.writeI32(this.version);
66
+ output.writeFieldEnd();
67
+ }
68
+ if (this.schema != null) {
69
+ output.writeFieldBegin('schema', thrift.Thrift.Type.LIST, 2);
70
+ output.writeListBegin(thrift.Thrift.Type.STRUCT, this.schema.length);
71
+ this.schema.forEach((value_1) => {
72
+ value_1.write(output);
73
+ });
74
+ output.writeListEnd();
75
+ output.writeFieldEnd();
76
+ }
77
+ if (this.num_rows != null) {
78
+ output.writeFieldBegin('num_rows', thrift.Thrift.Type.I64, 3);
79
+ output.writeI64(this.num_rows);
80
+ output.writeFieldEnd();
81
+ }
82
+ if (this.row_groups != null) {
83
+ output.writeFieldBegin('row_groups', thrift.Thrift.Type.LIST, 4);
84
+ output.writeListBegin(thrift.Thrift.Type.STRUCT, this.row_groups.length);
85
+ this.row_groups.forEach((value_2) => {
86
+ value_2.write(output);
87
+ });
88
+ output.writeListEnd();
89
+ output.writeFieldEnd();
90
+ }
91
+ if (this.key_value_metadata != null) {
92
+ output.writeFieldBegin('key_value_metadata', thrift.Thrift.Type.LIST, 5);
93
+ output.writeListBegin(thrift.Thrift.Type.STRUCT, this.key_value_metadata.length);
94
+ this.key_value_metadata.forEach((value_3) => {
95
+ value_3.write(output);
96
+ });
97
+ output.writeListEnd();
98
+ output.writeFieldEnd();
99
+ }
100
+ if (this.created_by != null) {
101
+ output.writeFieldBegin('created_by', thrift.Thrift.Type.STRING, 6);
102
+ output.writeString(this.created_by);
103
+ output.writeFieldEnd();
104
+ }
105
+ if (this.column_orders != null) {
106
+ output.writeFieldBegin('column_orders', thrift.Thrift.Type.LIST, 7);
107
+ output.writeListBegin(thrift.Thrift.Type.STRUCT, this.column_orders.length);
108
+ this.column_orders.forEach((value_4) => {
109
+ value_4.write(output);
110
+ });
111
+ output.writeListEnd();
112
+ output.writeFieldEnd();
113
+ }
114
+ output.writeFieldStop();
115
+ output.writeStructEnd();
116
+ return;
117
+ }
118
+ static read(input) {
119
+ input.readStructBegin();
120
+ let _args = {};
121
+ while (true) {
122
+ const ret = input.readFieldBegin();
123
+ const fieldType = ret.ftype;
124
+ const fieldId = ret.fid;
125
+ if (fieldType === thrift.Thrift.Type.STOP) {
126
+ break;
173
127
  }
174
- input.readListEnd();
175
- _args.key_value_metadata = value_11;
176
- } else {
177
- input.skip(fieldType);
178
- }
179
- break;
180
- case 6:
181
- if (fieldType === thrift.Thrift.Type.STRING) {
182
- const value_13 = input.readString();
183
- _args.created_by = value_13;
184
- } else {
185
- input.skip(fieldType);
186
- }
187
- break;
188
- case 7:
189
- if (fieldType === thrift.Thrift.Type.LIST) {
190
- const value_14 = new Array();
191
- const metadata_4 = input.readListBegin();
192
- const size_4 = metadata_4.size;
193
- for (let i_4 = 0; i_4 < size_4; i_4++) {
194
- const value_15 = ColumnOrder.ColumnOrder.read(input);
195
- value_14.push(value_15);
128
+ switch (fieldId) {
129
+ case 1:
130
+ if (fieldType === thrift.Thrift.Type.I32) {
131
+ const value_5 = input.readI32();
132
+ _args.version = value_5;
133
+ }
134
+ else {
135
+ input.skip(fieldType);
136
+ }
137
+ break;
138
+ case 2:
139
+ if (fieldType === thrift.Thrift.Type.LIST) {
140
+ const value_6 = new Array();
141
+ const metadata_1 = input.readListBegin();
142
+ const size_1 = metadata_1.size;
143
+ for (let i_1 = 0; i_1 < size_1; i_1++) {
144
+ const value_7 = SchemaElement.SchemaElement.read(input);
145
+ value_6.push(value_7);
146
+ }
147
+ input.readListEnd();
148
+ _args.schema = value_6;
149
+ }
150
+ else {
151
+ input.skip(fieldType);
152
+ }
153
+ break;
154
+ case 3:
155
+ if (fieldType === thrift.Thrift.Type.I64) {
156
+ const value_8 = input.readI64();
157
+ _args.num_rows = value_8;
158
+ }
159
+ else {
160
+ input.skip(fieldType);
161
+ }
162
+ break;
163
+ case 4:
164
+ if (fieldType === thrift.Thrift.Type.LIST) {
165
+ const value_9 = new Array();
166
+ const metadata_2 = input.readListBegin();
167
+ const size_2 = metadata_2.size;
168
+ for (let i_2 = 0; i_2 < size_2; i_2++) {
169
+ const value_10 = RowGroup.RowGroup.read(input);
170
+ value_9.push(value_10);
171
+ }
172
+ input.readListEnd();
173
+ _args.row_groups = value_9;
174
+ }
175
+ else {
176
+ input.skip(fieldType);
177
+ }
178
+ break;
179
+ case 5:
180
+ if (fieldType === thrift.Thrift.Type.LIST) {
181
+ const value_11 = new Array();
182
+ const metadata_3 = input.readListBegin();
183
+ const size_3 = metadata_3.size;
184
+ for (let i_3 = 0; i_3 < size_3; i_3++) {
185
+ const value_12 = KeyValue.KeyValue.read(input);
186
+ value_11.push(value_12);
187
+ }
188
+ input.readListEnd();
189
+ _args.key_value_metadata = value_11;
190
+ }
191
+ else {
192
+ input.skip(fieldType);
193
+ }
194
+ break;
195
+ case 6:
196
+ if (fieldType === thrift.Thrift.Type.STRING) {
197
+ const value_13 = input.readString();
198
+ _args.created_by = value_13;
199
+ }
200
+ else {
201
+ input.skip(fieldType);
202
+ }
203
+ break;
204
+ case 7:
205
+ if (fieldType === thrift.Thrift.Type.LIST) {
206
+ const value_14 = new Array();
207
+ const metadata_4 = input.readListBegin();
208
+ const size_4 = metadata_4.size;
209
+ for (let i_4 = 0; i_4 < size_4; i_4++) {
210
+ const value_15 = ColumnOrder.ColumnOrder.read(input);
211
+ value_14.push(value_15);
212
+ }
213
+ input.readListEnd();
214
+ _args.column_orders = value_14;
215
+ }
216
+ else {
217
+ input.skip(fieldType);
218
+ }
219
+ break;
220
+ default: {
221
+ input.skip(fieldType);
222
+ }
196
223
  }
197
- input.readListEnd();
198
- _args.column_orders = value_14;
199
- } else {
200
- input.skip(fieldType);
201
- }
202
- break;
203
- default:
204
- {
205
- input.skip(fieldType);
206
- }
207
- }
208
- input.readFieldEnd();
209
- }
210
- input.readStructEnd();
211
- if (_args.version !== undefined && _args.schema !== undefined && _args.num_rows !== undefined && _args.row_groups !== undefined) {
212
- return new FileMetaData(_args);
213
- } else {
214
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read FileMetaData from input');
224
+ input.readFieldEnd();
225
+ }
226
+ input.readStructEnd();
227
+ if (_args.version !== undefined &&
228
+ _args.schema !== undefined &&
229
+ _args.num_rows !== undefined &&
230
+ _args.row_groups !== undefined) {
231
+ return new FileMetaData(_args);
232
+ }
233
+ else {
234
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read FileMetaData from input');
235
+ }
215
236
  }
216
- }
217
237
  }
218
- //# sourceMappingURL=FileMetaData.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 IndexPageHeader {
3
- constructor() {}
4
- write(output) {
5
- output.writeStructBegin('IndexPageHeader');
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('IndexPageHeader');
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 IndexPageHeader();
26
34
  }
27
- input.readStructEnd();
28
- return new IndexPageHeader();
29
- }
30
35
  }
31
- //# sourceMappingURL=IndexPageHeader.js.map
@@ -1,75 +1,84 @@
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 IntType {
3
- constructor(args) {
4
- this.bitWidth = void 0;
5
- this.isSigned = void 0;
6
- if (args != null && args.bitWidth != null) {
7
- this.bitWidth = args.bitWidth;
8
- } else {
9
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[bitWidth] is unset!');
9
+ bitWidth;
10
+ isSigned;
11
+ constructor(args) {
12
+ if (args != null && args.bitWidth != null) {
13
+ this.bitWidth = args.bitWidth;
14
+ }
15
+ else {
16
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[bitWidth] is unset!');
17
+ }
18
+ if (args != null && args.isSigned != null) {
19
+ this.isSigned = args.isSigned;
20
+ }
21
+ else {
22
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[isSigned] is unset!');
23
+ }
10
24
  }
11
- if (args != null && args.isSigned != null) {
12
- this.isSigned = args.isSigned;
13
- } else {
14
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[isSigned] is unset!');
25
+ write(output) {
26
+ output.writeStructBegin('IntType');
27
+ if (this.bitWidth != null) {
28
+ output.writeFieldBegin('bitWidth', thrift.Thrift.Type.BYTE, 1);
29
+ output.writeByte(this.bitWidth);
30
+ output.writeFieldEnd();
31
+ }
32
+ if (this.isSigned != null) {
33
+ output.writeFieldBegin('isSigned', thrift.Thrift.Type.BOOL, 2);
34
+ output.writeBool(this.isSigned);
35
+ output.writeFieldEnd();
36
+ }
37
+ output.writeFieldStop();
38
+ output.writeStructEnd();
39
+ return;
15
40
  }
16
- }
17
- write(output) {
18
- output.writeStructBegin('IntType');
19
- if (this.bitWidth != null) {
20
- output.writeFieldBegin('bitWidth', thrift.Thrift.Type.BYTE, 1);
21
- output.writeByte(this.bitWidth);
22
- output.writeFieldEnd();
41
+ static read(input) {
42
+ input.readStructBegin();
43
+ let _args = {};
44
+ while (true) {
45
+ const ret = input.readFieldBegin();
46
+ const fieldType = ret.ftype;
47
+ const fieldId = ret.fid;
48
+ if (fieldType === thrift.Thrift.Type.STOP) {
49
+ break;
50
+ }
51
+ switch (fieldId) {
52
+ case 1:
53
+ if (fieldType === thrift.Thrift.Type.BYTE) {
54
+ const value_1 = input.readByte();
55
+ _args.bitWidth = value_1;
56
+ }
57
+ else {
58
+ input.skip(fieldType);
59
+ }
60
+ break;
61
+ case 2:
62
+ if (fieldType === thrift.Thrift.Type.BOOL) {
63
+ const value_2 = input.readBool();
64
+ _args.isSigned = value_2;
65
+ }
66
+ else {
67
+ input.skip(fieldType);
68
+ }
69
+ break;
70
+ default: {
71
+ input.skip(fieldType);
72
+ }
73
+ }
74
+ input.readFieldEnd();
75
+ }
76
+ input.readStructEnd();
77
+ if (_args.bitWidth !== undefined && _args.isSigned !== undefined) {
78
+ return new IntType(_args);
79
+ }
80
+ else {
81
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read IntType from input');
82
+ }
23
83
  }
24
- if (this.isSigned != null) {
25
- output.writeFieldBegin('isSigned', thrift.Thrift.Type.BOOL, 2);
26
- output.writeBool(this.isSigned);
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.BYTE) {
46
- const value_1 = input.readByte();
47
- _args.bitWidth = value_1;
48
- } else {
49
- input.skip(fieldType);
50
- }
51
- break;
52
- case 2:
53
- if (fieldType === thrift.Thrift.Type.BOOL) {
54
- const value_2 = input.readBool();
55
- _args.isSigned = 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.bitWidth !== undefined && _args.isSigned !== undefined) {
69
- return new IntType(_args);
70
- } else {
71
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read IntType from input');
72
- }
73
- }
74
84
  }
75
- //# sourceMappingURL=IntType.js.map