@loaders.gl/parquet 4.2.0-alpha.3 → 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 +15 -2
- 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 +78 -65
- package/dist/parquet-wasm-loader.js +25 -28
- package/dist/parquet-wasm-writer.js +19 -23
- package/dist/parquet-writer.js +17 -13
- 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 Int64 from 'node-int64';
|
|
2
8
|
import * as thrift from 'thrift';
|
|
3
9
|
import * as ColumnOrder from "./ColumnOrder.js";
|
|
@@ -5,214 +11,220 @@ import * as KeyValue from "./KeyValue.js";
|
|
|
5
11
|
import * as RowGroup from "./RowGroup.js";
|
|
6
12
|
import * as SchemaElement from "./SchemaElement.js";
|
|
7
13
|
export class FileMetaData {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} else {
|
|
25
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[schema] is unset!');
|
|
26
|
-
}
|
|
27
|
-
if (args != null && args.num_rows != null) {
|
|
28
|
-
if (typeof args.num_rows === 'number') {
|
|
29
|
-
this.num_rows = new Int64(args.num_rows);
|
|
30
|
-
} else {
|
|
31
|
-
this.num_rows = args.num_rows;
|
|
32
|
-
}
|
|
33
|
-
} else {
|
|
34
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_rows] is unset!');
|
|
35
|
-
}
|
|
36
|
-
if (args != null && args.row_groups != null) {
|
|
37
|
-
this.row_groups = args.row_groups;
|
|
38
|
-
} else {
|
|
39
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[row_groups] is unset!');
|
|
40
|
-
}
|
|
41
|
-
if (args != null && args.key_value_metadata != null) {
|
|
42
|
-
this.key_value_metadata = args.key_value_metadata;
|
|
43
|
-
}
|
|
44
|
-
if (args != null && args.created_by != null) {
|
|
45
|
-
this.created_by = args.created_by;
|
|
46
|
-
}
|
|
47
|
-
if (args != null && args.column_orders != null) {
|
|
48
|
-
this.column_orders = args.column_orders;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
write(output) {
|
|
52
|
-
output.writeStructBegin('FileMetaData');
|
|
53
|
-
if (this.version != null) {
|
|
54
|
-
output.writeFieldBegin('version', thrift.Thrift.Type.I32, 1);
|
|
55
|
-
output.writeI32(this.version);
|
|
56
|
-
output.writeFieldEnd();
|
|
57
|
-
}
|
|
58
|
-
if (this.schema != null) {
|
|
59
|
-
output.writeFieldBegin('schema', thrift.Thrift.Type.LIST, 2);
|
|
60
|
-
output.writeListBegin(thrift.Thrift.Type.STRUCT, this.schema.length);
|
|
61
|
-
this.schema.forEach(value_1 => {
|
|
62
|
-
value_1.write(output);
|
|
63
|
-
});
|
|
64
|
-
output.writeListEnd();
|
|
65
|
-
output.writeFieldEnd();
|
|
66
|
-
}
|
|
67
|
-
if (this.num_rows != null) {
|
|
68
|
-
output.writeFieldBegin('num_rows', thrift.Thrift.Type.I64, 3);
|
|
69
|
-
output.writeI64(this.num_rows);
|
|
70
|
-
output.writeFieldEnd();
|
|
71
|
-
}
|
|
72
|
-
if (this.row_groups != null) {
|
|
73
|
-
output.writeFieldBegin('row_groups', thrift.Thrift.Type.LIST, 4);
|
|
74
|
-
output.writeListBegin(thrift.Thrift.Type.STRUCT, this.row_groups.length);
|
|
75
|
-
this.row_groups.forEach(value_2 => {
|
|
76
|
-
value_2.write(output);
|
|
77
|
-
});
|
|
78
|
-
output.writeListEnd();
|
|
79
|
-
output.writeFieldEnd();
|
|
80
|
-
}
|
|
81
|
-
if (this.key_value_metadata != null) {
|
|
82
|
-
output.writeFieldBegin('key_value_metadata', thrift.Thrift.Type.LIST, 5);
|
|
83
|
-
output.writeListBegin(thrift.Thrift.Type.STRUCT, this.key_value_metadata.length);
|
|
84
|
-
this.key_value_metadata.forEach(value_3 => {
|
|
85
|
-
value_3.write(output);
|
|
86
|
-
});
|
|
87
|
-
output.writeListEnd();
|
|
88
|
-
output.writeFieldEnd();
|
|
89
|
-
}
|
|
90
|
-
if (this.created_by != null) {
|
|
91
|
-
output.writeFieldBegin('created_by', thrift.Thrift.Type.STRING, 6);
|
|
92
|
-
output.writeString(this.created_by);
|
|
93
|
-
output.writeFieldEnd();
|
|
94
|
-
}
|
|
95
|
-
if (this.column_orders != null) {
|
|
96
|
-
output.writeFieldBegin('column_orders', thrift.Thrift.Type.LIST, 7);
|
|
97
|
-
output.writeListBegin(thrift.Thrift.Type.STRUCT, this.column_orders.length);
|
|
98
|
-
this.column_orders.forEach(value_4 => {
|
|
99
|
-
value_4.write(output);
|
|
100
|
-
});
|
|
101
|
-
output.writeListEnd();
|
|
102
|
-
output.writeFieldEnd();
|
|
103
|
-
}
|
|
104
|
-
output.writeFieldStop();
|
|
105
|
-
output.writeStructEnd();
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
static read(input) {
|
|
109
|
-
input.readStructBegin();
|
|
110
|
-
let _args = {};
|
|
111
|
-
while (true) {
|
|
112
|
-
const ret = input.readFieldBegin();
|
|
113
|
-
const fieldType = ret.ftype;
|
|
114
|
-
const fieldId = ret.fid;
|
|
115
|
-
if (fieldType === thrift.Thrift.Type.STOP) {
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
switch (fieldId) {
|
|
119
|
-
case 1:
|
|
120
|
-
if (fieldType === thrift.Thrift.Type.I32) {
|
|
121
|
-
const value_5 = input.readI32();
|
|
122
|
-
_args.version = value_5;
|
|
123
|
-
} else {
|
|
124
|
-
input.skip(fieldType);
|
|
125
|
-
}
|
|
126
|
-
break;
|
|
127
|
-
case 2:
|
|
128
|
-
if (fieldType === thrift.Thrift.Type.LIST) {
|
|
129
|
-
const value_6 = new Array();
|
|
130
|
-
const metadata_1 = input.readListBegin();
|
|
131
|
-
const size_1 = metadata_1.size;
|
|
132
|
-
for (let i_1 = 0; i_1 < size_1; i_1++) {
|
|
133
|
-
const value_7 = SchemaElement.SchemaElement.read(input);
|
|
134
|
-
value_6.push(value_7);
|
|
14
|
+
constructor(args = null) {
|
|
15
|
+
if (args != null && args.version != null) {
|
|
16
|
+
this.version = args.version;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[version] is unset!');
|
|
20
|
+
}
|
|
21
|
+
if (args != null && args.schema != null) {
|
|
22
|
+
this.schema = args.schema;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[schema] is unset!');
|
|
26
|
+
}
|
|
27
|
+
if (args != null && args.num_rows != null) {
|
|
28
|
+
if (typeof args.num_rows === 'number') {
|
|
29
|
+
this.num_rows = new Int64(args.num_rows);
|
|
135
30
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
} else {
|
|
139
|
-
input.skip(fieldType);
|
|
140
|
-
}
|
|
141
|
-
break;
|
|
142
|
-
case 3:
|
|
143
|
-
if (fieldType === thrift.Thrift.Type.I64) {
|
|
144
|
-
const value_8 = input.readI64();
|
|
145
|
-
_args.num_rows = value_8;
|
|
146
|
-
} else {
|
|
147
|
-
input.skip(fieldType);
|
|
148
|
-
}
|
|
149
|
-
break;
|
|
150
|
-
case 4:
|
|
151
|
-
if (fieldType === thrift.Thrift.Type.LIST) {
|
|
152
|
-
const value_9 = new Array();
|
|
153
|
-
const metadata_2 = input.readListBegin();
|
|
154
|
-
const size_2 = metadata_2.size;
|
|
155
|
-
for (let i_2 = 0; i_2 < size_2; i_2++) {
|
|
156
|
-
const value_10 = RowGroup.RowGroup.read(input);
|
|
157
|
-
value_9.push(value_10);
|
|
31
|
+
else {
|
|
32
|
+
this.num_rows = args.num_rows;
|
|
158
33
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_rows] is unset!');
|
|
37
|
+
}
|
|
38
|
+
if (args != null && args.row_groups != null) {
|
|
39
|
+
this.row_groups = args.row_groups;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[row_groups] is unset!');
|
|
43
|
+
}
|
|
44
|
+
if (args != null && args.key_value_metadata != null) {
|
|
45
|
+
this.key_value_metadata = args.key_value_metadata;
|
|
46
|
+
}
|
|
47
|
+
if (args != null && args.created_by != null) {
|
|
48
|
+
this.created_by = args.created_by;
|
|
49
|
+
}
|
|
50
|
+
if (args != null && args.column_orders != null) {
|
|
51
|
+
this.column_orders = args.column_orders;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
write(output) {
|
|
55
|
+
output.writeStructBegin('FileMetaData');
|
|
56
|
+
if (this.version != null) {
|
|
57
|
+
output.writeFieldBegin('version', thrift.Thrift.Type.I32, 1);
|
|
58
|
+
output.writeI32(this.version);
|
|
59
|
+
output.writeFieldEnd();
|
|
60
|
+
}
|
|
61
|
+
if (this.schema != null) {
|
|
62
|
+
output.writeFieldBegin('schema', thrift.Thrift.Type.LIST, 2);
|
|
63
|
+
output.writeListBegin(thrift.Thrift.Type.STRUCT, this.schema.length);
|
|
64
|
+
this.schema.forEach((value_1) => {
|
|
65
|
+
value_1.write(output);
|
|
66
|
+
});
|
|
67
|
+
output.writeListEnd();
|
|
68
|
+
output.writeFieldEnd();
|
|
69
|
+
}
|
|
70
|
+
if (this.num_rows != null) {
|
|
71
|
+
output.writeFieldBegin('num_rows', thrift.Thrift.Type.I64, 3);
|
|
72
|
+
output.writeI64(this.num_rows);
|
|
73
|
+
output.writeFieldEnd();
|
|
74
|
+
}
|
|
75
|
+
if (this.row_groups != null) {
|
|
76
|
+
output.writeFieldBegin('row_groups', thrift.Thrift.Type.LIST, 4);
|
|
77
|
+
output.writeListBegin(thrift.Thrift.Type.STRUCT, this.row_groups.length);
|
|
78
|
+
this.row_groups.forEach((value_2) => {
|
|
79
|
+
value_2.write(output);
|
|
80
|
+
});
|
|
81
|
+
output.writeListEnd();
|
|
82
|
+
output.writeFieldEnd();
|
|
83
|
+
}
|
|
84
|
+
if (this.key_value_metadata != null) {
|
|
85
|
+
output.writeFieldBegin('key_value_metadata', thrift.Thrift.Type.LIST, 5);
|
|
86
|
+
output.writeListBegin(thrift.Thrift.Type.STRUCT, this.key_value_metadata.length);
|
|
87
|
+
this.key_value_metadata.forEach((value_3) => {
|
|
88
|
+
value_3.write(output);
|
|
89
|
+
});
|
|
90
|
+
output.writeListEnd();
|
|
91
|
+
output.writeFieldEnd();
|
|
92
|
+
}
|
|
93
|
+
if (this.created_by != null) {
|
|
94
|
+
output.writeFieldBegin('created_by', thrift.Thrift.Type.STRING, 6);
|
|
95
|
+
output.writeString(this.created_by);
|
|
96
|
+
output.writeFieldEnd();
|
|
97
|
+
}
|
|
98
|
+
if (this.column_orders != null) {
|
|
99
|
+
output.writeFieldBegin('column_orders', thrift.Thrift.Type.LIST, 7);
|
|
100
|
+
output.writeListBegin(thrift.Thrift.Type.STRUCT, this.column_orders.length);
|
|
101
|
+
this.column_orders.forEach((value_4) => {
|
|
102
|
+
value_4.write(output);
|
|
103
|
+
});
|
|
104
|
+
output.writeListEnd();
|
|
105
|
+
output.writeFieldEnd();
|
|
106
|
+
}
|
|
107
|
+
output.writeFieldStop();
|
|
108
|
+
output.writeStructEnd();
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
static read(input) {
|
|
112
|
+
input.readStructBegin();
|
|
113
|
+
let _args = {};
|
|
114
|
+
while (true) {
|
|
115
|
+
const ret = input.readFieldBegin();
|
|
116
|
+
const fieldType = ret.ftype;
|
|
117
|
+
const fieldId = ret.fid;
|
|
118
|
+
if (fieldType === thrift.Thrift.Type.STOP) {
|
|
119
|
+
break;
|
|
173
120
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
121
|
+
switch (fieldId) {
|
|
122
|
+
case 1:
|
|
123
|
+
if (fieldType === thrift.Thrift.Type.I32) {
|
|
124
|
+
const value_5 = input.readI32();
|
|
125
|
+
_args.version = value_5;
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
input.skip(fieldType);
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
131
|
+
case 2:
|
|
132
|
+
if (fieldType === thrift.Thrift.Type.LIST) {
|
|
133
|
+
const value_6 = new Array();
|
|
134
|
+
const metadata_1 = input.readListBegin();
|
|
135
|
+
const size_1 = metadata_1.size;
|
|
136
|
+
for (let i_1 = 0; i_1 < size_1; i_1++) {
|
|
137
|
+
const value_7 = SchemaElement.SchemaElement.read(input);
|
|
138
|
+
value_6.push(value_7);
|
|
139
|
+
}
|
|
140
|
+
input.readListEnd();
|
|
141
|
+
_args.schema = value_6;
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
input.skip(fieldType);
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
case 3:
|
|
148
|
+
if (fieldType === thrift.Thrift.Type.I64) {
|
|
149
|
+
const value_8 = input.readI64();
|
|
150
|
+
_args.num_rows = value_8;
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
input.skip(fieldType);
|
|
154
|
+
}
|
|
155
|
+
break;
|
|
156
|
+
case 4:
|
|
157
|
+
if (fieldType === thrift.Thrift.Type.LIST) {
|
|
158
|
+
const value_9 = new Array();
|
|
159
|
+
const metadata_2 = input.readListBegin();
|
|
160
|
+
const size_2 = metadata_2.size;
|
|
161
|
+
for (let i_2 = 0; i_2 < size_2; i_2++) {
|
|
162
|
+
const value_10 = RowGroup.RowGroup.read(input);
|
|
163
|
+
value_9.push(value_10);
|
|
164
|
+
}
|
|
165
|
+
input.readListEnd();
|
|
166
|
+
_args.row_groups = value_9;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
input.skip(fieldType);
|
|
170
|
+
}
|
|
171
|
+
break;
|
|
172
|
+
case 5:
|
|
173
|
+
if (fieldType === thrift.Thrift.Type.LIST) {
|
|
174
|
+
const value_11 = new Array();
|
|
175
|
+
const metadata_3 = input.readListBegin();
|
|
176
|
+
const size_3 = metadata_3.size;
|
|
177
|
+
for (let i_3 = 0; i_3 < size_3; i_3++) {
|
|
178
|
+
const value_12 = KeyValue.KeyValue.read(input);
|
|
179
|
+
value_11.push(value_12);
|
|
180
|
+
}
|
|
181
|
+
input.readListEnd();
|
|
182
|
+
_args.key_value_metadata = value_11;
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
input.skip(fieldType);
|
|
186
|
+
}
|
|
187
|
+
break;
|
|
188
|
+
case 6:
|
|
189
|
+
if (fieldType === thrift.Thrift.Type.STRING) {
|
|
190
|
+
const value_13 = input.readString();
|
|
191
|
+
_args.created_by = value_13;
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
input.skip(fieldType);
|
|
195
|
+
}
|
|
196
|
+
break;
|
|
197
|
+
case 7:
|
|
198
|
+
if (fieldType === thrift.Thrift.Type.LIST) {
|
|
199
|
+
const value_14 = new Array();
|
|
200
|
+
const metadata_4 = input.readListBegin();
|
|
201
|
+
const size_4 = metadata_4.size;
|
|
202
|
+
for (let i_4 = 0; i_4 < size_4; i_4++) {
|
|
203
|
+
const value_15 = ColumnOrder.ColumnOrder.read(input);
|
|
204
|
+
value_14.push(value_15);
|
|
205
|
+
}
|
|
206
|
+
input.readListEnd();
|
|
207
|
+
_args.column_orders = value_14;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
input.skip(fieldType);
|
|
211
|
+
}
|
|
212
|
+
break;
|
|
213
|
+
default: {
|
|
214
|
+
input.skip(fieldType);
|
|
215
|
+
}
|
|
196
216
|
}
|
|
197
|
-
input.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
input.readStructEnd();
|
|
211
|
-
if (_args.version !== undefined && _args.schema !== undefined && _args.num_rows !== undefined && _args.row_groups !== undefined) {
|
|
212
|
-
return new FileMetaData(_args);
|
|
213
|
-
} else {
|
|
214
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read FileMetaData from input');
|
|
217
|
+
input.readFieldEnd();
|
|
218
|
+
}
|
|
219
|
+
input.readStructEnd();
|
|
220
|
+
if (_args.version !== undefined &&
|
|
221
|
+
_args.schema !== undefined &&
|
|
222
|
+
_args.num_rows !== undefined &&
|
|
223
|
+
_args.row_groups !== undefined) {
|
|
224
|
+
return new FileMetaData(_args);
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read FileMetaData from input');
|
|
228
|
+
}
|
|
215
229
|
}
|
|
216
|
-
}
|
|
217
230
|
}
|
|
218
|
-
//# sourceMappingURL=FileMetaData.js.map
|
|
@@ -1,31 +1,35 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/*
|
|
4
|
+
* Autogenerated by @creditkarma/thrift-typescript v3.7.2
|
|
5
|
+
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
6
|
+
*/
|
|
1
7
|
import * as thrift from 'thrift';
|
|
2
8
|
export class IndexPageHeader {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
constructor() { }
|
|
10
|
+
write(output) {
|
|
11
|
+
output.writeStructBegin('IndexPageHeader');
|
|
12
|
+
output.writeFieldStop();
|
|
13
|
+
output.writeStructEnd();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
static read(input) {
|
|
17
|
+
input.readStructBegin();
|
|
18
|
+
while (true) {
|
|
19
|
+
const ret = input.readFieldBegin();
|
|
20
|
+
const fieldType = ret.ftype;
|
|
21
|
+
const fieldId = ret.fid;
|
|
22
|
+
if (fieldType === thrift.Thrift.Type.STOP) {
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
switch (fieldId) {
|
|
26
|
+
default: {
|
|
27
|
+
input.skip(fieldType);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
input.readFieldEnd();
|
|
31
|
+
}
|
|
32
|
+
input.readStructEnd();
|
|
33
|
+
return new IndexPageHeader();
|
|
26
34
|
}
|
|
27
|
-
input.readStructEnd();
|
|
28
|
-
return new IndexPageHeader();
|
|
29
|
-
}
|
|
30
35
|
}
|
|
31
|
-
//# sourceMappingURL=IndexPageHeader.js.map
|
|
@@ -1,75 +1,82 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/*
|
|
4
|
+
* Autogenerated by @creditkarma/thrift-typescript v3.7.2
|
|
5
|
+
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
6
|
+
*/
|
|
1
7
|
import * as thrift from 'thrift';
|
|
2
8
|
export class IntType {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
constructor(args) {
|
|
10
|
+
if (args != null && args.bitWidth != null) {
|
|
11
|
+
this.bitWidth = args.bitWidth;
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[bitWidth] is unset!');
|
|
15
|
+
}
|
|
16
|
+
if (args != null && args.isSigned != null) {
|
|
17
|
+
this.isSigned = args.isSigned;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[isSigned] is unset!');
|
|
21
|
+
}
|
|
10
22
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
write(output) {
|
|
24
|
+
output.writeStructBegin('IntType');
|
|
25
|
+
if (this.bitWidth != null) {
|
|
26
|
+
output.writeFieldBegin('bitWidth', thrift.Thrift.Type.BYTE, 1);
|
|
27
|
+
output.writeByte(this.bitWidth);
|
|
28
|
+
output.writeFieldEnd();
|
|
29
|
+
}
|
|
30
|
+
if (this.isSigned != null) {
|
|
31
|
+
output.writeFieldBegin('isSigned', thrift.Thrift.Type.BOOL, 2);
|
|
32
|
+
output.writeBool(this.isSigned);
|
|
33
|
+
output.writeFieldEnd();
|
|
34
|
+
}
|
|
35
|
+
output.writeFieldStop();
|
|
36
|
+
output.writeStructEnd();
|
|
37
|
+
return;
|
|
15
38
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
39
|
+
static read(input) {
|
|
40
|
+
input.readStructBegin();
|
|
41
|
+
let _args = {};
|
|
42
|
+
while (true) {
|
|
43
|
+
const ret = input.readFieldBegin();
|
|
44
|
+
const fieldType = ret.ftype;
|
|
45
|
+
const fieldId = ret.fid;
|
|
46
|
+
if (fieldType === thrift.Thrift.Type.STOP) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
switch (fieldId) {
|
|
50
|
+
case 1:
|
|
51
|
+
if (fieldType === thrift.Thrift.Type.BYTE) {
|
|
52
|
+
const value_1 = input.readByte();
|
|
53
|
+
_args.bitWidth = value_1;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
input.skip(fieldType);
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
case 2:
|
|
60
|
+
if (fieldType === thrift.Thrift.Type.BOOL) {
|
|
61
|
+
const value_2 = input.readBool();
|
|
62
|
+
_args.isSigned = value_2;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
input.skip(fieldType);
|
|
66
|
+
}
|
|
67
|
+
break;
|
|
68
|
+
default: {
|
|
69
|
+
input.skip(fieldType);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
input.readFieldEnd();
|
|
73
|
+
}
|
|
74
|
+
input.readStructEnd();
|
|
75
|
+
if (_args.bitWidth !== undefined && _args.isSigned !== undefined) {
|
|
76
|
+
return new IntType(_args);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read IntType from input');
|
|
80
|
+
}
|
|
23
81
|
}
|
|
24
|
-
if (this.isSigned != null) {
|
|
25
|
-
output.writeFieldBegin('isSigned', thrift.Thrift.Type.BOOL, 2);
|
|
26
|
-
output.writeBool(this.isSigned);
|
|
27
|
-
output.writeFieldEnd();
|
|
28
|
-
}
|
|
29
|
-
output.writeFieldStop();
|
|
30
|
-
output.writeStructEnd();
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
static read(input) {
|
|
34
|
-
input.readStructBegin();
|
|
35
|
-
let _args = {};
|
|
36
|
-
while (true) {
|
|
37
|
-
const ret = input.readFieldBegin();
|
|
38
|
-
const fieldType = ret.ftype;
|
|
39
|
-
const fieldId = ret.fid;
|
|
40
|
-
if (fieldType === thrift.Thrift.Type.STOP) {
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
switch (fieldId) {
|
|
44
|
-
case 1:
|
|
45
|
-
if (fieldType === thrift.Thrift.Type.BYTE) {
|
|
46
|
-
const value_1 = input.readByte();
|
|
47
|
-
_args.bitWidth = value_1;
|
|
48
|
-
} else {
|
|
49
|
-
input.skip(fieldType);
|
|
50
|
-
}
|
|
51
|
-
break;
|
|
52
|
-
case 2:
|
|
53
|
-
if (fieldType === thrift.Thrift.Type.BOOL) {
|
|
54
|
-
const value_2 = input.readBool();
|
|
55
|
-
_args.isSigned = value_2;
|
|
56
|
-
} else {
|
|
57
|
-
input.skip(fieldType);
|
|
58
|
-
}
|
|
59
|
-
break;
|
|
60
|
-
default:
|
|
61
|
-
{
|
|
62
|
-
input.skip(fieldType);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
input.readFieldEnd();
|
|
66
|
-
}
|
|
67
|
-
input.readStructEnd();
|
|
68
|
-
if (_args.bitWidth !== undefined && _args.isSigned !== undefined) {
|
|
69
|
-
return new IntType(_args);
|
|
70
|
-
} else {
|
|
71
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read IntType from input');
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
82
|
}
|
|
75
|
-
//# sourceMappingURL=IntType.js.map
|