@loaders.gl/parquet 4.2.1 → 4.3.0-alpha.1
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
CHANGED
|
@@ -1745,6 +1745,9 @@ var Buffer3 = installBufferPolyfill();
|
|
|
1745
1745
|
// dist/parquet-loader.js
|
|
1746
1746
|
var import_loader_utils2 = require("@loaders.gl/loader-utils");
|
|
1747
1747
|
|
|
1748
|
+
// dist/lib/parsers/parse-parquet.js
|
|
1749
|
+
var import_log = __toESM(require("@probe.gl/log"), 1);
|
|
1750
|
+
|
|
1748
1751
|
// dist/parquetjs/codecs/plain.js
|
|
1749
1752
|
var import_int53 = __toESM(require("int53"), 1);
|
|
1750
1753
|
function encodeValues(type, values, opts) {
|
|
@@ -6961,9 +6964,18 @@ async function parseParquetFile(file, options) {
|
|
|
6961
6964
|
const rows = [];
|
|
6962
6965
|
const rowBatches = reader.rowBatchIterator(options == null ? void 0 : options.parquet);
|
|
6963
6966
|
for await (const rowBatch of rowBatches) {
|
|
6967
|
+
let limitHasReached = false;
|
|
6964
6968
|
for (const row of rowBatch) {
|
|
6969
|
+
if ((options == null ? void 0 : options.limit) && rows.length >= (options == null ? void 0 : options.limit)) {
|
|
6970
|
+
limitHasReached = true;
|
|
6971
|
+
break;
|
|
6972
|
+
}
|
|
6965
6973
|
rows.push(row);
|
|
6966
6974
|
}
|
|
6975
|
+
if (limitHasReached) {
|
|
6976
|
+
import_log.default.warn(`Rows number limit has been reached. Only first ${options == null ? void 0 : options.limit} are loaded`)();
|
|
6977
|
+
break;
|
|
6978
|
+
}
|
|
6967
6979
|
}
|
|
6968
6980
|
const objectRowTable = {
|
|
6969
6981
|
shape: "object-row-table",
|