@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,131 +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.SortingColumn = 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
- class SortingColumn {
35
- constructor(args) {
36
- if (args != null && args.column_idx != null) {
37
- this.column_idx = args.column_idx;
38
- }
39
- else {
40
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[column_idx] is unset!');
41
- }
42
- if (args != null && args.descending != null) {
43
- this.descending = args.descending;
44
- }
45
- else {
46
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[descending] is unset!');
47
- }
48
- if (args != null && args.nulls_first != null) {
49
- this.nulls_first = args.nulls_first;
50
- }
51
- else {
52
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[nulls_first] is unset!');
53
- }
54
- }
55
- write(output) {
56
- output.writeStructBegin('SortingColumn');
57
- if (this.column_idx != null) {
58
- output.writeFieldBegin('column_idx', thrift.Thrift.Type.I32, 1);
59
- output.writeI32(this.column_idx);
60
- output.writeFieldEnd();
61
- }
62
- if (this.descending != null) {
63
- output.writeFieldBegin('descending', thrift.Thrift.Type.BOOL, 2);
64
- output.writeBool(this.descending);
65
- output.writeFieldEnd();
66
- }
67
- if (this.nulls_first != null) {
68
- output.writeFieldBegin('nulls_first', thrift.Thrift.Type.BOOL, 3);
69
- output.writeBool(this.nulls_first);
70
- output.writeFieldEnd();
71
- }
72
- output.writeFieldStop();
73
- output.writeStructEnd();
74
- return;
75
- }
76
- static read(input) {
77
- input.readStructBegin();
78
- let _args = {};
79
- while (true) {
80
- const ret = input.readFieldBegin();
81
- const fieldType = ret.ftype;
82
- const fieldId = ret.fid;
83
- if (fieldType === thrift.Thrift.Type.STOP) {
84
- break;
85
- }
86
- switch (fieldId) {
87
- case 1:
88
- if (fieldType === thrift.Thrift.Type.I32) {
89
- const value_1 = input.readI32();
90
- _args.column_idx = value_1;
91
- }
92
- else {
93
- input.skip(fieldType);
94
- }
95
- break;
96
- case 2:
97
- if (fieldType === thrift.Thrift.Type.BOOL) {
98
- const value_2 = input.readBool();
99
- _args.descending = value_2;
100
- }
101
- else {
102
- input.skip(fieldType);
103
- }
104
- break;
105
- case 3:
106
- if (fieldType === thrift.Thrift.Type.BOOL) {
107
- const value_3 = input.readBool();
108
- _args.nulls_first = value_3;
109
- }
110
- else {
111
- input.skip(fieldType);
112
- }
113
- break;
114
- default: {
115
- input.skip(fieldType);
116
- }
117
- }
118
- input.readFieldEnd();
119
- }
120
- input.readStructEnd();
121
- if (_args.column_idx !== undefined &&
122
- _args.descending !== undefined &&
123
- _args.nulls_first !== undefined) {
124
- return new SortingColumn(_args);
125
- }
126
- else {
127
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read SortingColumn from input');
128
- }
129
- }
130
- }
131
- exports.SortingColumn = SortingColumn;
@@ -1,180 +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.Statistics = 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
- class Statistics {
39
- constructor(args) {
40
- if (args != null && args.max != null) {
41
- this.max = args.max;
42
- }
43
- if (args != null && args.min != null) {
44
- this.min = args.min;
45
- }
46
- if (args != null && args.null_count != null) {
47
- if (typeof args.null_count === 'number') {
48
- this.null_count = new node_int64_1.default(args.null_count);
49
- }
50
- else {
51
- this.null_count = args.null_count;
52
- }
53
- }
54
- if (args != null && args.distinct_count != null) {
55
- if (typeof args.distinct_count === 'number') {
56
- this.distinct_count = new node_int64_1.default(args.distinct_count);
57
- }
58
- else {
59
- this.distinct_count = args.distinct_count;
60
- }
61
- }
62
- if (args != null && args.max_value != null) {
63
- this.max_value = args.max_value;
64
- }
65
- if (args != null && args.min_value != null) {
66
- this.min_value = args.min_value;
67
- }
68
- }
69
- write(output) {
70
- output.writeStructBegin('Statistics');
71
- if (this.max != null) {
72
- output.writeFieldBegin('max', thrift.Thrift.Type.STRING, 1);
73
- output.writeBinary(this.max);
74
- output.writeFieldEnd();
75
- }
76
- if (this.min != null) {
77
- output.writeFieldBegin('min', thrift.Thrift.Type.STRING, 2);
78
- output.writeBinary(this.min);
79
- output.writeFieldEnd();
80
- }
81
- if (this.null_count != null) {
82
- output.writeFieldBegin('null_count', thrift.Thrift.Type.I64, 3);
83
- output.writeI64(this.null_count);
84
- output.writeFieldEnd();
85
- }
86
- if (this.distinct_count != null) {
87
- output.writeFieldBegin('distinct_count', thrift.Thrift.Type.I64, 4);
88
- output.writeI64(this.distinct_count);
89
- output.writeFieldEnd();
90
- }
91
- if (this.max_value != null) {
92
- output.writeFieldBegin('max_value', thrift.Thrift.Type.STRING, 5);
93
- output.writeBinary(this.max_value);
94
- output.writeFieldEnd();
95
- }
96
- if (this.min_value != null) {
97
- output.writeFieldBegin('min_value', thrift.Thrift.Type.STRING, 6);
98
- output.writeBinary(this.min_value);
99
- output.writeFieldEnd();
100
- }
101
- output.writeFieldStop();
102
- output.writeStructEnd();
103
- return;
104
- }
105
- static read(input) {
106
- input.readStructBegin();
107
- let _args = {};
108
- while (true) {
109
- const ret = input.readFieldBegin();
110
- const fieldType = ret.ftype;
111
- const fieldId = ret.fid;
112
- if (fieldType === thrift.Thrift.Type.STOP) {
113
- break;
114
- }
115
- switch (fieldId) {
116
- case 1:
117
- if (fieldType === thrift.Thrift.Type.STRING) {
118
- const value_1 = input.readBinary();
119
- _args.max = value_1;
120
- }
121
- else {
122
- input.skip(fieldType);
123
- }
124
- break;
125
- case 2:
126
- if (fieldType === thrift.Thrift.Type.STRING) {
127
- const value_2 = input.readBinary();
128
- _args.min = value_2;
129
- }
130
- else {
131
- input.skip(fieldType);
132
- }
133
- break;
134
- case 3:
135
- if (fieldType === thrift.Thrift.Type.I64) {
136
- const value_3 = input.readI64();
137
- _args.null_count = value_3;
138
- }
139
- else {
140
- input.skip(fieldType);
141
- }
142
- break;
143
- case 4:
144
- if (fieldType === thrift.Thrift.Type.I64) {
145
- const value_4 = input.readI64();
146
- _args.distinct_count = value_4;
147
- }
148
- else {
149
- input.skip(fieldType);
150
- }
151
- break;
152
- case 5:
153
- if (fieldType === thrift.Thrift.Type.STRING) {
154
- const value_5 = input.readBinary();
155
- _args.max_value = value_5;
156
- }
157
- else {
158
- input.skip(fieldType);
159
- }
160
- break;
161
- case 6:
162
- if (fieldType === thrift.Thrift.Type.STRING) {
163
- const value_6 = input.readBinary();
164
- _args.min_value = value_6;
165
- }
166
- else {
167
- input.skip(fieldType);
168
- }
169
- break;
170
- default: {
171
- input.skip(fieldType);
172
- }
173
- }
174
- input.readFieldEnd();
175
- }
176
- input.readStructEnd();
177
- return new Statistics(_args);
178
- }
179
- }
180
- exports.Statistics = Statistics;
@@ -1,62 +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.StringType = 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
- class StringType {
35
- constructor() { }
36
- write(output) {
37
- output.writeStructBegin('StringType');
38
- output.writeFieldStop();
39
- output.writeStructEnd();
40
- return;
41
- }
42
- static read(input) {
43
- input.readStructBegin();
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
- default: {
53
- input.skip(fieldType);
54
- }
55
- }
56
- input.readFieldEnd();
57
- }
58
- input.readStructEnd();
59
- return new StringType();
60
- }
61
- }
62
- exports.StringType = StringType;
@@ -1,110 +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.TimeType = 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 TimeUnit = __importStar(require("./TimeUnit"));
35
- class TimeType {
36
- constructor(args) {
37
- if (args != null && args.isAdjustedToUTC != null) {
38
- this.isAdjustedToUTC = args.isAdjustedToUTC;
39
- }
40
- else {
41
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[isAdjustedToUTC] is unset!');
42
- }
43
- if (args != null && args.unit != null) {
44
- this.unit = args.unit;
45
- }
46
- else {
47
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[unit] is unset!');
48
- }
49
- }
50
- write(output) {
51
- output.writeStructBegin('TimeType');
52
- if (this.isAdjustedToUTC != null) {
53
- output.writeFieldBegin('isAdjustedToUTC', thrift.Thrift.Type.BOOL, 1);
54
- output.writeBool(this.isAdjustedToUTC);
55
- output.writeFieldEnd();
56
- }
57
- if (this.unit != null) {
58
- output.writeFieldBegin('unit', thrift.Thrift.Type.STRUCT, 2);
59
- this.unit.write(output);
60
- output.writeFieldEnd();
61
- }
62
- output.writeFieldStop();
63
- output.writeStructEnd();
64
- return;
65
- }
66
- static read(input) {
67
- input.readStructBegin();
68
- let _args = {};
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.BOOL) {
79
- const value_1 = input.readBool();
80
- _args.isAdjustedToUTC = value_1;
81
- }
82
- else {
83
- input.skip(fieldType);
84
- }
85
- break;
86
- case 2:
87
- if (fieldType === thrift.Thrift.Type.STRUCT) {
88
- const value_2 = TimeUnit.TimeUnit.read(input);
89
- _args.unit = value_2;
90
- }
91
- else {
92
- input.skip(fieldType);
93
- }
94
- break;
95
- default: {
96
- input.skip(fieldType);
97
- }
98
- }
99
- input.readFieldEnd();
100
- }
101
- input.readStructEnd();
102
- if (_args.isAdjustedToUTC !== undefined && _args.unit !== undefined) {
103
- return new TimeType(_args);
104
- }
105
- else {
106
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read TimeType from input');
107
- }
108
- }
109
- }
110
- exports.TimeType = TimeType;
@@ -1,131 +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.TimeUnit = 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 MicroSeconds = __importStar(require("./MicroSeconds"));
35
- const MilliSeconds = __importStar(require("./MilliSeconds"));
36
- class TimeUnit {
37
- constructor(args) {
38
- let _fieldsSet = 0;
39
- if (args != null) {
40
- if (args.MILLIS != null) {
41
- _fieldsSet++;
42
- this.MILLIS = args.MILLIS;
43
- }
44
- if (args.MICROS != null) {
45
- _fieldsSet++;
46
- this.MICROS = args.MICROS;
47
- }
48
- if (_fieldsSet > 1) {
49
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with more than one set value!');
50
- }
51
- else if (_fieldsSet < 1) {
52
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with no set value!');
53
- }
54
- }
55
- }
56
- static fromMILLIS(MILLIS) {
57
- return new TimeUnit({ MILLIS });
58
- }
59
- static fromMICROS(MICROS) {
60
- return new TimeUnit({ MICROS });
61
- }
62
- write(output) {
63
- output.writeStructBegin('TimeUnit');
64
- if (this.MILLIS != null) {
65
- output.writeFieldBegin('MILLIS', thrift.Thrift.Type.STRUCT, 1);
66
- this.MILLIS.write(output);
67
- output.writeFieldEnd();
68
- }
69
- if (this.MICROS != null) {
70
- output.writeFieldBegin('MICROS', thrift.Thrift.Type.STRUCT, 2);
71
- this.MICROS.write(output);
72
- output.writeFieldEnd();
73
- }
74
- output.writeFieldStop();
75
- output.writeStructEnd();
76
- return;
77
- }
78
- static read(input) {
79
- let _fieldsSet = 0;
80
- let _returnValue = null;
81
- input.readStructBegin();
82
- while (true) {
83
- const ret = input.readFieldBegin();
84
- const fieldType = ret.ftype;
85
- const fieldId = ret.fid;
86
- if (fieldType === thrift.Thrift.Type.STOP) {
87
- break;
88
- }
89
- switch (fieldId) {
90
- case 1:
91
- if (fieldType === thrift.Thrift.Type.STRUCT) {
92
- _fieldsSet++;
93
- const value_1 = MilliSeconds.MilliSeconds.read(input);
94
- _returnValue = TimeUnit.fromMILLIS(value_1);
95
- }
96
- else {
97
- input.skip(fieldType);
98
- }
99
- break;
100
- case 2:
101
- if (fieldType === thrift.Thrift.Type.STRUCT) {
102
- _fieldsSet++;
103
- const value_2 = MicroSeconds.MicroSeconds.read(input);
104
- _returnValue = TimeUnit.fromMICROS(value_2);
105
- }
106
- else {
107
- input.skip(fieldType);
108
- }
109
- break;
110
- default: {
111
- input.skip(fieldType);
112
- }
113
- }
114
- input.readFieldEnd();
115
- }
116
- input.readStructEnd();
117
- if (_fieldsSet > 1) {
118
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with more than one set value!');
119
- }
120
- else if (_fieldsSet < 1) {
121
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with no set value!');
122
- }
123
- if (_returnValue !== null) {
124
- return _returnValue;
125
- }
126
- else {
127
- throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read data for TUnion');
128
- }
129
- }
130
- }
131
- exports.TimeUnit = TimeUnit;