@loaders.gl/parquet 4.0.0-alpha.23 → 4.0.0-alpha.24

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 (93) hide show
  1. package/dist/dist.min.js +17 -17
  2. package/dist/dist.min.js.map +3 -3
  3. package/dist/es5/parquet-loader.js +1 -1
  4. package/dist/es5/parquet-wasm-loader.js +1 -1
  5. package/dist/es5/parquet-wasm-writer.js +1 -1
  6. package/dist/es5/parquet-writer.js +1 -1
  7. package/dist/esm/parquet-loader.js +1 -1
  8. package/dist/esm/parquet-wasm-loader.js +1 -1
  9. package/dist/esm/parquet-wasm-writer.js +1 -1
  10. package/dist/esm/parquet-writer.js +1 -1
  11. package/dist/parquet-worker.js +17 -17
  12. package/dist/parquet-worker.js.map +3 -3
  13. package/package.json +11 -9
  14. package/dist/bundle.js +0 -5
  15. package/dist/constants.js +0 -18
  16. package/dist/index.js +0 -56
  17. package/dist/lib/arrow/convert-columns-to-row-group.js +0 -1
  18. package/dist/lib/arrow/convert-row-group-to-columns.js +0 -12
  19. package/dist/lib/arrow/convert-schema-from-parquet.js +0 -86
  20. package/dist/lib/arrow/convert-schema-to-parquet.js +0 -71
  21. package/dist/lib/geo/decode-geo-metadata.js +0 -77
  22. package/dist/lib/geo/geoparquet-schema.js +0 -69
  23. package/dist/lib/parsers/parse-parquet-to-columns.js +0 -46
  24. package/dist/lib/parsers/parse-parquet-to-rows.js +0 -37
  25. package/dist/lib/wasm/encode-parquet-wasm.js +0 -30
  26. package/dist/lib/wasm/load-wasm/index.js +0 -5
  27. package/dist/lib/wasm/load-wasm/load-wasm-browser.js +0 -38
  28. package/dist/lib/wasm/load-wasm/load-wasm-node.js +0 -31
  29. package/dist/lib/wasm/parse-parquet-wasm.js +0 -27
  30. package/dist/parquet-loader.js +0 -41
  31. package/dist/parquet-wasm-loader.js +0 -26
  32. package/dist/parquet-wasm-writer.js +0 -24
  33. package/dist/parquet-writer.js +0 -21
  34. package/dist/parquetjs/codecs/declare.js +0 -2
  35. package/dist/parquetjs/codecs/dictionary.js +0 -14
  36. package/dist/parquetjs/codecs/index.js +0 -55
  37. package/dist/parquetjs/codecs/plain.js +0 -211
  38. package/dist/parquetjs/codecs/rle.js +0 -145
  39. package/dist/parquetjs/compression.js +0 -183
  40. package/dist/parquetjs/encoder/parquet-encoder.js +0 -484
  41. package/dist/parquetjs/parquet-thrift/BoundaryOrder.js +0 -15
  42. package/dist/parquetjs/parquet-thrift/BsonType.js +0 -62
  43. package/dist/parquetjs/parquet-thrift/ColumnChunk.js +0 -211
  44. package/dist/parquetjs/parquet-thrift/ColumnIndex.js +0 -217
  45. package/dist/parquetjs/parquet-thrift/ColumnMetaData.js +0 -402
  46. package/dist/parquetjs/parquet-thrift/ColumnOrder.js +0 -108
  47. package/dist/parquetjs/parquet-thrift/CompressionCodec.js +0 -20
  48. package/dist/parquetjs/parquet-thrift/ConvertedType.js +0 -34
  49. package/dist/parquetjs/parquet-thrift/DataPageHeader.js +0 -170
  50. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js +0 -230
  51. package/dist/parquetjs/parquet-thrift/DateType.js +0 -62
  52. package/dist/parquetjs/parquet-thrift/DecimalType.js +0 -109
  53. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js +0 -126
  54. package/dist/parquetjs/parquet-thrift/Encoding.js +0 -20
  55. package/dist/parquetjs/parquet-thrift/EnumType.js +0 -62
  56. package/dist/parquetjs/parquet-thrift/FieldRepetitionType.js +0 -15
  57. package/dist/parquetjs/parquet-thrift/FileMetaData.js +0 -260
  58. package/dist/parquetjs/parquet-thrift/IndexPageHeader.js +0 -62
  59. package/dist/parquetjs/parquet-thrift/IntType.js +0 -109
  60. package/dist/parquetjs/parquet-thrift/JsonType.js +0 -62
  61. package/dist/parquetjs/parquet-thrift/KeyValue.js +0 -106
  62. package/dist/parquetjs/parquet-thrift/ListType.js +0 -62
  63. package/dist/parquetjs/parquet-thrift/LogicalType.js +0 -384
  64. package/dist/parquetjs/parquet-thrift/MapType.js +0 -62
  65. package/dist/parquetjs/parquet-thrift/MicroSeconds.js +0 -62
  66. package/dist/parquetjs/parquet-thrift/MilliSeconds.js +0 -62
  67. package/dist/parquetjs/parquet-thrift/NullType.js +0 -62
  68. package/dist/parquetjs/parquet-thrift/OffsetIndex.js +0 -101
  69. package/dist/parquetjs/parquet-thrift/PageEncodingStats.js +0 -131
  70. package/dist/parquetjs/parquet-thrift/PageHeader.js +0 -220
  71. package/dist/parquetjs/parquet-thrift/PageLocation.js +0 -145
  72. package/dist/parquetjs/parquet-thrift/PageType.js +0 -16
  73. package/dist/parquetjs/parquet-thrift/RowGroup.js +0 -186
  74. package/dist/parquetjs/parquet-thrift/SchemaElement.js +0 -243
  75. package/dist/parquetjs/parquet-thrift/SortingColumn.js +0 -131
  76. package/dist/parquetjs/parquet-thrift/Statistics.js +0 -180
  77. package/dist/parquetjs/parquet-thrift/StringType.js +0 -62
  78. package/dist/parquetjs/parquet-thrift/TimeType.js +0 -110
  79. package/dist/parquetjs/parquet-thrift/TimeUnit.js +0 -131
  80. package/dist/parquetjs/parquet-thrift/TimestampType.js +0 -110
  81. package/dist/parquetjs/parquet-thrift/Type.js +0 -20
  82. package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.js +0 -62
  83. package/dist/parquetjs/parquet-thrift/UUIDType.js +0 -62
  84. package/dist/parquetjs/parquet-thrift/index.js +0 -65
  85. package/dist/parquetjs/parser/decoders.js +0 -318
  86. package/dist/parquetjs/parser/parquet-reader.js +0 -200
  87. package/dist/parquetjs/schema/declare.js +0 -12
  88. package/dist/parquetjs/schema/schema.js +0 -162
  89. package/dist/parquetjs/schema/shred.js +0 -355
  90. package/dist/parquetjs/schema/types.js +0 -416
  91. package/dist/parquetjs/utils/file-utils.js +0 -43
  92. package/dist/parquetjs/utils/read-utils.js +0 -109
  93. package/dist/workers/parquet-worker.js +0 -5
@@ -1,402 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.ColumnMetaData = void 0;
30
- /* tslint:disable */
31
- /* eslint-disable */
32
- /*
33
- * Autogenerated by @creditkarma/thrift-typescript v3.7.2
34
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
35
- */
36
- const node_int64_1 = __importDefault(require("node-int64"));
37
- const thrift = __importStar(require("thrift"));
38
- const KeyValue = __importStar(require("./KeyValue"));
39
- const PageEncodingStats = __importStar(require("./PageEncodingStats"));
40
- const Statistics = __importStar(require("./Statistics"));
41
- class ColumnMetaData {
42
- constructor(args) {
43
- if (args != null && args.type != null) {
44
- this.type = args.type;
45
- }
46
- else {
47
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[type] is unset!');
48
- }
49
- if (args != null && args.encodings != null) {
50
- this.encodings = args.encodings;
51
- }
52
- else {
53
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[encodings] is unset!');
54
- }
55
- if (args != null && args.path_in_schema != null) {
56
- this.path_in_schema = args.path_in_schema;
57
- }
58
- else {
59
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[path_in_schema] is unset!');
60
- }
61
- if (args != null && args.codec != null) {
62
- this.codec = args.codec;
63
- }
64
- else {
65
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[codec] is unset!');
66
- }
67
- if (args != null && args.num_values != null) {
68
- if (typeof args.num_values === 'number') {
69
- this.num_values = new node_int64_1.default(args.num_values);
70
- }
71
- else {
72
- this.num_values = args.num_values;
73
- }
74
- }
75
- else {
76
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_values] is unset!');
77
- }
78
- if (args != null && args.total_uncompressed_size != null) {
79
- if (typeof args.total_uncompressed_size === 'number') {
80
- this.total_uncompressed_size = new node_int64_1.default(args.total_uncompressed_size);
81
- }
82
- else {
83
- this.total_uncompressed_size = args.total_uncompressed_size;
84
- }
85
- }
86
- else {
87
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[total_uncompressed_size] is unset!');
88
- }
89
- if (args != null && args.total_compressed_size != null) {
90
- if (typeof args.total_compressed_size === 'number') {
91
- this.total_compressed_size = new node_int64_1.default(args.total_compressed_size);
92
- }
93
- else {
94
- this.total_compressed_size = args.total_compressed_size;
95
- }
96
- }
97
- else {
98
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[total_compressed_size] is unset!');
99
- }
100
- if (args != null && args.key_value_metadata != null) {
101
- this.key_value_metadata = args.key_value_metadata;
102
- }
103
- if (args != null && args.data_page_offset != null) {
104
- if (typeof args.data_page_offset === 'number') {
105
- this.data_page_offset = new node_int64_1.default(args.data_page_offset);
106
- }
107
- else {
108
- this.data_page_offset = args.data_page_offset;
109
- }
110
- }
111
- else {
112
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[data_page_offset] is unset!');
113
- }
114
- if (args != null && args.index_page_offset != null) {
115
- if (typeof args.index_page_offset === 'number') {
116
- this.index_page_offset = new node_int64_1.default(args.index_page_offset);
117
- }
118
- else {
119
- this.index_page_offset = args.index_page_offset;
120
- }
121
- }
122
- if (args != null && args.dictionary_page_offset != null) {
123
- if (typeof args.dictionary_page_offset === 'number') {
124
- this.dictionary_page_offset = new node_int64_1.default(args.dictionary_page_offset);
125
- }
126
- else {
127
- this.dictionary_page_offset = args.dictionary_page_offset;
128
- }
129
- }
130
- if (args != null && args.statistics != null) {
131
- this.statistics = args.statistics;
132
- }
133
- if (args != null && args.encoding_stats != null) {
134
- this.encoding_stats = args.encoding_stats;
135
- }
136
- }
137
- write(output) {
138
- output.writeStructBegin('ColumnMetaData');
139
- if (this.type != null) {
140
- output.writeFieldBegin('type', thrift.Thrift.Type.I32, 1);
141
- output.writeI32(this.type);
142
- output.writeFieldEnd();
143
- }
144
- if (this.encodings != null) {
145
- output.writeFieldBegin('encodings', thrift.Thrift.Type.LIST, 2);
146
- output.writeListBegin(thrift.Thrift.Type.I32, this.encodings.length);
147
- this.encodings.forEach((value_1) => {
148
- output.writeI32(value_1);
149
- });
150
- output.writeListEnd();
151
- output.writeFieldEnd();
152
- }
153
- if (this.path_in_schema != null) {
154
- output.writeFieldBegin('path_in_schema', thrift.Thrift.Type.LIST, 3);
155
- output.writeListBegin(thrift.Thrift.Type.STRING, this.path_in_schema.length);
156
- this.path_in_schema.forEach((value_2) => {
157
- output.writeString(value_2);
158
- });
159
- output.writeListEnd();
160
- output.writeFieldEnd();
161
- }
162
- if (this.codec != null) {
163
- output.writeFieldBegin('codec', thrift.Thrift.Type.I32, 4);
164
- output.writeI32(this.codec);
165
- output.writeFieldEnd();
166
- }
167
- if (this.num_values != null) {
168
- output.writeFieldBegin('num_values', thrift.Thrift.Type.I64, 5);
169
- output.writeI64(this.num_values);
170
- output.writeFieldEnd();
171
- }
172
- if (this.total_uncompressed_size != null) {
173
- output.writeFieldBegin('total_uncompressed_size', thrift.Thrift.Type.I64, 6);
174
- output.writeI64(this.total_uncompressed_size);
175
- output.writeFieldEnd();
176
- }
177
- if (this.total_compressed_size != null) {
178
- output.writeFieldBegin('total_compressed_size', thrift.Thrift.Type.I64, 7);
179
- output.writeI64(this.total_compressed_size);
180
- output.writeFieldEnd();
181
- }
182
- if (this.key_value_metadata != null) {
183
- output.writeFieldBegin('key_value_metadata', thrift.Thrift.Type.LIST, 8);
184
- output.writeListBegin(thrift.Thrift.Type.STRUCT, this.key_value_metadata.length);
185
- this.key_value_metadata.forEach((value_3) => {
186
- value_3.write(output);
187
- });
188
- output.writeListEnd();
189
- output.writeFieldEnd();
190
- }
191
- if (this.data_page_offset != null) {
192
- output.writeFieldBegin('data_page_offset', thrift.Thrift.Type.I64, 9);
193
- output.writeI64(this.data_page_offset);
194
- output.writeFieldEnd();
195
- }
196
- if (this.index_page_offset != null) {
197
- output.writeFieldBegin('index_page_offset', thrift.Thrift.Type.I64, 10);
198
- output.writeI64(this.index_page_offset);
199
- output.writeFieldEnd();
200
- }
201
- if (this.dictionary_page_offset != null) {
202
- output.writeFieldBegin('dictionary_page_offset', thrift.Thrift.Type.I64, 11);
203
- output.writeI64(this.dictionary_page_offset);
204
- output.writeFieldEnd();
205
- }
206
- if (this.statistics != null) {
207
- output.writeFieldBegin('statistics', thrift.Thrift.Type.STRUCT, 12);
208
- this.statistics.write(output);
209
- output.writeFieldEnd();
210
- }
211
- if (this.encoding_stats != null) {
212
- output.writeFieldBegin('encoding_stats', thrift.Thrift.Type.LIST, 13);
213
- output.writeListBegin(thrift.Thrift.Type.STRUCT, this.encoding_stats.length);
214
- this.encoding_stats.forEach((value_4) => {
215
- value_4.write(output);
216
- });
217
- output.writeListEnd();
218
- output.writeFieldEnd();
219
- }
220
- output.writeFieldStop();
221
- output.writeStructEnd();
222
- return;
223
- }
224
- static read(input) {
225
- input.readStructBegin();
226
- let _args = {};
227
- while (true) {
228
- const ret = input.readFieldBegin();
229
- const fieldType = ret.ftype;
230
- const fieldId = ret.fid;
231
- if (fieldType === thrift.Thrift.Type.STOP) {
232
- break;
233
- }
234
- switch (fieldId) {
235
- case 1:
236
- if (fieldType === thrift.Thrift.Type.I32) {
237
- const value_5 = input.readI32();
238
- _args.type = value_5;
239
- }
240
- else {
241
- input.skip(fieldType);
242
- }
243
- break;
244
- case 2:
245
- if (fieldType === thrift.Thrift.Type.LIST) {
246
- const value_6 = new Array();
247
- const metadata_1 = input.readListBegin();
248
- const size_1 = metadata_1.size;
249
- for (let i_1 = 0; i_1 < size_1; i_1++) {
250
- const value_7 = input.readI32();
251
- value_6.push(value_7);
252
- }
253
- input.readListEnd();
254
- _args.encodings = value_6;
255
- }
256
- else {
257
- input.skip(fieldType);
258
- }
259
- break;
260
- case 3:
261
- if (fieldType === thrift.Thrift.Type.LIST) {
262
- const value_8 = new Array();
263
- const metadata_2 = input.readListBegin();
264
- const size_2 = metadata_2.size;
265
- for (let i_2 = 0; i_2 < size_2; i_2++) {
266
- const value_9 = input.readString();
267
- value_8.push(value_9);
268
- }
269
- input.readListEnd();
270
- _args.path_in_schema = value_8;
271
- }
272
- else {
273
- input.skip(fieldType);
274
- }
275
- break;
276
- case 4:
277
- if (fieldType === thrift.Thrift.Type.I32) {
278
- const value_10 = input.readI32();
279
- _args.codec = value_10;
280
- }
281
- else {
282
- input.skip(fieldType);
283
- }
284
- break;
285
- case 5:
286
- if (fieldType === thrift.Thrift.Type.I64) {
287
- const value_11 = input.readI64();
288
- _args.num_values = value_11;
289
- }
290
- else {
291
- input.skip(fieldType);
292
- }
293
- break;
294
- case 6:
295
- if (fieldType === thrift.Thrift.Type.I64) {
296
- const value_12 = input.readI64();
297
- _args.total_uncompressed_size = value_12;
298
- }
299
- else {
300
- input.skip(fieldType);
301
- }
302
- break;
303
- case 7:
304
- if (fieldType === thrift.Thrift.Type.I64) {
305
- const value_13 = input.readI64();
306
- _args.total_compressed_size = value_13;
307
- }
308
- else {
309
- input.skip(fieldType);
310
- }
311
- break;
312
- case 8:
313
- if (fieldType === thrift.Thrift.Type.LIST) {
314
- const value_14 = new Array();
315
- const metadata_3 = input.readListBegin();
316
- const size_3 = metadata_3.size;
317
- for (let i_3 = 0; i_3 < size_3; i_3++) {
318
- const value_15 = KeyValue.KeyValue.read(input);
319
- value_14.push(value_15);
320
- }
321
- input.readListEnd();
322
- _args.key_value_metadata = value_14;
323
- }
324
- else {
325
- input.skip(fieldType);
326
- }
327
- break;
328
- case 9:
329
- if (fieldType === thrift.Thrift.Type.I64) {
330
- const value_16 = input.readI64();
331
- _args.data_page_offset = value_16;
332
- }
333
- else {
334
- input.skip(fieldType);
335
- }
336
- break;
337
- case 10:
338
- if (fieldType === thrift.Thrift.Type.I64) {
339
- const value_17 = input.readI64();
340
- _args.index_page_offset = value_17;
341
- }
342
- else {
343
- input.skip(fieldType);
344
- }
345
- break;
346
- case 11:
347
- if (fieldType === thrift.Thrift.Type.I64) {
348
- const value_18 = input.readI64();
349
- _args.dictionary_page_offset = value_18;
350
- }
351
- else {
352
- input.skip(fieldType);
353
- }
354
- break;
355
- case 12:
356
- if (fieldType === thrift.Thrift.Type.STRUCT) {
357
- const value_19 = Statistics.Statistics.read(input);
358
- _args.statistics = value_19;
359
- }
360
- else {
361
- input.skip(fieldType);
362
- }
363
- break;
364
- case 13:
365
- if (fieldType === thrift.Thrift.Type.LIST) {
366
- const value_20 = new Array();
367
- const metadata_4 = input.readListBegin();
368
- const size_4 = metadata_4.size;
369
- for (let i_4 = 0; i_4 < size_4; i_4++) {
370
- const value_21 = PageEncodingStats.PageEncodingStats.read(input);
371
- value_20.push(value_21);
372
- }
373
- input.readListEnd();
374
- _args.encoding_stats = value_20;
375
- }
376
- else {
377
- input.skip(fieldType);
378
- }
379
- break;
380
- default: {
381
- input.skip(fieldType);
382
- }
383
- }
384
- input.readFieldEnd();
385
- }
386
- input.readStructEnd();
387
- if (_args.type !== undefined &&
388
- _args.encodings !== undefined &&
389
- _args.path_in_schema !== undefined &&
390
- _args.codec !== undefined &&
391
- _args.num_values !== undefined &&
392
- _args.total_uncompressed_size !== undefined &&
393
- _args.total_compressed_size !== undefined &&
394
- _args.data_page_offset !== undefined) {
395
- return new ColumnMetaData(_args);
396
- }
397
- else {
398
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read ColumnMetaData from input');
399
- }
400
- }
401
- }
402
- exports.ColumnMetaData = ColumnMetaData;
@@ -1,108 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.ColumnOrder = void 0;
27
- /* tslint:disable */
28
- /* eslint-disable */
29
- /*
30
- * Autogenerated by @creditkarma/thrift-typescript v3.7.2
31
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
32
- */
33
- const thrift = __importStar(require("thrift"));
34
- const TypeDefinedOrder = __importStar(require("./TypeDefinedOrder"));
35
- class ColumnOrder {
36
- constructor(args) {
37
- let _fieldsSet = 0;
38
- if (args != null) {
39
- if (args.TYPE_ORDER != null) {
40
- _fieldsSet++;
41
- this.TYPE_ORDER = args.TYPE_ORDER;
42
- }
43
- if (_fieldsSet > 1) {
44
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with more than one set value!');
45
- }
46
- else if (_fieldsSet < 1) {
47
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with no set value!');
48
- }
49
- }
50
- }
51
- static fromTYPE_ORDER(TYPE_ORDER) {
52
- return new ColumnOrder({ TYPE_ORDER });
53
- }
54
- write(output) {
55
- output.writeStructBegin('ColumnOrder');
56
- if (this.TYPE_ORDER != null) {
57
- output.writeFieldBegin('TYPE_ORDER', thrift.Thrift.Type.STRUCT, 1);
58
- this.TYPE_ORDER.write(output);
59
- output.writeFieldEnd();
60
- }
61
- output.writeFieldStop();
62
- output.writeStructEnd();
63
- return;
64
- }
65
- static read(input) {
66
- let _fieldsSet = 0;
67
- let _returnValue = null;
68
- input.readStructBegin();
69
- while (true) {
70
- const ret = input.readFieldBegin();
71
- const fieldType = ret.ftype;
72
- const fieldId = ret.fid;
73
- if (fieldType === thrift.Thrift.Type.STOP) {
74
- break;
75
- }
76
- switch (fieldId) {
77
- case 1:
78
- if (fieldType === thrift.Thrift.Type.STRUCT) {
79
- _fieldsSet++;
80
- const value_1 = TypeDefinedOrder.TypeDefinedOrder.read(input);
81
- _returnValue = ColumnOrder.fromTYPE_ORDER(value_1);
82
- }
83
- else {
84
- input.skip(fieldType);
85
- }
86
- break;
87
- default: {
88
- input.skip(fieldType);
89
- }
90
- }
91
- input.readFieldEnd();
92
- }
93
- input.readStructEnd();
94
- if (_fieldsSet > 1) {
95
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with more than one set value!');
96
- }
97
- else if (_fieldsSet < 1) {
98
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with no set value!');
99
- }
100
- if (_returnValue !== null) {
101
- return _returnValue;
102
- }
103
- else {
104
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read data for TUnion');
105
- }
106
- }
107
- }
108
- exports.ColumnOrder = ColumnOrder;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CompressionCodec = void 0;
4
- /* tslint:disable */
5
- /* eslint-disable */
6
- /*
7
- * Autogenerated by @creditkarma/thrift-typescript v3.7.2
8
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
9
- */
10
- var CompressionCodec;
11
- (function (CompressionCodec) {
12
- CompressionCodec[CompressionCodec["UNCOMPRESSED"] = 0] = "UNCOMPRESSED";
13
- CompressionCodec[CompressionCodec["SNAPPY"] = 1] = "SNAPPY";
14
- CompressionCodec[CompressionCodec["GZIP"] = 2] = "GZIP";
15
- CompressionCodec[CompressionCodec["LZO"] = 3] = "LZO";
16
- CompressionCodec[CompressionCodec["BROTLI"] = 4] = "BROTLI";
17
- CompressionCodec[CompressionCodec["LZ4"] = 5] = "LZ4";
18
- CompressionCodec[CompressionCodec["ZSTD"] = 6] = "ZSTD";
19
- CompressionCodec[CompressionCodec["LZ4_RAW"] = 7] = "LZ4_RAW"; // Added in 2.9
20
- })(CompressionCodec || (exports.CompressionCodec = CompressionCodec = {}));
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ConvertedType = void 0;
4
- /* tslint:disable */
5
- /* eslint-disable */
6
- /*
7
- * Autogenerated by @creditkarma/thrift-typescript v3.7.2
8
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
9
- */
10
- var ConvertedType;
11
- (function (ConvertedType) {
12
- ConvertedType[ConvertedType["UTF8"] = 0] = "UTF8";
13
- ConvertedType[ConvertedType["MAP"] = 1] = "MAP";
14
- ConvertedType[ConvertedType["MAP_KEY_VALUE"] = 2] = "MAP_KEY_VALUE";
15
- ConvertedType[ConvertedType["LIST"] = 3] = "LIST";
16
- ConvertedType[ConvertedType["ENUM"] = 4] = "ENUM";
17
- ConvertedType[ConvertedType["DECIMAL"] = 5] = "DECIMAL";
18
- ConvertedType[ConvertedType["DATE"] = 6] = "DATE";
19
- ConvertedType[ConvertedType["TIME_MILLIS"] = 7] = "TIME_MILLIS";
20
- ConvertedType[ConvertedType["TIME_MICROS"] = 8] = "TIME_MICROS";
21
- ConvertedType[ConvertedType["TIMESTAMP_MILLIS"] = 9] = "TIMESTAMP_MILLIS";
22
- ConvertedType[ConvertedType["TIMESTAMP_MICROS"] = 10] = "TIMESTAMP_MICROS";
23
- ConvertedType[ConvertedType["UINT_8"] = 11] = "UINT_8";
24
- ConvertedType[ConvertedType["UINT_16"] = 12] = "UINT_16";
25
- ConvertedType[ConvertedType["UINT_32"] = 13] = "UINT_32";
26
- ConvertedType[ConvertedType["UINT_64"] = 14] = "UINT_64";
27
- ConvertedType[ConvertedType["INT_8"] = 15] = "INT_8";
28
- ConvertedType[ConvertedType["INT_16"] = 16] = "INT_16";
29
- ConvertedType[ConvertedType["INT_32"] = 17] = "INT_32";
30
- ConvertedType[ConvertedType["INT_64"] = 18] = "INT_64";
31
- ConvertedType[ConvertedType["JSON"] = 19] = "JSON";
32
- ConvertedType[ConvertedType["BSON"] = 20] = "BSON";
33
- ConvertedType[ConvertedType["INTERVAL"] = 21] = "INTERVAL";
34
- })(ConvertedType || (exports.ConvertedType = ConvertedType = {}));