@loaders.gl/parquet 4.2.0-alpha.4 → 4.2.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +269 -616
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +12 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/lib/arrow/convert-columns-to-row-group.js +1 -2
- package/dist/lib/arrow/convert-row-group-to-columns.js +8 -6
- package/dist/lib/arrow/convert-schema-from-parquet.d.ts +3 -3
- package/dist/lib/arrow/convert-schema-from-parquet.d.ts.map +1 -1
- package/dist/lib/arrow/convert-schema-from-parquet.js +71 -82
- package/dist/lib/arrow/convert-schema-to-parquet.d.ts +1 -1
- package/dist/lib/arrow/convert-schema-to-parquet.d.ts.map +1 -1
- package/dist/lib/arrow/convert-schema-to-parquet.js +65 -35
- package/dist/lib/constants.js +14 -1
- package/dist/lib/parsers/get-parquet-schema.d.ts +1 -1
- package/dist/lib/parsers/get-parquet-schema.d.ts.map +1 -1
- package/dist/lib/parsers/get-parquet-schema.js +9 -7
- package/dist/lib/parsers/parse-geoparquet.d.ts +1 -1
- package/dist/lib/parsers/parse-geoparquet.d.ts.map +1 -1
- package/dist/lib/parsers/parse-geoparquet.js +47 -45
- package/dist/lib/parsers/parse-parquet-to-columns.d.ts +1 -1
- package/dist/lib/parsers/parse-parquet-to-columns.d.ts.map +1 -1
- package/dist/lib/parsers/parse-parquet-to-columns.js +36 -25
- package/dist/lib/parsers/parse-parquet.d.ts +1 -1
- package/dist/lib/parsers/parse-parquet.d.ts.map +1 -1
- package/dist/lib/parsers/parse-parquet.js +62 -50
- package/dist/lib/wasm/encode-parquet-wasm.d.ts +1 -1
- package/dist/lib/wasm/encode-parquet-wasm.d.ts.map +1 -1
- package/dist/lib/wasm/encode-parquet-wasm.js +49 -12
- package/dist/lib/wasm/load-wasm.js +13 -10
- package/dist/lib/wasm/parse-parquet-wasm.d.ts +1 -1
- package/dist/lib/wasm/parse-parquet-wasm.d.ts.map +1 -1
- package/dist/lib/wasm/parse-parquet-wasm.js +19 -15
- package/dist/parquet-loader.d.ts +1 -1
- package/dist/parquet-loader.d.ts.map +1 -1
- package/dist/parquet-loader.js +77 -64
- package/dist/parquet-wasm-loader.js +25 -28
- package/dist/parquet-wasm-writer.js +19 -23
- package/dist/parquet-writer.js +16 -12
- package/dist/parquetjs/codecs/declare.d.ts +1 -1
- package/dist/parquetjs/codecs/declare.d.ts.map +1 -1
- package/dist/parquetjs/codecs/declare.js +0 -1
- package/dist/parquetjs/codecs/dictionary.js +4 -8
- package/dist/parquetjs/codecs/index.d.ts +3 -3
- package/dist/parquetjs/codecs/index.d.ts.map +1 -1
- package/dist/parquetjs/codecs/index.js +20 -17
- package/dist/parquetjs/codecs/plain.d.ts +2 -2
- package/dist/parquetjs/codecs/plain.d.ts.map +1 -1
- package/dist/parquetjs/codecs/plain.js +166 -162
- package/dist/parquetjs/codecs/rle.d.ts +2 -2
- package/dist/parquetjs/codecs/rle.d.ts.map +1 -1
- package/dist/parquetjs/codecs/rle.js +124 -105
- package/dist/parquetjs/compression.d.ts +1 -1
- package/dist/parquetjs/compression.d.ts.map +1 -1
- package/dist/parquetjs/compression.js +157 -43
- package/dist/parquetjs/encoder/parquet-encoder.d.ts +3 -3
- package/dist/parquetjs/encoder/parquet-encoder.d.ts.map +1 -1
- package/dist/parquetjs/encoder/parquet-encoder.js +406 -275
- package/dist/parquetjs/parquet-thrift/BoundaryOrder.js +12 -7
- package/dist/parquetjs/parquet-thrift/BsonType.js +31 -27
- package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnChunk.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnChunk.js +175 -166
- package/dist/parquetjs/parquet-thrift/ColumnIndex.d.ts +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnIndex.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnIndex.js +178 -166
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts +6 -6
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.js +359 -333
- package/dist/parquetjs/parquet-thrift/ColumnOrder.d.ts +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnOrder.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/ColumnOrder.js +73 -68
- package/dist/parquetjs/parquet-thrift/CompressionCodec.js +17 -12
- package/dist/parquetjs/parquet-thrift/ConvertedType.js +31 -26
- package/dist/parquetjs/parquet-thrift/DataPageHeader.d.ts +2 -2
- package/dist/parquetjs/parquet-thrift/DataPageHeader.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/DataPageHeader.js +136 -124
- package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.d.ts +2 -2
- package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js +198 -181
- package/dist/parquetjs/parquet-thrift/DateType.js +31 -27
- package/dist/parquetjs/parquet-thrift/DecimalType.js +76 -69
- package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.d.ts +1 -1
- package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js +93 -86
- package/dist/parquetjs/parquet-thrift/Encoding.js +17 -12
- package/dist/parquetjs/parquet-thrift/EnumType.js +31 -27
- package/dist/parquetjs/parquet-thrift/FieldRepetitionType.js +12 -7
- package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts +4 -4
- package/dist/parquetjs/parquet-thrift/FileMetaData.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/FileMetaData.js +217 -205
- package/dist/parquetjs/parquet-thrift/IndexPageHeader.js +31 -27
- package/dist/parquetjs/parquet-thrift/IntType.js +76 -69
- package/dist/parquetjs/parquet-thrift/JsonType.js +31 -27
- package/dist/parquetjs/parquet-thrift/KeyValue.js +73 -67
- package/dist/parquetjs/parquet-thrift/ListType.js +31 -27
- package/dist/parquetjs/parquet-thrift/LogicalType.d.ts +13 -13
- package/dist/parquetjs/parquet-thrift/LogicalType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/LogicalType.js +325 -344
- package/dist/parquetjs/parquet-thrift/MapType.js +31 -27
- package/dist/parquetjs/parquet-thrift/MicroSeconds.js +31 -27
- package/dist/parquetjs/parquet-thrift/MilliSeconds.js +31 -27
- package/dist/parquetjs/parquet-thrift/NullType.js +31 -27
- package/dist/parquetjs/parquet-thrift/OffsetIndex.d.ts +1 -1
- package/dist/parquetjs/parquet-thrift/OffsetIndex.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/OffsetIndex.js +66 -60
- package/dist/parquetjs/parquet-thrift/PageEncodingStats.d.ts +2 -2
- package/dist/parquetjs/parquet-thrift/PageEncodingStats.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/PageEncodingStats.js +98 -88
- package/dist/parquetjs/parquet-thrift/PageHeader.d.ts +5 -5
- package/dist/parquetjs/parquet-thrift/PageHeader.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/PageHeader.js +185 -175
- package/dist/parquetjs/parquet-thrift/PageLocation.js +108 -96
- package/dist/parquetjs/parquet-thrift/PageType.js +13 -8
- package/dist/parquetjs/parquet-thrift/RowGroup.d.ts +2 -2
- package/dist/parquetjs/parquet-thrift/RowGroup.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/RowGroup.js +145 -133
- package/dist/parquetjs/parquet-thrift/SchemaElement.d.ts +4 -4
- package/dist/parquetjs/parquet-thrift/SchemaElement.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/SchemaElement.js +211 -205
- package/dist/parquetjs/parquet-thrift/SortingColumn.js +98 -88
- package/dist/parquetjs/parquet-thrift/Statistics.js +143 -137
- package/dist/parquetjs/parquet-thrift/StringType.js +31 -27
- package/dist/parquetjs/parquet-thrift/TimeType.d.ts +1 -1
- package/dist/parquetjs/parquet-thrift/TimeType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/TimeType.js +76 -69
- package/dist/parquetjs/parquet-thrift/TimeUnit.d.ts +2 -2
- package/dist/parquetjs/parquet-thrift/TimeUnit.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/TimeUnit.js +94 -91
- package/dist/parquetjs/parquet-thrift/TimestampType.d.ts +1 -1
- package/dist/parquetjs/parquet-thrift/TimestampType.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/TimestampType.js +76 -69
- package/dist/parquetjs/parquet-thrift/Type.js +17 -12
- package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.js +31 -27
- package/dist/parquetjs/parquet-thrift/UUIDType.js +31 -27
- package/dist/parquetjs/parquet-thrift/index.d.ts +44 -44
- package/dist/parquetjs/parquet-thrift/index.d.ts.map +1 -1
- package/dist/parquetjs/parquet-thrift/index.js +6 -1
- package/dist/parquetjs/parser/decoders.d.ts +3 -3
- package/dist/parquetjs/parser/decoders.d.ts.map +1 -1
- package/dist/parquetjs/parser/decoders.js +306 -242
- package/dist/parquetjs/parser/parquet-reader.d.ts +3 -3
- package/dist/parquetjs/parser/parquet-reader.d.ts.map +1 -1
- package/dist/parquetjs/parser/parquet-reader.js +179 -157
- package/dist/parquetjs/schema/declare.d.ts +1 -1
- package/dist/parquetjs/schema/declare.d.ts.map +1 -1
- package/dist/parquetjs/schema/declare.js +6 -9
- package/dist/parquetjs/schema/schema.d.ts +1 -1
- package/dist/parquetjs/schema/schema.d.ts.map +1 -1
- package/dist/parquetjs/schema/schema.js +139 -120
- package/dist/parquetjs/schema/shred.d.ts +2 -2
- package/dist/parquetjs/schema/shred.d.ts.map +1 -1
- package/dist/parquetjs/schema/shred.js +301 -204
- package/dist/parquetjs/schema/types.d.ts +1 -1
- package/dist/parquetjs/schema/types.d.ts.map +1 -1
- package/dist/parquetjs/schema/types.js +328 -314
- package/dist/parquetjs/utils/file-utils.js +24 -23
- package/dist/parquetjs/utils/read-utils.d.ts +1 -1
- package/dist/parquetjs/utils/read-utils.d.ts.map +1 -1
- package/dist/parquetjs/utils/read-utils.js +79 -69
- package/dist/polyfills/buffer/buffer-polyfill.browser.js +8 -3
- package/dist/polyfills/buffer/buffer-polyfill.node.js +13 -8
- package/dist/polyfills/buffer/buffer.js +1750 -1367
- package/dist/polyfills/buffer/index.d.ts +3 -3
- package/dist/polyfills/buffer/index.d.ts.map +1 -1
- package/dist/polyfills/buffer/index.js +5 -1
- package/dist/polyfills/buffer/install-buffer-polyfill.js +2 -1
- package/dist/polyfills/util.js +4 -1
- package/dist/workers/parquet-worker.js +3 -1
- package/package.json +15 -13
- package/src/index.ts +1 -1
- package/src/lib/parsers/parse-parquet-to-columns.ts +1 -1
- package/src/lib/parsers/parse-parquet.ts +1 -1
- package/src/parquetjs/encoder/parquet-encoder.ts +2 -2
- package/src/parquetjs/parser/decoders.ts +2 -2
- package/src/parquetjs/parser/parquet-reader.ts +1 -1
- package/src/parquetjs/schema/schema.ts +1 -1
- package/src/parquetjs/utils/read-utils.ts +2 -2
- package/dist/index.js.map +0 -1
- package/dist/lib/arrow/convert-columns-to-row-group.js.map +0 -1
- package/dist/lib/arrow/convert-row-group-to-columns.js.map +0 -1
- package/dist/lib/arrow/convert-schema-from-parquet.js.map +0 -1
- package/dist/lib/arrow/convert-schema-to-parquet.js.map +0 -1
- package/dist/lib/constants.js.map +0 -1
- package/dist/lib/parsers/get-parquet-schema.js.map +0 -1
- package/dist/lib/parsers/parse-geoparquet.js.map +0 -1
- package/dist/lib/parsers/parse-parquet-to-columns.js.map +0 -1
- package/dist/lib/parsers/parse-parquet.js.map +0 -1
- package/dist/lib/wasm/encode-parquet-wasm.js.map +0 -1
- package/dist/lib/wasm/load-wasm.js.map +0 -1
- package/dist/lib/wasm/parse-parquet-wasm.js.map +0 -1
- package/dist/lib/wip/convert-schema-deep.java.disabled +0 -910
- package/dist/lib/wip/convert-schema-deep.rs.disabled +0 -976
- package/dist/parquet-loader.js.map +0 -1
- package/dist/parquet-wasm-loader.js.map +0 -1
- package/dist/parquet-wasm-writer.js.map +0 -1
- package/dist/parquet-writer.js.map +0 -1
- package/dist/parquetjs/LICENSE +0 -20
- package/dist/parquetjs/codecs/declare.js.map +0 -1
- package/dist/parquetjs/codecs/dictionary.js.map +0 -1
- package/dist/parquetjs/codecs/index.js.map +0 -1
- package/dist/parquetjs/codecs/plain.js.map +0 -1
- package/dist/parquetjs/codecs/rle.js.map +0 -1
- package/dist/parquetjs/compression.js.map +0 -1
- package/dist/parquetjs/encoder/parquet-encoder.js.map +0 -1
- package/dist/parquetjs/modules.d.ts +0 -21
- package/dist/parquetjs/parquet-thrift/BoundaryOrder.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/BsonType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/ColumnChunk.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/ColumnIndex.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/ColumnOrder.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/CompressionCodec.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/ConvertedType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/DataPageHeader.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/DateType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/DecimalType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/Encoding.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/EnumType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/FieldRepetitionType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/FileMetaData.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/IndexPageHeader.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/IntType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/JsonType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/KeyValue.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/ListType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/LogicalType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/MapType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/MicroSeconds.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/MilliSeconds.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/NullType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/OffsetIndex.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/PageEncodingStats.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/PageHeader.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/PageLocation.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/PageType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/RowGroup.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/SchemaElement.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/SortingColumn.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/Statistics.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/StringType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/TimeType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/TimeUnit.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/TimestampType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/Type.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/UUIDType.js.map +0 -1
- package/dist/parquetjs/parquet-thrift/index.js.map +0 -1
- package/dist/parquetjs/parser/decoders.js.map +0 -1
- package/dist/parquetjs/parser/parquet-reader.js.map +0 -1
- package/dist/parquetjs/schema/declare.js.map +0 -1
- package/dist/parquetjs/schema/schema.js.map +0 -1
- package/dist/parquetjs/schema/shred.js.map +0 -1
- package/dist/parquetjs/schema/types.js.map +0 -1
- package/dist/parquetjs/utils/file-utils.js.map +0 -1
- package/dist/parquetjs/utils/read-utils.js.map +0 -1
- package/dist/polyfills/buffer/buffer-polyfill.browser.js.map +0 -1
- package/dist/polyfills/buffer/buffer-polyfill.node.js.map +0 -1
- package/dist/polyfills/buffer/buffer.js.map +0 -1
- package/dist/polyfills/buffer/index.js.map +0 -1
- package/dist/polyfills/buffer/install-buffer-polyfill.js.map +0 -1
- package/dist/polyfills/util.js.map +0 -1
- 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,339 @@ 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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
+
constructor(args) {
|
|
23
|
+
let _fieldsSet = 0;
|
|
24
|
+
if (args != null) {
|
|
25
|
+
if (args.STRING != null) {
|
|
26
|
+
_fieldsSet++;
|
|
27
|
+
this.STRING = args.STRING;
|
|
28
|
+
}
|
|
29
|
+
if (args.MAP != null) {
|
|
30
|
+
_fieldsSet++;
|
|
31
|
+
this.MAP = args.MAP;
|
|
32
|
+
}
|
|
33
|
+
if (args.LIST != null) {
|
|
34
|
+
_fieldsSet++;
|
|
35
|
+
this.LIST = args.LIST;
|
|
36
|
+
}
|
|
37
|
+
if (args.ENUM != null) {
|
|
38
|
+
_fieldsSet++;
|
|
39
|
+
this.ENUM = args.ENUM;
|
|
40
|
+
}
|
|
41
|
+
if (args.DECIMAL != null) {
|
|
42
|
+
_fieldsSet++;
|
|
43
|
+
this.DECIMAL = args.DECIMAL;
|
|
44
|
+
}
|
|
45
|
+
if (args.DATE != null) {
|
|
46
|
+
_fieldsSet++;
|
|
47
|
+
this.DATE = args.DATE;
|
|
48
|
+
}
|
|
49
|
+
if (args.TIME != null) {
|
|
50
|
+
_fieldsSet++;
|
|
51
|
+
this.TIME = args.TIME;
|
|
52
|
+
}
|
|
53
|
+
if (args.TIMESTAMP != null) {
|
|
54
|
+
_fieldsSet++;
|
|
55
|
+
this.TIMESTAMP = args.TIMESTAMP;
|
|
56
|
+
}
|
|
57
|
+
if (args.INTEGER != null) {
|
|
58
|
+
_fieldsSet++;
|
|
59
|
+
this.INTEGER = args.INTEGER;
|
|
60
|
+
}
|
|
61
|
+
if (args.UNKNOWN != null) {
|
|
62
|
+
_fieldsSet++;
|
|
63
|
+
this.UNKNOWN = args.UNKNOWN;
|
|
64
|
+
}
|
|
65
|
+
if (args.JSON != null) {
|
|
66
|
+
_fieldsSet++;
|
|
67
|
+
this.JSON = args.JSON;
|
|
68
|
+
}
|
|
69
|
+
if (args.BSON != null) {
|
|
70
|
+
_fieldsSet++;
|
|
71
|
+
this.BSON = args.BSON;
|
|
72
|
+
}
|
|
73
|
+
if (args.UUID != null) {
|
|
74
|
+
_fieldsSet++;
|
|
75
|
+
this.UUID = args.UUID;
|
|
76
|
+
}
|
|
77
|
+
if (_fieldsSet > 1) {
|
|
78
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with more than one set value!');
|
|
79
|
+
}
|
|
80
|
+
else if (_fieldsSet < 1) {
|
|
81
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with no set value!');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
89
84
|
}
|
|
90
|
-
|
|
91
|
-
|
|
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();
|
|
85
|
+
static fromSTRING(STRING) {
|
|
86
|
+
return new LogicalType({ STRING });
|
|
162
87
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
this.MAP.write(output);
|
|
166
|
-
output.writeFieldEnd();
|
|
88
|
+
static fromMAP(MAP) {
|
|
89
|
+
return new LogicalType({ MAP });
|
|
167
90
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
this.LIST.write(output);
|
|
171
|
-
output.writeFieldEnd();
|
|
91
|
+
static fromLIST(LIST) {
|
|
92
|
+
return new LogicalType({ LIST });
|
|
172
93
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
this.ENUM.write(output);
|
|
176
|
-
output.writeFieldEnd();
|
|
94
|
+
static fromENUM(ENUM) {
|
|
95
|
+
return new LogicalType({ ENUM });
|
|
177
96
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
this.DECIMAL.write(output);
|
|
181
|
-
output.writeFieldEnd();
|
|
97
|
+
static fromDECIMAL(DECIMAL) {
|
|
98
|
+
return new LogicalType({ DECIMAL });
|
|
182
99
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
this.DATE.write(output);
|
|
186
|
-
output.writeFieldEnd();
|
|
100
|
+
static fromDATE(DATE) {
|
|
101
|
+
return new LogicalType({ DATE });
|
|
187
102
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
this.TIME.write(output);
|
|
191
|
-
output.writeFieldEnd();
|
|
103
|
+
static fromTIME(TIME) {
|
|
104
|
+
return new LogicalType({ TIME });
|
|
192
105
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
this.TIMESTAMP.write(output);
|
|
196
|
-
output.writeFieldEnd();
|
|
106
|
+
static fromTIMESTAMP(TIMESTAMP) {
|
|
107
|
+
return new LogicalType({ TIMESTAMP });
|
|
197
108
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
this.INTEGER.write(output);
|
|
201
|
-
output.writeFieldEnd();
|
|
109
|
+
static fromINTEGER(INTEGER) {
|
|
110
|
+
return new LogicalType({ INTEGER });
|
|
202
111
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
this.UNKNOWN.write(output);
|
|
206
|
-
output.writeFieldEnd();
|
|
112
|
+
static fromUNKNOWN(UNKNOWN) {
|
|
113
|
+
return new LogicalType({ UNKNOWN });
|
|
207
114
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
this.JSON.write(output);
|
|
211
|
-
output.writeFieldEnd();
|
|
115
|
+
static fromJSON(JSON) {
|
|
116
|
+
return new LogicalType({ JSON });
|
|
212
117
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
this.BSON.write(output);
|
|
216
|
-
output.writeFieldEnd();
|
|
118
|
+
static fromBSON(BSON) {
|
|
119
|
+
return new LogicalType({ BSON });
|
|
217
120
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
this.UUID.write(output);
|
|
221
|
-
output.writeFieldEnd();
|
|
121
|
+
static fromUUID(UUID) {
|
|
122
|
+
return new LogicalType({ UUID });
|
|
222
123
|
}
|
|
223
|
-
output
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
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();
|
|
124
|
+
write(output) {
|
|
125
|
+
output.writeStructBegin('LogicalType');
|
|
126
|
+
if (this.STRING != null) {
|
|
127
|
+
output.writeFieldBegin('STRING', thrift.Thrift.Type.STRUCT, 1);
|
|
128
|
+
this.STRING.write(output);
|
|
129
|
+
output.writeFieldEnd();
|
|
130
|
+
}
|
|
131
|
+
if (this.MAP != null) {
|
|
132
|
+
output.writeFieldBegin('MAP', thrift.Thrift.Type.STRUCT, 2);
|
|
133
|
+
this.MAP.write(output);
|
|
134
|
+
output.writeFieldEnd();
|
|
135
|
+
}
|
|
136
|
+
if (this.LIST != null) {
|
|
137
|
+
output.writeFieldBegin('LIST', thrift.Thrift.Type.STRUCT, 3);
|
|
138
|
+
this.LIST.write(output);
|
|
139
|
+
output.writeFieldEnd();
|
|
140
|
+
}
|
|
141
|
+
if (this.ENUM != null) {
|
|
142
|
+
output.writeFieldBegin('ENUM', thrift.Thrift.Type.STRUCT, 4);
|
|
143
|
+
this.ENUM.write(output);
|
|
144
|
+
output.writeFieldEnd();
|
|
145
|
+
}
|
|
146
|
+
if (this.DECIMAL != null) {
|
|
147
|
+
output.writeFieldBegin('DECIMAL', thrift.Thrift.Type.STRUCT, 5);
|
|
148
|
+
this.DECIMAL.write(output);
|
|
149
|
+
output.writeFieldEnd();
|
|
150
|
+
}
|
|
151
|
+
if (this.DATE != null) {
|
|
152
|
+
output.writeFieldBegin('DATE', thrift.Thrift.Type.STRUCT, 6);
|
|
153
|
+
this.DATE.write(output);
|
|
154
|
+
output.writeFieldEnd();
|
|
155
|
+
}
|
|
156
|
+
if (this.TIME != null) {
|
|
157
|
+
output.writeFieldBegin('TIME', thrift.Thrift.Type.STRUCT, 7);
|
|
158
|
+
this.TIME.write(output);
|
|
159
|
+
output.writeFieldEnd();
|
|
160
|
+
}
|
|
161
|
+
if (this.TIMESTAMP != null) {
|
|
162
|
+
output.writeFieldBegin('TIMESTAMP', thrift.Thrift.Type.STRUCT, 8);
|
|
163
|
+
this.TIMESTAMP.write(output);
|
|
164
|
+
output.writeFieldEnd();
|
|
165
|
+
}
|
|
166
|
+
if (this.INTEGER != null) {
|
|
167
|
+
output.writeFieldBegin('INTEGER', thrift.Thrift.Type.STRUCT, 10);
|
|
168
|
+
this.INTEGER.write(output);
|
|
169
|
+
output.writeFieldEnd();
|
|
170
|
+
}
|
|
171
|
+
if (this.UNKNOWN != null) {
|
|
172
|
+
output.writeFieldBegin('UNKNOWN', thrift.Thrift.Type.STRUCT, 11);
|
|
173
|
+
this.UNKNOWN.write(output);
|
|
174
|
+
output.writeFieldEnd();
|
|
175
|
+
}
|
|
176
|
+
if (this.JSON != null) {
|
|
177
|
+
output.writeFieldBegin('JSON', thrift.Thrift.Type.STRUCT, 12);
|
|
178
|
+
this.JSON.write(output);
|
|
179
|
+
output.writeFieldEnd();
|
|
180
|
+
}
|
|
181
|
+
if (this.BSON != null) {
|
|
182
|
+
output.writeFieldBegin('BSON', thrift.Thrift.Type.STRUCT, 13);
|
|
183
|
+
this.BSON.write(output);
|
|
184
|
+
output.writeFieldEnd();
|
|
185
|
+
}
|
|
186
|
+
if (this.UUID != null) {
|
|
187
|
+
output.writeFieldBegin('UUID', thrift.Thrift.Type.STRUCT, 14);
|
|
188
|
+
this.UUID.write(output);
|
|
189
|
+
output.writeFieldEnd();
|
|
190
|
+
}
|
|
191
|
+
output.writeFieldStop();
|
|
192
|
+
output.writeStructEnd();
|
|
193
|
+
return;
|
|
362
194
|
}
|
|
363
|
-
input
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
195
|
+
static read(input) {
|
|
196
|
+
let _fieldsSet = 0;
|
|
197
|
+
let _returnValue = null;
|
|
198
|
+
input.readStructBegin();
|
|
199
|
+
while (true) {
|
|
200
|
+
const ret = input.readFieldBegin();
|
|
201
|
+
const fieldType = ret.ftype;
|
|
202
|
+
const fieldId = ret.fid;
|
|
203
|
+
if (fieldType === thrift.Thrift.Type.STOP) {
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
switch (fieldId) {
|
|
207
|
+
case 1:
|
|
208
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
209
|
+
_fieldsSet++;
|
|
210
|
+
const value_1 = StringType.StringType.read(input);
|
|
211
|
+
_returnValue = LogicalType.fromSTRING(value_1);
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
input.skip(fieldType);
|
|
215
|
+
}
|
|
216
|
+
break;
|
|
217
|
+
case 2:
|
|
218
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
219
|
+
_fieldsSet++;
|
|
220
|
+
const value_2 = MapType.MapType.read(input);
|
|
221
|
+
_returnValue = LogicalType.fromMAP(value_2);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
input.skip(fieldType);
|
|
225
|
+
}
|
|
226
|
+
break;
|
|
227
|
+
case 3:
|
|
228
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
229
|
+
_fieldsSet++;
|
|
230
|
+
const value_3 = ListType.ListType.read(input);
|
|
231
|
+
_returnValue = LogicalType.fromLIST(value_3);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
input.skip(fieldType);
|
|
235
|
+
}
|
|
236
|
+
break;
|
|
237
|
+
case 4:
|
|
238
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
239
|
+
_fieldsSet++;
|
|
240
|
+
const value_4 = EnumType.EnumType.read(input);
|
|
241
|
+
_returnValue = LogicalType.fromENUM(value_4);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
input.skip(fieldType);
|
|
245
|
+
}
|
|
246
|
+
break;
|
|
247
|
+
case 5:
|
|
248
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
249
|
+
_fieldsSet++;
|
|
250
|
+
const value_5 = DecimalType.DecimalType.read(input);
|
|
251
|
+
_returnValue = LogicalType.fromDECIMAL(value_5);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
input.skip(fieldType);
|
|
255
|
+
}
|
|
256
|
+
break;
|
|
257
|
+
case 6:
|
|
258
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
259
|
+
_fieldsSet++;
|
|
260
|
+
const value_6 = DateType.DateType.read(input);
|
|
261
|
+
_returnValue = LogicalType.fromDATE(value_6);
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
input.skip(fieldType);
|
|
265
|
+
}
|
|
266
|
+
break;
|
|
267
|
+
case 7:
|
|
268
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
269
|
+
_fieldsSet++;
|
|
270
|
+
const value_7 = TimeType.TimeType.read(input);
|
|
271
|
+
_returnValue = LogicalType.fromTIME(value_7);
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
input.skip(fieldType);
|
|
275
|
+
}
|
|
276
|
+
break;
|
|
277
|
+
case 8:
|
|
278
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
279
|
+
_fieldsSet++;
|
|
280
|
+
const value_8 = TimestampType.TimestampType.read(input);
|
|
281
|
+
_returnValue = LogicalType.fromTIMESTAMP(value_8);
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
input.skip(fieldType);
|
|
285
|
+
}
|
|
286
|
+
break;
|
|
287
|
+
case 10:
|
|
288
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
289
|
+
_fieldsSet++;
|
|
290
|
+
const value_9 = IntType.IntType.read(input);
|
|
291
|
+
_returnValue = LogicalType.fromINTEGER(value_9);
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
input.skip(fieldType);
|
|
295
|
+
}
|
|
296
|
+
break;
|
|
297
|
+
case 11:
|
|
298
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
299
|
+
_fieldsSet++;
|
|
300
|
+
const value_10 = NullType.NullType.read(input);
|
|
301
|
+
_returnValue = LogicalType.fromUNKNOWN(value_10);
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
input.skip(fieldType);
|
|
305
|
+
}
|
|
306
|
+
break;
|
|
307
|
+
case 12:
|
|
308
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
309
|
+
_fieldsSet++;
|
|
310
|
+
const value_11 = JsonType.JsonType.read(input);
|
|
311
|
+
_returnValue = LogicalType.fromJSON(value_11);
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
input.skip(fieldType);
|
|
315
|
+
}
|
|
316
|
+
break;
|
|
317
|
+
case 13:
|
|
318
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
319
|
+
_fieldsSet++;
|
|
320
|
+
const value_12 = BsonType.BsonType.read(input);
|
|
321
|
+
_returnValue = LogicalType.fromBSON(value_12);
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
input.skip(fieldType);
|
|
325
|
+
}
|
|
326
|
+
break;
|
|
327
|
+
case 14:
|
|
328
|
+
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
329
|
+
_fieldsSet++;
|
|
330
|
+
const value_13 = UUIDType.UUIDType.read(input);
|
|
331
|
+
_returnValue = LogicalType.fromUUID(value_13);
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
input.skip(fieldType);
|
|
335
|
+
}
|
|
336
|
+
break;
|
|
337
|
+
default: {
|
|
338
|
+
input.skip(fieldType);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
input.readFieldEnd();
|
|
342
|
+
}
|
|
343
|
+
input.readStructEnd();
|
|
344
|
+
if (_fieldsSet > 1) {
|
|
345
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with more than one set value!');
|
|
346
|
+
}
|
|
347
|
+
else if (_fieldsSet < 1) {
|
|
348
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.INVALID_DATA, 'Cannot read a TUnion with no set value!');
|
|
349
|
+
}
|
|
350
|
+
if (_returnValue !== null) {
|
|
351
|
+
return _returnValue;
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read data for TUnion');
|
|
355
|
+
}
|
|
368
356
|
}
|
|
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
357
|
}
|
|
376
|
-
//# sourceMappingURL=LogicalType.js.map
|