@loaders.gl/parquet 3.4.11 → 3.4.13
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/dist.min.js +16 -16
- package/dist/dist.min.js.map +3 -3
- package/dist/es5/parquet-loader.js +1 -1
- package/dist/es5/parquet-wasm-loader.js +1 -1
- package/dist/es5/parquet-wasm-writer.js +1 -1
- package/dist/es5/parquet-writer.js +1 -1
- package/dist/esm/parquet-loader.js +1 -1
- package/dist/esm/parquet-wasm-loader.js +1 -1
- package/dist/esm/parquet-wasm-writer.js +1 -1
- package/dist/esm/parquet-writer.js +1 -1
- package/dist/parquet-worker.js +2 -2
- package/package.json +9 -7
- package/dist/bundle.js +0 -5
- package/dist/constants.js +0 -18
- package/dist/index.js +0 -56
- package/dist/lib/arrow/convert-columns-to-row-group.js +0 -1
- package/dist/lib/arrow/convert-row-group-to-columns.js +0 -12
- package/dist/lib/arrow/convert-schema-from-parquet.js +0 -82
- package/dist/lib/arrow/convert-schema-to-parquet.js +0 -72
- package/dist/lib/geo/decode-geo-metadata.js +0 -73
- package/dist/lib/geo/geoparquet-schema.js +0 -69
- package/dist/lib/parsers/parse-parquet-to-columns.js +0 -40
- package/dist/lib/parsers/parse-parquet-to-rows.js +0 -40
- package/dist/lib/wasm/encode-parquet-wasm.js +0 -30
- package/dist/lib/wasm/load-wasm/index.js +0 -5
- package/dist/lib/wasm/load-wasm/load-wasm-browser.js +0 -38
- package/dist/lib/wasm/load-wasm/load-wasm-node.js +0 -31
- package/dist/lib/wasm/parse-parquet-wasm.js +0 -27
- package/dist/parquet-loader.js +0 -29
- package/dist/parquet-wasm-loader.js +0 -27
- package/dist/parquet-wasm-writer.js +0 -23
- package/dist/parquet-writer.js +0 -21
- package/dist/parquetjs/codecs/declare.js +0 -2
- package/dist/parquetjs/codecs/dictionary.js +0 -14
- package/dist/parquetjs/codecs/index.js +0 -55
- package/dist/parquetjs/codecs/plain.js +0 -211
- package/dist/parquetjs/codecs/rle.js +0 -145
- package/dist/parquetjs/compression.js +0 -183
- package/dist/parquetjs/encoder/parquet-encoder.js +0 -484
- package/dist/parquetjs/parquet-thrift/BoundaryOrder.js +0 -15
- package/dist/parquetjs/parquet-thrift/BsonType.js +0 -62
- package/dist/parquetjs/parquet-thrift/ColumnChunk.js +0 -211
- package/dist/parquetjs/parquet-thrift/ColumnIndex.js +0 -217
- package/dist/parquetjs/parquet-thrift/ColumnMetaData.js +0 -402
- package/dist/parquetjs/parquet-thrift/ColumnOrder.js +0 -108
- package/dist/parquetjs/parquet-thrift/CompressionCodec.js +0 -20
- package/dist/parquetjs/parquet-thrift/ConvertedType.js +0 -34
- package/dist/parquetjs/parquet-thrift/DataPageHeader.js +0 -170
- package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js +0 -230
- package/dist/parquetjs/parquet-thrift/DateType.js +0 -62
- package/dist/parquetjs/parquet-thrift/DecimalType.js +0 -109
- package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js +0 -126
- package/dist/parquetjs/parquet-thrift/Encoding.js +0 -20
- package/dist/parquetjs/parquet-thrift/EnumType.js +0 -62
- package/dist/parquetjs/parquet-thrift/FieldRepetitionType.js +0 -15
- package/dist/parquetjs/parquet-thrift/FileMetaData.js +0 -260
- package/dist/parquetjs/parquet-thrift/IndexPageHeader.js +0 -62
- package/dist/parquetjs/parquet-thrift/IntType.js +0 -109
- package/dist/parquetjs/parquet-thrift/JsonType.js +0 -62
- package/dist/parquetjs/parquet-thrift/KeyValue.js +0 -106
- package/dist/parquetjs/parquet-thrift/ListType.js +0 -62
- package/dist/parquetjs/parquet-thrift/LogicalType.js +0 -384
- package/dist/parquetjs/parquet-thrift/MapType.js +0 -62
- package/dist/parquetjs/parquet-thrift/MicroSeconds.js +0 -62
- package/dist/parquetjs/parquet-thrift/MilliSeconds.js +0 -62
- package/dist/parquetjs/parquet-thrift/NullType.js +0 -62
- package/dist/parquetjs/parquet-thrift/OffsetIndex.js +0 -101
- package/dist/parquetjs/parquet-thrift/PageEncodingStats.js +0 -131
- package/dist/parquetjs/parquet-thrift/PageHeader.js +0 -220
- package/dist/parquetjs/parquet-thrift/PageLocation.js +0 -145
- package/dist/parquetjs/parquet-thrift/PageType.js +0 -16
- package/dist/parquetjs/parquet-thrift/RowGroup.js +0 -186
- package/dist/parquetjs/parquet-thrift/SchemaElement.js +0 -243
- package/dist/parquetjs/parquet-thrift/SortingColumn.js +0 -131
- package/dist/parquetjs/parquet-thrift/Statistics.js +0 -180
- package/dist/parquetjs/parquet-thrift/StringType.js +0 -62
- package/dist/parquetjs/parquet-thrift/TimeType.js +0 -110
- package/dist/parquetjs/parquet-thrift/TimeUnit.js +0 -131
- package/dist/parquetjs/parquet-thrift/TimestampType.js +0 -110
- package/dist/parquetjs/parquet-thrift/Type.js +0 -20
- package/dist/parquetjs/parquet-thrift/TypeDefinedOrder.js +0 -62
- package/dist/parquetjs/parquet-thrift/UUIDType.js +0 -62
- package/dist/parquetjs/parquet-thrift/index.js +0 -65
- package/dist/parquetjs/parser/decoders.js +0 -318
- package/dist/parquetjs/parser/parquet-reader.js +0 -200
- package/dist/parquetjs/schema/declare.js +0 -12
- package/dist/parquetjs/schema/schema.js +0 -162
- package/dist/parquetjs/schema/shred.js +0 -347
- package/dist/parquetjs/schema/types.js +0 -416
- package/dist/parquetjs/utils/file-utils.js +0 -43
- package/dist/parquetjs/utils/read-utils.js +0 -109
- package/dist/workers/parquet-worker.js +0 -5
|
@@ -1,145 +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.PageLocation = 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 PageLocation {
|
|
39
|
-
constructor(args) {
|
|
40
|
-
if (args != null && args.offset != null) {
|
|
41
|
-
if (typeof args.offset === 'number') {
|
|
42
|
-
this.offset = new node_int64_1.default(args.offset);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
this.offset = args.offset;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[offset] is unset!');
|
|
50
|
-
}
|
|
51
|
-
if (args != null && args.compressed_page_size != null) {
|
|
52
|
-
this.compressed_page_size = args.compressed_page_size;
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[compressed_page_size] is unset!');
|
|
56
|
-
}
|
|
57
|
-
if (args != null && args.first_row_index != null) {
|
|
58
|
-
if (typeof args.first_row_index === 'number') {
|
|
59
|
-
this.first_row_index = new node_int64_1.default(args.first_row_index);
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
this.first_row_index = args.first_row_index;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[first_row_index] is unset!');
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
write(output) {
|
|
70
|
-
output.writeStructBegin('PageLocation');
|
|
71
|
-
if (this.offset != null) {
|
|
72
|
-
output.writeFieldBegin('offset', thrift.Thrift.Type.I64, 1);
|
|
73
|
-
output.writeI64(this.offset);
|
|
74
|
-
output.writeFieldEnd();
|
|
75
|
-
}
|
|
76
|
-
if (this.compressed_page_size != null) {
|
|
77
|
-
output.writeFieldBegin('compressed_page_size', thrift.Thrift.Type.I32, 2);
|
|
78
|
-
output.writeI32(this.compressed_page_size);
|
|
79
|
-
output.writeFieldEnd();
|
|
80
|
-
}
|
|
81
|
-
if (this.first_row_index != null) {
|
|
82
|
-
output.writeFieldBegin('first_row_index', thrift.Thrift.Type.I64, 3);
|
|
83
|
-
output.writeI64(this.first_row_index);
|
|
84
|
-
output.writeFieldEnd();
|
|
85
|
-
}
|
|
86
|
-
output.writeFieldStop();
|
|
87
|
-
output.writeStructEnd();
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
static read(input) {
|
|
91
|
-
input.readStructBegin();
|
|
92
|
-
let _args = {};
|
|
93
|
-
while (true) {
|
|
94
|
-
const ret = input.readFieldBegin();
|
|
95
|
-
const fieldType = ret.ftype;
|
|
96
|
-
const fieldId = ret.fid;
|
|
97
|
-
if (fieldType === thrift.Thrift.Type.STOP) {
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
switch (fieldId) {
|
|
101
|
-
case 1:
|
|
102
|
-
if (fieldType === thrift.Thrift.Type.I64) {
|
|
103
|
-
const value_1 = input.readI64();
|
|
104
|
-
_args.offset = value_1;
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
input.skip(fieldType);
|
|
108
|
-
}
|
|
109
|
-
break;
|
|
110
|
-
case 2:
|
|
111
|
-
if (fieldType === thrift.Thrift.Type.I32) {
|
|
112
|
-
const value_2 = input.readI32();
|
|
113
|
-
_args.compressed_page_size = value_2;
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
input.skip(fieldType);
|
|
117
|
-
}
|
|
118
|
-
break;
|
|
119
|
-
case 3:
|
|
120
|
-
if (fieldType === thrift.Thrift.Type.I64) {
|
|
121
|
-
const value_3 = input.readI64();
|
|
122
|
-
_args.first_row_index = value_3;
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
input.skip(fieldType);
|
|
126
|
-
}
|
|
127
|
-
break;
|
|
128
|
-
default: {
|
|
129
|
-
input.skip(fieldType);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
input.readFieldEnd();
|
|
133
|
-
}
|
|
134
|
-
input.readStructEnd();
|
|
135
|
-
if (_args.offset !== undefined &&
|
|
136
|
-
_args.compressed_page_size !== undefined &&
|
|
137
|
-
_args.first_row_index !== undefined) {
|
|
138
|
-
return new PageLocation(_args);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read PageLocation from input');
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
exports.PageLocation = PageLocation;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PageType = void 0;
|
|
4
|
-
/* tslint:disable */
|
|
5
|
-
/* eslint-disable */
|
|
6
|
-
/*
|
|
7
|
-
* Autogenerated by @creditkarma/thrift-typescript v3.7.2
|
|
8
|
-
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
9
|
-
*/
|
|
10
|
-
var PageType;
|
|
11
|
-
(function (PageType) {
|
|
12
|
-
PageType[PageType["DATA_PAGE"] = 0] = "DATA_PAGE";
|
|
13
|
-
PageType[PageType["INDEX_PAGE"] = 1] = "INDEX_PAGE";
|
|
14
|
-
PageType[PageType["DICTIONARY_PAGE"] = 2] = "DICTIONARY_PAGE";
|
|
15
|
-
PageType[PageType["DATA_PAGE_V2"] = 3] = "DATA_PAGE_V2";
|
|
16
|
-
})(PageType = exports.PageType || (exports.PageType = {}));
|
|
@@ -1,186 +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.RowGroup = void 0;
|
|
30
|
-
/* tslint:disable */
|
|
31
|
-
/* eslint-disable */
|
|
32
|
-
/*
|
|
33
|
-
* Autogenerated by @creditkarma/thrift-typescript v3.7.2
|
|
34
|
-
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
35
|
-
*/
|
|
36
|
-
const node_int64_1 = __importDefault(require("node-int64"));
|
|
37
|
-
const thrift = __importStar(require("thrift"));
|
|
38
|
-
const ColumnChunk = __importStar(require("./ColumnChunk"));
|
|
39
|
-
const SortingColumn = __importStar(require("./SortingColumn"));
|
|
40
|
-
class RowGroup {
|
|
41
|
-
constructor(args) {
|
|
42
|
-
if (args != null && args.columns != null) {
|
|
43
|
-
this.columns = args.columns;
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[columns] is unset!');
|
|
47
|
-
}
|
|
48
|
-
if (args != null && args.total_byte_size != null) {
|
|
49
|
-
if (typeof args.total_byte_size === 'number') {
|
|
50
|
-
this.total_byte_size = new node_int64_1.default(args.total_byte_size);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
this.total_byte_size = args.total_byte_size;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[total_byte_size] is unset!');
|
|
58
|
-
}
|
|
59
|
-
if (args != null && args.num_rows != null) {
|
|
60
|
-
if (typeof args.num_rows === 'number') {
|
|
61
|
-
this.num_rows = new node_int64_1.default(args.num_rows);
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
this.num_rows = args.num_rows;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[num_rows] is unset!');
|
|
69
|
-
}
|
|
70
|
-
if (args != null && args.sorting_columns != null) {
|
|
71
|
-
this.sorting_columns = args.sorting_columns;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
write(output) {
|
|
75
|
-
output.writeStructBegin('RowGroup');
|
|
76
|
-
if (this.columns != null) {
|
|
77
|
-
output.writeFieldBegin('columns', thrift.Thrift.Type.LIST, 1);
|
|
78
|
-
output.writeListBegin(thrift.Thrift.Type.STRUCT, this.columns.length);
|
|
79
|
-
this.columns.forEach((value_1) => {
|
|
80
|
-
value_1.write(output);
|
|
81
|
-
});
|
|
82
|
-
output.writeListEnd();
|
|
83
|
-
output.writeFieldEnd();
|
|
84
|
-
}
|
|
85
|
-
if (this.total_byte_size != null) {
|
|
86
|
-
output.writeFieldBegin('total_byte_size', thrift.Thrift.Type.I64, 2);
|
|
87
|
-
output.writeI64(this.total_byte_size);
|
|
88
|
-
output.writeFieldEnd();
|
|
89
|
-
}
|
|
90
|
-
if (this.num_rows != null) {
|
|
91
|
-
output.writeFieldBegin('num_rows', thrift.Thrift.Type.I64, 3);
|
|
92
|
-
output.writeI64(this.num_rows);
|
|
93
|
-
output.writeFieldEnd();
|
|
94
|
-
}
|
|
95
|
-
if (this.sorting_columns != null) {
|
|
96
|
-
output.writeFieldBegin('sorting_columns', thrift.Thrift.Type.LIST, 4);
|
|
97
|
-
output.writeListBegin(thrift.Thrift.Type.STRUCT, this.sorting_columns.length);
|
|
98
|
-
this.sorting_columns.forEach((value_2) => {
|
|
99
|
-
value_2.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.LIST) {
|
|
121
|
-
const value_3 = new Array();
|
|
122
|
-
const metadata_1 = input.readListBegin();
|
|
123
|
-
const size_1 = metadata_1.size;
|
|
124
|
-
for (let i_1 = 0; i_1 < size_1; i_1++) {
|
|
125
|
-
const value_4 = ColumnChunk.ColumnChunk.read(input);
|
|
126
|
-
value_3.push(value_4);
|
|
127
|
-
}
|
|
128
|
-
input.readListEnd();
|
|
129
|
-
_args.columns = value_3;
|
|
130
|
-
}
|
|
131
|
-
else {
|
|
132
|
-
input.skip(fieldType);
|
|
133
|
-
}
|
|
134
|
-
break;
|
|
135
|
-
case 2:
|
|
136
|
-
if (fieldType === thrift.Thrift.Type.I64) {
|
|
137
|
-
const value_5 = input.readI64();
|
|
138
|
-
_args.total_byte_size = value_5;
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
input.skip(fieldType);
|
|
142
|
-
}
|
|
143
|
-
break;
|
|
144
|
-
case 3:
|
|
145
|
-
if (fieldType === thrift.Thrift.Type.I64) {
|
|
146
|
-
const value_6 = input.readI64();
|
|
147
|
-
_args.num_rows = value_6;
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
input.skip(fieldType);
|
|
151
|
-
}
|
|
152
|
-
break;
|
|
153
|
-
case 4:
|
|
154
|
-
if (fieldType === thrift.Thrift.Type.LIST) {
|
|
155
|
-
const value_7 = new Array();
|
|
156
|
-
const metadata_2 = input.readListBegin();
|
|
157
|
-
const size_2 = metadata_2.size;
|
|
158
|
-
for (let i_2 = 0; i_2 < size_2; i_2++) {
|
|
159
|
-
const value_8 = SortingColumn.SortingColumn.read(input);
|
|
160
|
-
value_7.push(value_8);
|
|
161
|
-
}
|
|
162
|
-
input.readListEnd();
|
|
163
|
-
_args.sorting_columns = value_7;
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
166
|
-
input.skip(fieldType);
|
|
167
|
-
}
|
|
168
|
-
break;
|
|
169
|
-
default: {
|
|
170
|
-
input.skip(fieldType);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
input.readFieldEnd();
|
|
174
|
-
}
|
|
175
|
-
input.readStructEnd();
|
|
176
|
-
if (_args.columns !== undefined &&
|
|
177
|
-
_args.total_byte_size !== undefined &&
|
|
178
|
-
_args.num_rows !== undefined) {
|
|
179
|
-
return new RowGroup(_args);
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read RowGroup from input');
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
exports.RowGroup = RowGroup;
|
|
@@ -1,243 +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.SchemaElement = 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 LogicalType = __importStar(require("./LogicalType"));
|
|
35
|
-
class SchemaElement {
|
|
36
|
-
constructor(args) {
|
|
37
|
-
if (args != null && args.type != null) {
|
|
38
|
-
this.type = args.type;
|
|
39
|
-
}
|
|
40
|
-
if (args != null && args.type_length != null) {
|
|
41
|
-
this.type_length = args.type_length;
|
|
42
|
-
}
|
|
43
|
-
if (args != null && args.repetition_type != null) {
|
|
44
|
-
this.repetition_type = args.repetition_type;
|
|
45
|
-
}
|
|
46
|
-
if (args != null && args.name != null) {
|
|
47
|
-
this.name = args.name;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Required field[name] is unset!');
|
|
51
|
-
}
|
|
52
|
-
if (args != null && args.num_children != null) {
|
|
53
|
-
this.num_children = args.num_children;
|
|
54
|
-
}
|
|
55
|
-
if (args != null && args.converted_type != null) {
|
|
56
|
-
this.converted_type = args.converted_type;
|
|
57
|
-
}
|
|
58
|
-
if (args != null && args.scale != null) {
|
|
59
|
-
this.scale = args.scale;
|
|
60
|
-
}
|
|
61
|
-
if (args != null && args.precision != null) {
|
|
62
|
-
this.precision = args.precision;
|
|
63
|
-
}
|
|
64
|
-
if (args != null && args.field_id != null) {
|
|
65
|
-
this.field_id = args.field_id;
|
|
66
|
-
}
|
|
67
|
-
if (args != null && args.logicalType != null) {
|
|
68
|
-
this.logicalType = args.logicalType;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
write(output) {
|
|
72
|
-
output.writeStructBegin('SchemaElement');
|
|
73
|
-
if (this.type != null) {
|
|
74
|
-
output.writeFieldBegin('type', thrift.Thrift.Type.I32, 1);
|
|
75
|
-
output.writeI32(this.type);
|
|
76
|
-
output.writeFieldEnd();
|
|
77
|
-
}
|
|
78
|
-
if (this.type_length != null) {
|
|
79
|
-
output.writeFieldBegin('type_length', thrift.Thrift.Type.I32, 2);
|
|
80
|
-
output.writeI32(this.type_length);
|
|
81
|
-
output.writeFieldEnd();
|
|
82
|
-
}
|
|
83
|
-
if (this.repetition_type != null) {
|
|
84
|
-
output.writeFieldBegin('repetition_type', thrift.Thrift.Type.I32, 3);
|
|
85
|
-
output.writeI32(this.repetition_type);
|
|
86
|
-
output.writeFieldEnd();
|
|
87
|
-
}
|
|
88
|
-
if (this.name != null) {
|
|
89
|
-
output.writeFieldBegin('name', thrift.Thrift.Type.STRING, 4);
|
|
90
|
-
output.writeString(this.name);
|
|
91
|
-
output.writeFieldEnd();
|
|
92
|
-
}
|
|
93
|
-
if (this.num_children != null) {
|
|
94
|
-
output.writeFieldBegin('num_children', thrift.Thrift.Type.I32, 5);
|
|
95
|
-
output.writeI32(this.num_children);
|
|
96
|
-
output.writeFieldEnd();
|
|
97
|
-
}
|
|
98
|
-
if (this.converted_type != null) {
|
|
99
|
-
output.writeFieldBegin('converted_type', thrift.Thrift.Type.I32, 6);
|
|
100
|
-
output.writeI32(this.converted_type);
|
|
101
|
-
output.writeFieldEnd();
|
|
102
|
-
}
|
|
103
|
-
if (this.scale != null) {
|
|
104
|
-
output.writeFieldBegin('scale', thrift.Thrift.Type.I32, 7);
|
|
105
|
-
output.writeI32(this.scale);
|
|
106
|
-
output.writeFieldEnd();
|
|
107
|
-
}
|
|
108
|
-
if (this.precision != null) {
|
|
109
|
-
output.writeFieldBegin('precision', thrift.Thrift.Type.I32, 8);
|
|
110
|
-
output.writeI32(this.precision);
|
|
111
|
-
output.writeFieldEnd();
|
|
112
|
-
}
|
|
113
|
-
if (this.field_id != null) {
|
|
114
|
-
output.writeFieldBegin('field_id', thrift.Thrift.Type.I32, 9);
|
|
115
|
-
output.writeI32(this.field_id);
|
|
116
|
-
output.writeFieldEnd();
|
|
117
|
-
}
|
|
118
|
-
if (this.logicalType != null) {
|
|
119
|
-
output.writeFieldBegin('logicalType', thrift.Thrift.Type.STRUCT, 10);
|
|
120
|
-
this.logicalType.write(output);
|
|
121
|
-
output.writeFieldEnd();
|
|
122
|
-
}
|
|
123
|
-
output.writeFieldStop();
|
|
124
|
-
output.writeStructEnd();
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
static read(input) {
|
|
128
|
-
input.readStructBegin();
|
|
129
|
-
let _args = {};
|
|
130
|
-
while (true) {
|
|
131
|
-
const ret = input.readFieldBegin();
|
|
132
|
-
const fieldType = ret.ftype;
|
|
133
|
-
const fieldId = ret.fid;
|
|
134
|
-
if (fieldType === thrift.Thrift.Type.STOP) {
|
|
135
|
-
break;
|
|
136
|
-
}
|
|
137
|
-
switch (fieldId) {
|
|
138
|
-
case 1:
|
|
139
|
-
if (fieldType === thrift.Thrift.Type.I32) {
|
|
140
|
-
const value_1 = input.readI32();
|
|
141
|
-
_args.type = value_1;
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
input.skip(fieldType);
|
|
145
|
-
}
|
|
146
|
-
break;
|
|
147
|
-
case 2:
|
|
148
|
-
if (fieldType === thrift.Thrift.Type.I32) {
|
|
149
|
-
const value_2 = input.readI32();
|
|
150
|
-
_args.type_length = value_2;
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
input.skip(fieldType);
|
|
154
|
-
}
|
|
155
|
-
break;
|
|
156
|
-
case 3:
|
|
157
|
-
if (fieldType === thrift.Thrift.Type.I32) {
|
|
158
|
-
const value_3 = input.readI32();
|
|
159
|
-
_args.repetition_type = value_3;
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
input.skip(fieldType);
|
|
163
|
-
}
|
|
164
|
-
break;
|
|
165
|
-
case 4:
|
|
166
|
-
if (fieldType === thrift.Thrift.Type.STRING) {
|
|
167
|
-
const value_4 = input.readString();
|
|
168
|
-
_args.name = value_4;
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
input.skip(fieldType);
|
|
172
|
-
}
|
|
173
|
-
break;
|
|
174
|
-
case 5:
|
|
175
|
-
if (fieldType === thrift.Thrift.Type.I32) {
|
|
176
|
-
const value_5 = input.readI32();
|
|
177
|
-
_args.num_children = value_5;
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
input.skip(fieldType);
|
|
181
|
-
}
|
|
182
|
-
break;
|
|
183
|
-
case 6:
|
|
184
|
-
if (fieldType === thrift.Thrift.Type.I32) {
|
|
185
|
-
const value_6 = input.readI32();
|
|
186
|
-
_args.converted_type = value_6;
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
input.skip(fieldType);
|
|
190
|
-
}
|
|
191
|
-
break;
|
|
192
|
-
case 7:
|
|
193
|
-
if (fieldType === thrift.Thrift.Type.I32) {
|
|
194
|
-
const value_7 = input.readI32();
|
|
195
|
-
_args.scale = value_7;
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
input.skip(fieldType);
|
|
199
|
-
}
|
|
200
|
-
break;
|
|
201
|
-
case 8:
|
|
202
|
-
if (fieldType === thrift.Thrift.Type.I32) {
|
|
203
|
-
const value_8 = input.readI32();
|
|
204
|
-
_args.precision = value_8;
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
input.skip(fieldType);
|
|
208
|
-
}
|
|
209
|
-
break;
|
|
210
|
-
case 9:
|
|
211
|
-
if (fieldType === thrift.Thrift.Type.I32) {
|
|
212
|
-
const value_9 = input.readI32();
|
|
213
|
-
_args.field_id = value_9;
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
input.skip(fieldType);
|
|
217
|
-
}
|
|
218
|
-
break;
|
|
219
|
-
case 10:
|
|
220
|
-
if (fieldType === thrift.Thrift.Type.STRUCT) {
|
|
221
|
-
const value_10 = LogicalType.LogicalType.read(input);
|
|
222
|
-
_args.logicalType = value_10;
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
input.skip(fieldType);
|
|
226
|
-
}
|
|
227
|
-
break;
|
|
228
|
-
default: {
|
|
229
|
-
input.skip(fieldType);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
input.readFieldEnd();
|
|
233
|
-
}
|
|
234
|
-
input.readStructEnd();
|
|
235
|
-
if (_args.name !== undefined) {
|
|
236
|
-
return new SchemaElement(_args);
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
throw new thrift.Thrift.TProtocolException(thrift.Thrift.TProtocolExceptionType.UNKNOWN, 'Unable to read SchemaElement from input');
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
exports.SchemaElement = SchemaElement;
|