@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 * as thrift from 'thrift';
2
8
  import * as BsonType from "./BsonType.js";
3
9
  import * as DateType from "./DateType.js";
@@ -13,364 +19,352 @@ import * as TimestampType from "./TimestampType.js";
13
19
  import * as TimeType from "./TimeType.js";
14
20
  import * as UUIDType from "./UUIDType.js";
15
21
  export class LogicalType {
16
- constructor(args) {
17
- this.STRING = void 0;
18
- this.MAP = void 0;
19
- this.LIST = void 0;
20
- this.ENUM = void 0;
21
- this.DECIMAL = void 0;
22
- this.DATE = void 0;
23
- this.TIME = void 0;
24
- this.TIMESTAMP = void 0;
25
- this.INTEGER = void 0;
26
- this.UNKNOWN = void 0;
27
- this.JSON = void 0;
28
- this.BSON = void 0;
29
- this.UUID = void 0;
30
- let _fieldsSet = 0;
31
- if (args != null) {
32
- if (args.STRING != null) {
33
- _fieldsSet++;
34
- this.STRING = args.STRING;
35
- }
36
- if (args.MAP != null) {
37
- _fieldsSet++;
38
- this.MAP = args.MAP;
39
- }
40
- if (args.LIST != null) {
41
- _fieldsSet++;
42
- this.LIST = args.LIST;
43
- }
44
- if (args.ENUM != null) {
45
- _fieldsSet++;
46
- this.ENUM = args.ENUM;
47
- }
48
- if (args.DECIMAL != null) {
49
- _fieldsSet++;
50
- this.DECIMAL = args.DECIMAL;
51
- }
52
- if (args.DATE != null) {
53
- _fieldsSet++;
54
- this.DATE = args.DATE;
55
- }
56
- if (args.TIME != null) {
57
- _fieldsSet++;
58
- this.TIME = args.TIME;
59
- }
60
- if (args.TIMESTAMP != null) {
61
- _fieldsSet++;
62
- this.TIMESTAMP = args.TIMESTAMP;
63
- }
64
- if (args.INTEGER != null) {
65
- _fieldsSet++;
66
- this.INTEGER = args.INTEGER;
67
- }
68
- if (args.UNKNOWN != null) {
69
- _fieldsSet++;
70
- this.UNKNOWN = args.UNKNOWN;
71
- }
72
- if (args.JSON != null) {
73
- _fieldsSet++;
74
- this.JSON = args.JSON;
75
- }
76
- if (args.BSON != null) {
77
- _fieldsSet++;
78
- this.BSON = args.BSON;
79
- }
80
- if (args.UUID != null) {
81
- _fieldsSet++;
82
- this.UUID = args.UUID;
83
- }
84
- if (_fieldsSet > 1) {
85
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with more than one set value!');
86
- } else if (_fieldsSet < 1) {
87
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with no set value!');
88
- }
22
+ STRING;
23
+ MAP;
24
+ LIST;
25
+ ENUM;
26
+ DECIMAL;
27
+ DATE;
28
+ TIME;
29
+ TIMESTAMP;
30
+ INTEGER;
31
+ UNKNOWN;
32
+ JSON;
33
+ BSON;
34
+ UUID;
35
+ constructor(args) {
36
+ let _fieldsSet = 0;
37
+ if (args != null) {
38
+ if (args.STRING != null) {
39
+ _fieldsSet++;
40
+ this.STRING = args.STRING;
41
+ }
42
+ if (args.MAP != null) {
43
+ _fieldsSet++;
44
+ this.MAP = args.MAP;
45
+ }
46
+ if (args.LIST != null) {
47
+ _fieldsSet++;
48
+ this.LIST = args.LIST;
49
+ }
50
+ if (args.ENUM != null) {
51
+ _fieldsSet++;
52
+ this.ENUM = args.ENUM;
53
+ }
54
+ if (args.DECIMAL != null) {
55
+ _fieldsSet++;
56
+ this.DECIMAL = args.DECIMAL;
57
+ }
58
+ if (args.DATE != null) {
59
+ _fieldsSet++;
60
+ this.DATE = args.DATE;
61
+ }
62
+ if (args.TIME != null) {
63
+ _fieldsSet++;
64
+ this.TIME = args.TIME;
65
+ }
66
+ if (args.TIMESTAMP != null) {
67
+ _fieldsSet++;
68
+ this.TIMESTAMP = args.TIMESTAMP;
69
+ }
70
+ if (args.INTEGER != null) {
71
+ _fieldsSet++;
72
+ this.INTEGER = args.INTEGER;
73
+ }
74
+ if (args.UNKNOWN != null) {
75
+ _fieldsSet++;
76
+ this.UNKNOWN = args.UNKNOWN;
77
+ }
78
+ if (args.JSON != null) {
79
+ _fieldsSet++;
80
+ this.JSON = args.JSON;
81
+ }
82
+ if (args.BSON != null) {
83
+ _fieldsSet++;
84
+ this.BSON = args.BSON;
85
+ }
86
+ if (args.UUID != null) {
87
+ _fieldsSet++;
88
+ this.UUID = args.UUID;
89
+ }
90
+ if (_fieldsSet > 1) {
91
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with more than one set value!');
92
+ }
93
+ else if (_fieldsSet < 1) {
94
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with no set value!');
95
+ }
96
+ }
89
97
  }
90
- }
91
- static fromSTRING(STRING) {
92
- return new LogicalType({
93
- STRING
94
- });
95
- }
96
- static fromMAP(MAP) {
97
- return new LogicalType({
98
- MAP
99
- });
100
- }
101
- static fromLIST(LIST) {
102
- return new LogicalType({
103
- LIST
104
- });
105
- }
106
- static fromENUM(ENUM) {
107
- return new LogicalType({
108
- ENUM
109
- });
110
- }
111
- static fromDECIMAL(DECIMAL) {
112
- return new LogicalType({
113
- DECIMAL
114
- });
115
- }
116
- static fromDATE(DATE) {
117
- return new LogicalType({
118
- DATE
119
- });
120
- }
121
- static fromTIME(TIME) {
122
- return new LogicalType({
123
- TIME
124
- });
125
- }
126
- static fromTIMESTAMP(TIMESTAMP) {
127
- return new LogicalType({
128
- TIMESTAMP
129
- });
130
- }
131
- static fromINTEGER(INTEGER) {
132
- return new LogicalType({
133
- INTEGER
134
- });
135
- }
136
- static fromUNKNOWN(UNKNOWN) {
137
- return new LogicalType({
138
- UNKNOWN
139
- });
140
- }
141
- static fromJSON(JSON) {
142
- return new LogicalType({
143
- JSON
144
- });
145
- }
146
- static fromBSON(BSON) {
147
- return new LogicalType({
148
- BSON
149
- });
150
- }
151
- static fromUUID(UUID) {
152
- return new LogicalType({
153
- UUID
154
- });
155
- }
156
- write(output) {
157
- output.writeStructBegin('LogicalType');
158
- if (this.STRING != null) {
159
- output.writeFieldBegin('STRING', thrift.Thrift.Type.STRUCT, 1);
160
- this.STRING.write(output);
161
- output.writeFieldEnd();
98
+ static fromSTRING(STRING) {
99
+ return new LogicalType({ STRING });
162
100
  }
163
- if (this.MAP != null) {
164
- output.writeFieldBegin('MAP', thrift.Thrift.Type.STRUCT, 2);
165
- this.MAP.write(output);
166
- output.writeFieldEnd();
101
+ static fromMAP(MAP) {
102
+ return new LogicalType({ MAP });
167
103
  }
168
- if (this.LIST != null) {
169
- output.writeFieldBegin('LIST', thrift.Thrift.Type.STRUCT, 3);
170
- this.LIST.write(output);
171
- output.writeFieldEnd();
104
+ static fromLIST(LIST) {
105
+ return new LogicalType({ LIST });
172
106
  }
173
- if (this.ENUM != null) {
174
- output.writeFieldBegin('ENUM', thrift.Thrift.Type.STRUCT, 4);
175
- this.ENUM.write(output);
176
- output.writeFieldEnd();
107
+ static fromENUM(ENUM) {
108
+ return new LogicalType({ ENUM });
177
109
  }
178
- if (this.DECIMAL != null) {
179
- output.writeFieldBegin('DECIMAL', thrift.Thrift.Type.STRUCT, 5);
180
- this.DECIMAL.write(output);
181
- output.writeFieldEnd();
110
+ static fromDECIMAL(DECIMAL) {
111
+ return new LogicalType({ DECIMAL });
182
112
  }
183
- if (this.DATE != null) {
184
- output.writeFieldBegin('DATE', thrift.Thrift.Type.STRUCT, 6);
185
- this.DATE.write(output);
186
- output.writeFieldEnd();
113
+ static fromDATE(DATE) {
114
+ return new LogicalType({ DATE });
187
115
  }
188
- if (this.TIME != null) {
189
- output.writeFieldBegin('TIME', thrift.Thrift.Type.STRUCT, 7);
190
- this.TIME.write(output);
191
- output.writeFieldEnd();
116
+ static fromTIME(TIME) {
117
+ return new LogicalType({ TIME });
192
118
  }
193
- if (this.TIMESTAMP != null) {
194
- output.writeFieldBegin('TIMESTAMP', thrift.Thrift.Type.STRUCT, 8);
195
- this.TIMESTAMP.write(output);
196
- output.writeFieldEnd();
119
+ static fromTIMESTAMP(TIMESTAMP) {
120
+ return new LogicalType({ TIMESTAMP });
197
121
  }
198
- if (this.INTEGER != null) {
199
- output.writeFieldBegin('INTEGER', thrift.Thrift.Type.STRUCT, 10);
200
- this.INTEGER.write(output);
201
- output.writeFieldEnd();
122
+ static fromINTEGER(INTEGER) {
123
+ return new LogicalType({ INTEGER });
202
124
  }
203
- if (this.UNKNOWN != null) {
204
- output.writeFieldBegin('UNKNOWN', thrift.Thrift.Type.STRUCT, 11);
205
- this.UNKNOWN.write(output);
206
- output.writeFieldEnd();
125
+ static fromUNKNOWN(UNKNOWN) {
126
+ return new LogicalType({ UNKNOWN });
207
127
  }
208
- if (this.JSON != null) {
209
- output.writeFieldBegin('JSON', thrift.Thrift.Type.STRUCT, 12);
210
- this.JSON.write(output);
211
- output.writeFieldEnd();
128
+ static fromJSON(JSON) {
129
+ return new LogicalType({ JSON });
212
130
  }
213
- if (this.BSON != null) {
214
- output.writeFieldBegin('BSON', thrift.Thrift.Type.STRUCT, 13);
215
- this.BSON.write(output);
216
- output.writeFieldEnd();
131
+ static fromBSON(BSON) {
132
+ return new LogicalType({ BSON });
217
133
  }
218
- if (this.UUID != null) {
219
- output.writeFieldBegin('UUID', thrift.Thrift.Type.STRUCT, 14);
220
- this.UUID.write(output);
221
- output.writeFieldEnd();
134
+ static fromUUID(UUID) {
135
+ return new LogicalType({ UUID });
222
136
  }
223
- output.writeFieldStop();
224
- output.writeStructEnd();
225
- return;
226
- }
227
- static read(input) {
228
- let _fieldsSet = 0;
229
- let _returnValue = null;
230
- input.readStructBegin();
231
- while (true) {
232
- const ret = input.readFieldBegin();
233
- const fieldType = ret.ftype;
234
- const fieldId = ret.fid;
235
- if (fieldType === thrift.Thrift.Type.STOP) {
236
- break;
237
- }
238
- switch (fieldId) {
239
- case 1:
240
- if (fieldType === thrift.Thrift.Type.STRUCT) {
241
- _fieldsSet++;
242
- const value_1 = StringType.StringType.read(input);
243
- _returnValue = LogicalType.fromSTRING(value_1);
244
- } else {
245
- input.skip(fieldType);
246
- }
247
- break;
248
- case 2:
249
- if (fieldType === thrift.Thrift.Type.STRUCT) {
250
- _fieldsSet++;
251
- const value_2 = MapType.MapType.read(input);
252
- _returnValue = LogicalType.fromMAP(value_2);
253
- } else {
254
- input.skip(fieldType);
255
- }
256
- break;
257
- case 3:
258
- if (fieldType === thrift.Thrift.Type.STRUCT) {
259
- _fieldsSet++;
260
- const value_3 = ListType.ListType.read(input);
261
- _returnValue = LogicalType.fromLIST(value_3);
262
- } else {
263
- input.skip(fieldType);
264
- }
265
- break;
266
- case 4:
267
- if (fieldType === thrift.Thrift.Type.STRUCT) {
268
- _fieldsSet++;
269
- const value_4 = EnumType.EnumType.read(input);
270
- _returnValue = LogicalType.fromENUM(value_4);
271
- } else {
272
- input.skip(fieldType);
273
- }
274
- break;
275
- case 5:
276
- if (fieldType === thrift.Thrift.Type.STRUCT) {
277
- _fieldsSet++;
278
- const value_5 = DecimalType.DecimalType.read(input);
279
- _returnValue = LogicalType.fromDECIMAL(value_5);
280
- } else {
281
- input.skip(fieldType);
282
- }
283
- break;
284
- case 6:
285
- if (fieldType === thrift.Thrift.Type.STRUCT) {
286
- _fieldsSet++;
287
- const value_6 = DateType.DateType.read(input);
288
- _returnValue = LogicalType.fromDATE(value_6);
289
- } else {
290
- input.skip(fieldType);
291
- }
292
- break;
293
- case 7:
294
- if (fieldType === thrift.Thrift.Type.STRUCT) {
295
- _fieldsSet++;
296
- const value_7 = TimeType.TimeType.read(input);
297
- _returnValue = LogicalType.fromTIME(value_7);
298
- } else {
299
- input.skip(fieldType);
300
- }
301
- break;
302
- case 8:
303
- if (fieldType === thrift.Thrift.Type.STRUCT) {
304
- _fieldsSet++;
305
- const value_8 = TimestampType.TimestampType.read(input);
306
- _returnValue = LogicalType.fromTIMESTAMP(value_8);
307
- } else {
308
- input.skip(fieldType);
309
- }
310
- break;
311
- case 10:
312
- if (fieldType === thrift.Thrift.Type.STRUCT) {
313
- _fieldsSet++;
314
- const value_9 = IntType.IntType.read(input);
315
- _returnValue = LogicalType.fromINTEGER(value_9);
316
- } else {
317
- input.skip(fieldType);
318
- }
319
- break;
320
- case 11:
321
- if (fieldType === thrift.Thrift.Type.STRUCT) {
322
- _fieldsSet++;
323
- const value_10 = NullType.NullType.read(input);
324
- _returnValue = LogicalType.fromUNKNOWN(value_10);
325
- } else {
326
- input.skip(fieldType);
327
- }
328
- break;
329
- case 12:
330
- if (fieldType === thrift.Thrift.Type.STRUCT) {
331
- _fieldsSet++;
332
- const value_11 = JsonType.JsonType.read(input);
333
- _returnValue = LogicalType.fromJSON(value_11);
334
- } else {
335
- input.skip(fieldType);
336
- }
337
- break;
338
- case 13:
339
- if (fieldType === thrift.Thrift.Type.STRUCT) {
340
- _fieldsSet++;
341
- const value_12 = BsonType.BsonType.read(input);
342
- _returnValue = LogicalType.fromBSON(value_12);
343
- } else {
344
- input.skip(fieldType);
345
- }
346
- break;
347
- case 14:
348
- if (fieldType === thrift.Thrift.Type.STRUCT) {
349
- _fieldsSet++;
350
- const value_13 = UUIDType.UUIDType.read(input);
351
- _returnValue = LogicalType.fromUUID(value_13);
352
- } else {
353
- input.skip(fieldType);
354
- }
355
- break;
356
- default:
357
- {
358
- input.skip(fieldType);
359
- }
360
- }
361
- input.readFieldEnd();
137
+ write(output) {
138
+ output.writeStructBegin('LogicalType');
139
+ if (this.STRING != null) {
140
+ output.writeFieldBegin('STRING', thrift.Thrift.Type.STRUCT, 1);
141
+ this.STRING.write(output);
142
+ output.writeFieldEnd();
143
+ }
144
+ if (this.MAP != null) {
145
+ output.writeFieldBegin('MAP', thrift.Thrift.Type.STRUCT, 2);
146
+ this.MAP.write(output);
147
+ output.writeFieldEnd();
148
+ }
149
+ if (this.LIST != null) {
150
+ output.writeFieldBegin('LIST', thrift.Thrift.Type.STRUCT, 3);
151
+ this.LIST.write(output);
152
+ output.writeFieldEnd();
153
+ }
154
+ if (this.ENUM != null) {
155
+ output.writeFieldBegin('ENUM', thrift.Thrift.Type.STRUCT, 4);
156
+ this.ENUM.write(output);
157
+ output.writeFieldEnd();
158
+ }
159
+ if (this.DECIMAL != null) {
160
+ output.writeFieldBegin('DECIMAL', thrift.Thrift.Type.STRUCT, 5);
161
+ this.DECIMAL.write(output);
162
+ output.writeFieldEnd();
163
+ }
164
+ if (this.DATE != null) {
165
+ output.writeFieldBegin('DATE', thrift.Thrift.Type.STRUCT, 6);
166
+ this.DATE.write(output);
167
+ output.writeFieldEnd();
168
+ }
169
+ if (this.TIME != null) {
170
+ output.writeFieldBegin('TIME', thrift.Thrift.Type.STRUCT, 7);
171
+ this.TIME.write(output);
172
+ output.writeFieldEnd();
173
+ }
174
+ if (this.TIMESTAMP != null) {
175
+ output.writeFieldBegin('TIMESTAMP', thrift.Thrift.Type.STRUCT, 8);
176
+ this.TIMESTAMP.write(output);
177
+ output.writeFieldEnd();
178
+ }
179
+ if (this.INTEGER != null) {
180
+ output.writeFieldBegin('INTEGER', thrift.Thrift.Type.STRUCT, 10);
181
+ this.INTEGER.write(output);
182
+ output.writeFieldEnd();
183
+ }
184
+ if (this.UNKNOWN != null) {
185
+ output.writeFieldBegin('UNKNOWN', thrift.Thrift.Type.STRUCT, 11);
186
+ this.UNKNOWN.write(output);
187
+ output.writeFieldEnd();
188
+ }
189
+ if (this.JSON != null) {
190
+ output.writeFieldBegin('JSON', thrift.Thrift.Type.STRUCT, 12);
191
+ this.JSON.write(output);
192
+ output.writeFieldEnd();
193
+ }
194
+ if (this.BSON != null) {
195
+ output.writeFieldBegin('BSON', thrift.Thrift.Type.STRUCT, 13);
196
+ this.BSON.write(output);
197
+ output.writeFieldEnd();
198
+ }
199
+ if (this.UUID != null) {
200
+ output.writeFieldBegin('UUID', thrift.Thrift.Type.STRUCT, 14);
201
+ this.UUID.write(output);
202
+ output.writeFieldEnd();
203
+ }
204
+ output.writeFieldStop();
205
+ output.writeStructEnd();
206
+ return;
362
207
  }
363
- input.readStructEnd();
364
- if (_fieldsSet > 1) {
365
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with more than one set value!');
366
- } else if (_fieldsSet < 1) {
367
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with no set value!');
208
+ static read(input) {
209
+ let _fieldsSet = 0;
210
+ let _returnValue = null;
211
+ input.readStructBegin();
212
+ while (true) {
213
+ const ret = input.readFieldBegin();
214
+ const fieldType = ret.ftype;
215
+ const fieldId = ret.fid;
216
+ if (fieldType === thrift.Thrift.Type.STOP) {
217
+ break;
218
+ }
219
+ switch (fieldId) {
220
+ case 1:
221
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
222
+ _fieldsSet++;
223
+ const value_1 = StringType.StringType.read(input);
224
+ _returnValue = LogicalType.fromSTRING(value_1);
225
+ }
226
+ else {
227
+ input.skip(fieldType);
228
+ }
229
+ break;
230
+ case 2:
231
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
232
+ _fieldsSet++;
233
+ const value_2 = MapType.MapType.read(input);
234
+ _returnValue = LogicalType.fromMAP(value_2);
235
+ }
236
+ else {
237
+ input.skip(fieldType);
238
+ }
239
+ break;
240
+ case 3:
241
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
242
+ _fieldsSet++;
243
+ const value_3 = ListType.ListType.read(input);
244
+ _returnValue = LogicalType.fromLIST(value_3);
245
+ }
246
+ else {
247
+ input.skip(fieldType);
248
+ }
249
+ break;
250
+ case 4:
251
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
252
+ _fieldsSet++;
253
+ const value_4 = EnumType.EnumType.read(input);
254
+ _returnValue = LogicalType.fromENUM(value_4);
255
+ }
256
+ else {
257
+ input.skip(fieldType);
258
+ }
259
+ break;
260
+ case 5:
261
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
262
+ _fieldsSet++;
263
+ const value_5 = DecimalType.DecimalType.read(input);
264
+ _returnValue = LogicalType.fromDECIMAL(value_5);
265
+ }
266
+ else {
267
+ input.skip(fieldType);
268
+ }
269
+ break;
270
+ case 6:
271
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
272
+ _fieldsSet++;
273
+ const value_6 = DateType.DateType.read(input);
274
+ _returnValue = LogicalType.fromDATE(value_6);
275
+ }
276
+ else {
277
+ input.skip(fieldType);
278
+ }
279
+ break;
280
+ case 7:
281
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
282
+ _fieldsSet++;
283
+ const value_7 = TimeType.TimeType.read(input);
284
+ _returnValue = LogicalType.fromTIME(value_7);
285
+ }
286
+ else {
287
+ input.skip(fieldType);
288
+ }
289
+ break;
290
+ case 8:
291
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
292
+ _fieldsSet++;
293
+ const value_8 = TimestampType.TimestampType.read(input);
294
+ _returnValue = LogicalType.fromTIMESTAMP(value_8);
295
+ }
296
+ else {
297
+ input.skip(fieldType);
298
+ }
299
+ break;
300
+ case 10:
301
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
302
+ _fieldsSet++;
303
+ const value_9 = IntType.IntType.read(input);
304
+ _returnValue = LogicalType.fromINTEGER(value_9);
305
+ }
306
+ else {
307
+ input.skip(fieldType);
308
+ }
309
+ break;
310
+ case 11:
311
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
312
+ _fieldsSet++;
313
+ const value_10 = NullType.NullType.read(input);
314
+ _returnValue = LogicalType.fromUNKNOWN(value_10);
315
+ }
316
+ else {
317
+ input.skip(fieldType);
318
+ }
319
+ break;
320
+ case 12:
321
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
322
+ _fieldsSet++;
323
+ const value_11 = JsonType.JsonType.read(input);
324
+ _returnValue = LogicalType.fromJSON(value_11);
325
+ }
326
+ else {
327
+ input.skip(fieldType);
328
+ }
329
+ break;
330
+ case 13:
331
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
332
+ _fieldsSet++;
333
+ const value_12 = BsonType.BsonType.read(input);
334
+ _returnValue = LogicalType.fromBSON(value_12);
335
+ }
336
+ else {
337
+ input.skip(fieldType);
338
+ }
339
+ break;
340
+ case 14:
341
+ if (fieldType === thrift.Thrift.Type.STRUCT) {
342
+ _fieldsSet++;
343
+ const value_13 = UUIDType.UUIDType.read(input);
344
+ _returnValue = LogicalType.fromUUID(value_13);
345
+ }
346
+ else {
347
+ input.skip(fieldType);
348
+ }
349
+ break;
350
+ default: {
351
+ input.skip(fieldType);
352
+ }
353
+ }
354
+ input.readFieldEnd();
355
+ }
356
+ input.readStructEnd();
357
+ if (_fieldsSet > 1) {
358
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with more than one set value!');
359
+ }
360
+ else if (_fieldsSet < 1) {
361
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with no set value!');
362
+ }
363
+ if (_returnValue !== null) {
364
+ return _returnValue;
365
+ }
366
+ else {
367
+ throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read data for TUnion');
368
+ }
368
369
  }
369
- if (_returnValue !== null) {
370
- return _returnValue;
371
- } else {
372
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read data for TUnion');
373
- }
374
- }
375
370
  }
376
- //# sourceMappingURL=LogicalType.js.map