@loaders.gl/parquet 4.2.0-alpha.5 → 4.2.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/index.cjs +177 -43
  2. package/dist/index.cjs.map +3 -3
  3. package/dist/lib/constants.js +1 -1
  4. package/dist/parquet-loader.js +1 -1
  5. package/dist/parquet-writer.js +1 -1
  6. package/dist/parquetjs/encoder/parquet-encoder.js +14 -0
  7. package/dist/parquetjs/parquet-thrift/ColumnChunk.js +7 -0
  8. package/dist/parquetjs/parquet-thrift/ColumnIndex.js +5 -0
  9. package/dist/parquetjs/parquet-thrift/ColumnMetaData.js +13 -0
  10. package/dist/parquetjs/parquet-thrift/ColumnOrder.js +1 -0
  11. package/dist/parquetjs/parquet-thrift/DataPageHeader.js +5 -0
  12. package/dist/parquetjs/parquet-thrift/DataPageHeaderV2.js +8 -1
  13. package/dist/parquetjs/parquet-thrift/DecimalType.js +2 -0
  14. package/dist/parquetjs/parquet-thrift/DictionaryPageHeader.js +3 -0
  15. package/dist/parquetjs/parquet-thrift/FileMetaData.js +7 -0
  16. package/dist/parquetjs/parquet-thrift/IntType.js +2 -0
  17. package/dist/parquetjs/parquet-thrift/KeyValue.js +2 -0
  18. package/dist/parquetjs/parquet-thrift/LogicalType.js +13 -0
  19. package/dist/parquetjs/parquet-thrift/OffsetIndex.js +1 -0
  20. package/dist/parquetjs/parquet-thrift/PageEncodingStats.js +3 -0
  21. package/dist/parquetjs/parquet-thrift/PageHeader.js +8 -0
  22. package/dist/parquetjs/parquet-thrift/PageLocation.js +3 -0
  23. package/dist/parquetjs/parquet-thrift/RowGroup.js +4 -0
  24. package/dist/parquetjs/parquet-thrift/SchemaElement.js +10 -0
  25. package/dist/parquetjs/parquet-thrift/SortingColumn.js +3 -0
  26. package/dist/parquetjs/parquet-thrift/Statistics.js +6 -0
  27. package/dist/parquetjs/parquet-thrift/TimeType.js +2 -0
  28. package/dist/parquetjs/parquet-thrift/TimeUnit.js +2 -0
  29. package/dist/parquetjs/parquet-thrift/TimestampType.js +2 -0
  30. package/dist/parquetjs/parser/parquet-reader.d.ts.map +1 -1
  31. package/dist/parquetjs/parser/parquet-reader.js +8 -5
  32. package/dist/parquetjs/schema/declare.js +4 -0
  33. package/dist/parquetjs/schema/schema.js +3 -0
  34. package/dist/parquetjs/schema/types.js +1 -0
  35. package/dist/parquetjs/utils/read-utils.js +1 -4
  36. package/dist/polyfills/buffer/buffer.js +9 -12
  37. package/dist/polyfills/buffer/install-buffer-polyfill.d.ts +28 -1
  38. package/dist/polyfills/buffer/install-buffer-polyfill.d.ts.map +1 -1
  39. package/package.json +15 -15
  40. package/src/parquetjs/parser/parquet-reader.ts +2 -1
  41. package/src/parquetjs/schema/types.ts +1 -0
  42. package/src/polyfills/buffer/buffer.ts +0 -3
package/dist/index.cjs CHANGED
@@ -5,6 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
9
  var __export = (target, all) => {
9
10
  for (var name in all)
10
11
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -26,6 +27,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
27
  mod
27
28
  ));
28
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var __publicField = (obj, key, value) => {
31
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
32
+ return value;
33
+ };
29
34
 
30
35
  // dist/index.js
31
36
  var dist_exports = {};
@@ -57,21 +62,30 @@ var import_base64_js = __toESM(require("base64-js"), 1);
57
62
  var import_ieee754 = __toESM(require("ieee754"), 1);
58
63
  var kMaxLength = 2147483647;
59
64
  var INSPECT_MAX_BYTES = 50;
60
- var Buffer2 = class extends Uint8Array {
65
+ var _Buffer = class extends Uint8Array {
66
+ // not used by this implementation
61
67
  // length: number; inherited
62
68
  get parent() {
63
- if (!Buffer2.isBuffer(this))
69
+ if (!_Buffer.isBuffer(this))
64
70
  return void 0;
65
71
  return this.buffer;
66
72
  }
67
73
  get offset() {
68
- if (!Buffer2.isBuffer(this))
74
+ if (!_Buffer.isBuffer(this))
69
75
  return void 0;
70
76
  return this.byteOffset;
71
77
  }
78
+ /** This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
79
+ * to detect a Buffer instance. It's not possible to use `instanceof Buffer`
80
+ * reliably in a browserify context because there could be multiple different
81
+ * copies of the 'buffer' package in use. This method works even for Buffer
82
+ * instances that were created from another copy of the `buffer` package.
83
+ * @see: https://github.com/feross/buffer/issues/154
84
+ */
85
+ _isBuffer = true;
72
86
  constructor(arg, encodingOrOffset, length) {
73
87
  if (typeof arg !== "number") {
74
- return Buffer2.from(arg, encodingOrOffset, length);
88
+ return _Buffer.from(arg, encodingOrOffset, length);
75
89
  }
76
90
  const size = arg;
77
91
  if (size > kMaxLength) {
@@ -81,7 +95,6 @@ var Buffer2 = class extends Uint8Array {
81
95
  throw new TypeError('The "string" argument must be of type string. Received type number');
82
96
  }
83
97
  super(size < 0 ? 0 : checked(size) | 0);
84
- this._isBuffer = true;
85
98
  return;
86
99
  }
87
100
  static from(value, encodingOrOffset, length) {
@@ -105,13 +118,13 @@ var Buffer2 = class extends Uint8Array {
105
118
  }
106
119
  const valueOf = value.valueOf && value.valueOf();
107
120
  if (valueOf != null && valueOf !== value) {
108
- return Buffer2.from(valueOf, encodingOrOffset, length);
121
+ return _Buffer.from(valueOf, encodingOrOffset, length);
109
122
  }
110
123
  const b = fromObject(value);
111
124
  if (b)
112
125
  return b;
113
126
  if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
114
- return Buffer2.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
127
+ return _Buffer.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
115
128
  }
116
129
  throw new TypeError(`${"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "}${typeof value}`);
117
130
  }
@@ -121,17 +134,17 @@ var Buffer2 = class extends Uint8Array {
121
134
  * @param obj object to test.
122
135
  */
123
136
  static isBuffer(b) {
124
- return b != null && b._isBuffer === true && b !== Buffer2.prototype;
137
+ return b != null && b._isBuffer === true && b !== _Buffer.prototype;
125
138
  }
126
139
  /**
127
140
  * The same as buf1.compare(buf2).
128
141
  */
129
142
  static compare(a, b) {
130
- if (!Buffer2.isBuffer(a) && isInstance(a, Uint8Array))
131
- a = Buffer2.from(a, a.offset, a.byteLength);
132
- if (!Buffer2.isBuffer(b) && isInstance(b, Uint8Array))
133
- b = Buffer2.from(b, b.offset, b.byteLength);
134
- if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) {
143
+ if (!_Buffer.isBuffer(a) && isInstance(a, Uint8Array))
144
+ a = _Buffer.from(a, a.offset, a.byteLength);
145
+ if (!_Buffer.isBuffer(b) && isInstance(b, Uint8Array))
146
+ b = _Buffer.from(b, b.offset, b.byteLength);
147
+ if (!_Buffer.isBuffer(a) || !_Buffer.isBuffer(b)) {
135
148
  throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
136
149
  }
137
150
  if (a === b)
@@ -191,7 +204,7 @@ var Buffer2 = class extends Uint8Array {
191
204
  throw new TypeError('"list" argument must be an Array of Buffers');
192
205
  }
193
206
  if (list.length === 0) {
194
- return Buffer2.alloc(0);
207
+ return _Buffer.alloc(0);
195
208
  }
196
209
  let i;
197
210
  if (length === void 0) {
@@ -200,20 +213,20 @@ var Buffer2 = class extends Uint8Array {
200
213
  length += list[i].length;
201
214
  }
202
215
  }
203
- const buffer = Buffer2.allocUnsafe(length);
216
+ const buffer = _Buffer.allocUnsafe(length);
204
217
  let pos = 0;
205
218
  for (i = 0; i < list.length; ++i) {
206
219
  let buf = list[i];
207
220
  if (isInstance(buf, Uint8Array)) {
208
221
  if (pos + buf.length > buffer.length) {
209
- if (!Buffer2.isBuffer(buf)) {
210
- buf = Buffer2.from(buf.buffer, buf.byteOffset, buf.byteLength);
222
+ if (!_Buffer.isBuffer(buf)) {
223
+ buf = _Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
211
224
  }
212
225
  buf.copy(buffer, pos);
213
226
  } else {
214
227
  Uint8Array.prototype.set.call(buffer, buf, pos);
215
228
  }
216
- } else if (!Buffer2.isBuffer(buf)) {
229
+ } else if (!_Buffer.isBuffer(buf)) {
217
230
  throw new TypeError('"list" argument must be an Array of Buffers');
218
231
  } else {
219
232
  buf.copy(buffer, pos);
@@ -241,7 +254,7 @@ var Buffer2 = class extends Uint8Array {
241
254
  */
242
255
  static allocUnsafe(size) {
243
256
  assertSize(size);
244
- return new Buffer2(size);
257
+ return new _Buffer(size);
245
258
  }
246
259
  /**
247
260
  * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
@@ -707,7 +720,7 @@ var Buffer2 = class extends Uint8Array {
707
720
  }
708
721
  // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
709
722
  copy(target, targetStart, start, end) {
710
- if (!Buffer2.isBuffer(target))
723
+ if (!_Buffer.isBuffer(target))
711
724
  throw new TypeError("argument should be a Buffer");
712
725
  if (!start)
713
726
  start = 0;
@@ -760,7 +773,7 @@ var Buffer2 = class extends Uint8Array {
760
773
  if (encoding !== void 0 && typeof encoding !== "string") {
761
774
  throw new TypeError("encoding must be a string");
762
775
  }
763
- if (typeof encoding === "string" && !Buffer2.isEncoding(encoding)) {
776
+ if (typeof encoding === "string" && !_Buffer.isEncoding(encoding)) {
764
777
  throw new TypeError(`Unknown encoding: ${encoding}`);
765
778
  }
766
779
  if (val.length === 1) {
@@ -790,7 +803,7 @@ var Buffer2 = class extends Uint8Array {
790
803
  this[i] = val;
791
804
  }
792
805
  } else {
793
- const bytes = Buffer2.isBuffer(val) ? val : Buffer2.from(val, encoding);
806
+ const bytes = _Buffer.isBuffer(val) ? val : _Buffer.from(val, encoding);
794
807
  const len = bytes.length;
795
808
  if (len === 0) {
796
809
  throw new TypeError(`The value "${val}" is invalid for argument "value"`);
@@ -861,17 +874,17 @@ var Buffer2 = class extends Uint8Array {
861
874
  // }
862
875
  // }
863
876
  equals(b) {
864
- if (!Buffer2.isBuffer(b))
877
+ if (!_Buffer.isBuffer(b))
865
878
  throw new TypeError("Argument must be a Buffer");
866
879
  if (this === b)
867
880
  return true;
868
- return Buffer2.compare(this, b) === 0;
881
+ return _Buffer.compare(this, b) === 0;
869
882
  }
870
883
  compare(target, start, end, thisStart, thisEnd) {
871
- if (!Buffer2.isBuffer(target) && isInstance(target, Uint8Array)) {
872
- target = Buffer2.from(target, target.offset, target.byteLength);
884
+ if (!_Buffer.isBuffer(target) && isInstance(target, Uint8Array)) {
885
+ target = _Buffer.from(target, target.offset, target.byteLength);
873
886
  }
874
- if (!Buffer2.isBuffer(target)) {
887
+ if (!_Buffer.isBuffer(target)) {
875
888
  throw new TypeError(`${'The "target" argument must be one of type Buffer or Uint8Array. Received type '}${typeof target}`);
876
889
  }
877
890
  if (start === void 0) {
@@ -949,7 +962,7 @@ var Buffer2 = class extends Uint8Array {
949
962
  if (end < start)
950
963
  end = start;
951
964
  const newBuf = this.subarray(start, end);
952
- Object.setPrototypeOf(newBuf, Buffer2.prototype);
965
+ Object.setPrototypeOf(newBuf, _Buffer.prototype);
953
966
  return newBuf;
954
967
  }
955
968
  // Typo support?
@@ -1024,7 +1037,8 @@ var Buffer2 = class extends Uint8Array {
1024
1037
  }
1025
1038
  }
1026
1039
  };
1027
- Buffer2.poolSize = 8192;
1040
+ var Buffer2 = _Buffer;
1041
+ __publicField(Buffer2, "poolSize", 8192);
1028
1042
  function checkInt(buf, value, offset, ext, max, min) {
1029
1043
  if (!Buffer2.isBuffer(buf))
1030
1044
  throw new TypeError('"buffer" argument must be a Buffer instance');
@@ -2773,6 +2787,9 @@ function materializeColumnAsColumnarArray(schema, columnData, rowCount, key, col
2773
2787
 
2774
2788
  // dist/parquetjs/schema/schema.js
2775
2789
  var ParquetSchema = class {
2790
+ schema;
2791
+ fields;
2792
+ fieldList;
2776
2793
  /**
2777
2794
  * Create a new schema from a JSON schema definition
2778
2795
  */
@@ -3004,6 +3021,12 @@ var PageType;
3004
3021
  var import_node_int64 = __toESM(require("node-int64"), 1);
3005
3022
  var thrift = __toESM(require("thrift"), 1);
3006
3023
  var Statistics = class {
3024
+ max;
3025
+ min;
3026
+ null_count;
3027
+ distinct_count;
3028
+ max_value;
3029
+ min_value;
3007
3030
  constructor(args) {
3008
3031
  if (args != null && args.max != null) {
3009
3032
  this.max = args.max;
@@ -3365,6 +3388,8 @@ var NullType = class {
3365
3388
  // dist/parquetjs/parquet-thrift/DecimalType.js
3366
3389
  var thrift9 = __toESM(require("thrift"), 1);
3367
3390
  var DecimalType = class {
3391
+ scale;
3392
+ precision;
3368
3393
  constructor(args) {
3369
3394
  if (args != null && args.scale != null) {
3370
3395
  this.scale = args.scale;
@@ -3505,6 +3530,8 @@ var thrift13 = __toESM(require("thrift"), 1);
3505
3530
  // dist/parquetjs/parquet-thrift/TimeUnit.js
3506
3531
  var thrift12 = __toESM(require("thrift"), 1);
3507
3532
  var TimeUnit = class {
3533
+ MILLIS;
3534
+ MICROS;
3508
3535
  constructor(args) {
3509
3536
  let _fieldsSet = 0;
3510
3537
  if (args != null) {
@@ -3597,6 +3624,8 @@ var TimeUnit = class {
3597
3624
 
3598
3625
  // dist/parquetjs/parquet-thrift/TimestampType.js
3599
3626
  var TimestampType = class {
3627
+ isAdjustedToUTC;
3628
+ unit;
3600
3629
  constructor(args) {
3601
3630
  if (args != null && args.isAdjustedToUTC != null) {
3602
3631
  this.isAdjustedToUTC = args.isAdjustedToUTC;
@@ -3670,6 +3699,8 @@ var TimestampType = class {
3670
3699
  // dist/parquetjs/parquet-thrift/TimeType.js
3671
3700
  var thrift14 = __toESM(require("thrift"), 1);
3672
3701
  var TimeType = class {
3702
+ isAdjustedToUTC;
3703
+ unit;
3673
3704
  constructor(args) {
3674
3705
  if (args != null && args.isAdjustedToUTC != null) {
3675
3706
  this.isAdjustedToUTC = args.isAdjustedToUTC;
@@ -3743,6 +3774,8 @@ var TimeType = class {
3743
3774
  // dist/parquetjs/parquet-thrift/IntType.js
3744
3775
  var thrift15 = __toESM(require("thrift"), 1);
3745
3776
  var IntType = class {
3777
+ bitWidth;
3778
+ isSigned;
3746
3779
  constructor(args) {
3747
3780
  if (args != null && args.bitWidth != null) {
3748
3781
  this.bitWidth = args.bitWidth;
@@ -3883,6 +3916,19 @@ var thrift19 = __toESM(require("thrift"), 1);
3883
3916
  // dist/parquetjs/parquet-thrift/LogicalType.js
3884
3917
  var thrift18 = __toESM(require("thrift"), 1);
3885
3918
  var LogicalType = class {
3919
+ STRING;
3920
+ MAP;
3921
+ LIST;
3922
+ ENUM;
3923
+ DECIMAL;
3924
+ DATE;
3925
+ TIME;
3926
+ TIMESTAMP;
3927
+ INTEGER;
3928
+ UNKNOWN;
3929
+ JSON;
3930
+ BSON;
3931
+ UUID;
3886
3932
  constructor(args) {
3887
3933
  let _fieldsSet = 0;
3888
3934
  if (args != null) {
@@ -4206,6 +4252,16 @@ var LogicalType = class {
4206
4252
 
4207
4253
  // dist/parquetjs/parquet-thrift/SchemaElement.js
4208
4254
  var SchemaElement = class {
4255
+ type;
4256
+ type_length;
4257
+ repetition_type;
4258
+ name;
4259
+ num_children;
4260
+ converted_type;
4261
+ scale;
4262
+ precision;
4263
+ field_id;
4264
+ logicalType;
4209
4265
  constructor(args) {
4210
4266
  if (args != null && args.type != null) {
4211
4267
  this.type = args.type;
@@ -4405,6 +4461,11 @@ var SchemaElement = class {
4405
4461
  // dist/parquetjs/parquet-thrift/DataPageHeader.js
4406
4462
  var thrift20 = __toESM(require("thrift"), 1);
4407
4463
  var DataPageHeader = class {
4464
+ num_values;
4465
+ encoding;
4466
+ definition_level_encoding;
4467
+ repetition_level_encoding;
4468
+ statistics;
4408
4469
  constructor(args) {
4409
4470
  if (args != null && args.num_values != null) {
4410
4471
  this.num_values = args.num_values;
@@ -4562,6 +4623,9 @@ var IndexPageHeader = class {
4562
4623
  // dist/parquetjs/parquet-thrift/DictionaryPageHeader.js
4563
4624
  var thrift22 = __toESM(require("thrift"), 1);
4564
4625
  var DictionaryPageHeader = class {
4626
+ num_values;
4627
+ encoding;
4628
+ is_sorted;
4565
4629
  constructor(args) {
4566
4630
  if (args != null && args.num_values != null) {
4567
4631
  this.num_values = args.num_values;
@@ -4651,8 +4715,15 @@ var DictionaryPageHeader = class {
4651
4715
  // dist/parquetjs/parquet-thrift/DataPageHeaderV2.js
4652
4716
  var thrift23 = __toESM(require("thrift"), 1);
4653
4717
  var DataPageHeaderV2 = class {
4718
+ num_values;
4719
+ num_nulls;
4720
+ num_rows;
4721
+ encoding;
4722
+ definition_levels_byte_length;
4723
+ repetition_levels_byte_length;
4724
+ is_compressed = true;
4725
+ statistics;
4654
4726
  constructor(args) {
4655
- this.is_compressed = true;
4656
4727
  if (args != null && args.num_values != null) {
4657
4728
  this.num_values = args.num_values;
4658
4729
  } else {
@@ -4829,6 +4900,14 @@ var DataPageHeaderV2 = class {
4829
4900
  // dist/parquetjs/parquet-thrift/PageHeader.js
4830
4901
  var thrift24 = __toESM(require("thrift"), 1);
4831
4902
  var PageHeader = class {
4903
+ type;
4904
+ uncompressed_page_size;
4905
+ compressed_page_size;
4906
+ crc;
4907
+ data_page_header;
4908
+ index_page_header;
4909
+ dictionary_page_header;
4910
+ data_page_header_v2;
4832
4911
  constructor(args) {
4833
4912
  if (args != null && args.type != null) {
4834
4913
  this.type = args.type;
@@ -5000,6 +5079,8 @@ var PageHeader = class {
5000
5079
  // dist/parquetjs/parquet-thrift/KeyValue.js
5001
5080
  var thrift25 = __toESM(require("thrift"), 1);
5002
5081
  var KeyValue = class {
5082
+ key;
5083
+ value;
5003
5084
  constructor(args) {
5004
5085
  if (args != null && args.key != null) {
5005
5086
  this.key = args.key;
@@ -5071,6 +5152,9 @@ var KeyValue = class {
5071
5152
  // dist/parquetjs/parquet-thrift/SortingColumn.js
5072
5153
  var thrift26 = __toESM(require("thrift"), 1);
5073
5154
  var SortingColumn = class {
5155
+ column_idx;
5156
+ descending;
5157
+ nulls_first;
5074
5158
  constructor(args) {
5075
5159
  if (args != null && args.column_idx != null) {
5076
5160
  this.column_idx = args.column_idx;
@@ -5162,6 +5246,9 @@ var SortingColumn = class {
5162
5246
  // dist/parquetjs/parquet-thrift/PageEncodingStats.js
5163
5247
  var thrift27 = __toESM(require("thrift"), 1);
5164
5248
  var PageEncodingStats = class {
5249
+ page_type;
5250
+ encoding;
5251
+ count;
5165
5252
  constructor(args) {
5166
5253
  if (args != null && args.page_type != null) {
5167
5254
  this.page_type = args.page_type;
@@ -5254,6 +5341,19 @@ var PageEncodingStats = class {
5254
5341
  var import_node_int642 = __toESM(require("node-int64"), 1);
5255
5342
  var thrift28 = __toESM(require("thrift"), 1);
5256
5343
  var ColumnMetaData = class {
5344
+ type;
5345
+ encodings;
5346
+ path_in_schema;
5347
+ codec;
5348
+ num_values;
5349
+ total_uncompressed_size;
5350
+ total_compressed_size;
5351
+ key_value_metadata;
5352
+ data_page_offset;
5353
+ index_page_offset;
5354
+ dictionary_page_offset;
5355
+ statistics;
5356
+ encoding_stats;
5257
5357
  constructor(args) {
5258
5358
  if (args != null && args.type != null) {
5259
5359
  this.type = args.type;
@@ -5584,6 +5684,13 @@ var ColumnMetaData = class {
5584
5684
  var import_node_int643 = __toESM(require("node-int64"), 1);
5585
5685
  var thrift29 = __toESM(require("thrift"), 1);
5586
5686
  var ColumnChunk = class {
5687
+ file_path;
5688
+ file_offset;
5689
+ meta_data;
5690
+ offset_index_offset;
5691
+ offset_index_length;
5692
+ column_index_offset;
5693
+ column_index_length;
5587
5694
  constructor(args) {
5588
5695
  if (args != null && args.file_path != null) {
5589
5696
  this.file_path = args.file_path;
@@ -5748,6 +5855,10 @@ var ColumnChunk = class {
5748
5855
  var import_node_int644 = __toESM(require("node-int64"), 1);
5749
5856
  var thrift30 = __toESM(require("thrift"), 1);
5750
5857
  var RowGroup = class {
5858
+ columns;
5859
+ total_byte_size;
5860
+ num_rows;
5861
+ sorting_columns;
5751
5862
  constructor(args) {
5752
5863
  if (args != null && args.columns != null) {
5753
5864
  this.columns = args.columns;
@@ -5921,6 +6032,7 @@ var thrift33 = __toESM(require("thrift"), 1);
5921
6032
  // dist/parquetjs/parquet-thrift/ColumnOrder.js
5922
6033
  var thrift32 = __toESM(require("thrift"), 1);
5923
6034
  var ColumnOrder = class {
6035
+ TYPE_ORDER;
5924
6036
  constructor(args) {
5925
6037
  let _fieldsSet = 0;
5926
6038
  if (args != null) {
@@ -5992,6 +6104,13 @@ var ColumnOrder = class {
5992
6104
 
5993
6105
  // dist/parquetjs/parquet-thrift/FileMetaData.js
5994
6106
  var FileMetaData = class {
6107
+ version;
6108
+ schema;
6109
+ num_rows;
6110
+ row_groups;
6111
+ key_value_metadata;
6112
+ created_by;
6113
+ column_orders;
5995
6114
  constructor(args = null) {
5996
6115
  if (args != null && args.version != null) {
5997
6116
  this.version = args.version;
@@ -6195,7 +6314,7 @@ var FileMetaData = class {
6195
6314
  };
6196
6315
 
6197
6316
  // dist/lib/constants.js
6198
- var VERSION = true ? "4.2.0-alpha.4" : "latest";
6317
+ var VERSION = true ? "4.2.0-alpha.5" : "latest";
6199
6318
  var PARQUET_WASM_URL = "https://unpkg.com/parquet-wasm@0.6.0-beta.1/esm/arrow1_bg.wasm";
6200
6319
  var PARQUET_MAGIC = "PAR1";
6201
6320
  var PARQUET_MAGIC_ENCRYPTED = "PARE";
@@ -6204,10 +6323,7 @@ var PARQUET_RDLVL_ENCODING = "RLE";
6204
6323
 
6205
6324
  // dist/parquetjs/utils/read-utils.js
6206
6325
  var UFramedTransport = class extends import_thrift.TFramedTransport {
6207
- constructor() {
6208
- super(...arguments);
6209
- this.readPos = 0;
6210
- }
6326
+ readPos = 0;
6211
6327
  };
6212
6328
  function serializeThrift(obj) {
6213
6329
  const output = [];
@@ -6547,11 +6663,13 @@ function preserveBinary(d) {
6547
6663
  }
6548
6664
 
6549
6665
  // dist/parquetjs/parser/parquet-reader.js
6550
- var ParquetReader = class {
6666
+ var _ParquetReader = class {
6667
+ props;
6668
+ file;
6669
+ metadata = null;
6551
6670
  constructor(file, props) {
6552
- this.metadata = null;
6553
6671
  this.file = file;
6554
- this.props = { ...ParquetReader.defaultProps, ...props };
6672
+ this.props = { ..._ParquetReader.defaultProps, ...props };
6555
6673
  }
6556
6674
  close() {
6557
6675
  this.file.close();
@@ -6723,10 +6841,12 @@ var ParquetReader = class {
6723
6841
  return decodedPage.dictionary;
6724
6842
  }
6725
6843
  };
6726
- ParquetReader.defaultProps = {
6727
- defaultDictionarySize: 1e6,
6844
+ var ParquetReader = _ParquetReader;
6845
+ __publicField(ParquetReader, "defaultProps", {
6846
+ // max ArrayBuffer size in js is 2Gb
6847
+ defaultDictionarySize: 2147483648,
6728
6848
  preserveBinary: false
6729
- };
6849
+ });
6730
6850
 
6731
6851
  // dist/lib/arrow/convert-schema-from-parquet.js
6732
6852
  var PARQUET_TYPE_MAPPING = {
@@ -6967,7 +7087,7 @@ function convertRowGroupToTableBatch(rowGroup, parquetSchema, schema) {
6967
7087
  }
6968
7088
 
6969
7089
  // dist/parquet-loader.js
6970
- var VERSION2 = true ? "4.2.0-alpha.4" : "latest";
7090
+ var VERSION2 = true ? "4.2.0-alpha.5" : "latest";
6971
7091
  var ParquetWorkerLoader = {
6972
7092
  name: "Apache Parquet",
6973
7093
  id: "parquet",
@@ -7048,7 +7168,7 @@ var ParquetColumnarLoader = {
7048
7168
  };
7049
7169
 
7050
7170
  // dist/parquet-writer.js
7051
- var VERSION3 = true ? "4.2.0-alpha.4" : "latest";
7171
+ var VERSION3 = true ? "4.2.0-alpha.5" : "latest";
7052
7172
  var ParquetWriter = {
7053
7173
  name: "Apache Parquet",
7054
7174
  id: "parquet",
@@ -7224,6 +7344,12 @@ var ParquetEncoder = class {
7224
7344
  const envelopeWriter = await ParquetEnvelopeWriter.openStream(schema, outputStream, opts);
7225
7345
  return new ParquetEncoder(schema, envelopeWriter, opts);
7226
7346
  }
7347
+ schema;
7348
+ envelopeWriter;
7349
+ rowBuffer;
7350
+ rowGroupSize;
7351
+ closed;
7352
+ userMetadata;
7227
7353
  /**
7228
7354
  * Create a new buffered parquet writer for a given envelope writer
7229
7355
  */
@@ -7309,6 +7435,14 @@ var ParquetEnvelopeWriter = class {
7309
7435
  const closeFn = osclose.bind(void 0, outputStream);
7310
7436
  return new ParquetEnvelopeWriter(schema, writeFn, closeFn, 0, opts);
7311
7437
  }
7438
+ schema;
7439
+ write;
7440
+ close;
7441
+ offset;
7442
+ rowCount;
7443
+ rowGroups;
7444
+ pageSize;
7445
+ useDataPageV2;
7312
7446
  constructor(schema, writeFn, closeFn, fileOffset, opts) {
7313
7447
  this.schema = schema;
7314
7448
  this.write = writeFn;