dataply 0.0.23 → 0.0.24-alpha.0
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/cjs/index.js
CHANGED
|
@@ -6190,6 +6190,24 @@ function crc32(buf) {
|
|
|
6190
6190
|
return (crc ^ -1) >>> 0;
|
|
6191
6191
|
}
|
|
6192
6192
|
|
|
6193
|
+
// src/utils/array.ts
|
|
6194
|
+
function getMinMaxValue(array) {
|
|
6195
|
+
let i = 0;
|
|
6196
|
+
let min = Infinity;
|
|
6197
|
+
let max = -Infinity;
|
|
6198
|
+
let len = array.length;
|
|
6199
|
+
while (i < len) {
|
|
6200
|
+
if (array[i] < min) {
|
|
6201
|
+
min = array[i];
|
|
6202
|
+
}
|
|
6203
|
+
if (array[i] > max) {
|
|
6204
|
+
max = array[i];
|
|
6205
|
+
}
|
|
6206
|
+
i++;
|
|
6207
|
+
}
|
|
6208
|
+
return [min, max];
|
|
6209
|
+
}
|
|
6210
|
+
|
|
6193
6211
|
// src/core/Row.ts
|
|
6194
6212
|
var Row = class _Row {
|
|
6195
6213
|
static CONSTANT = {
|
|
@@ -9127,8 +9145,7 @@ var RowTableEngine = class {
|
|
|
9127
9145
|
for (let i = 0, len = pks.length; i < len; i++) {
|
|
9128
9146
|
pkIndexMap.set(pks[i], i);
|
|
9129
9147
|
}
|
|
9130
|
-
const minPk =
|
|
9131
|
-
const maxPk = Math.max(...pks);
|
|
9148
|
+
const [minPk, maxPk] = getMinMaxValue(pks);
|
|
9132
9149
|
const pkRidPairs = new Array(pks.length).fill(null);
|
|
9133
9150
|
const btx = await this.getBPTreeTransaction(tx);
|
|
9134
9151
|
const stream = btx.whereStream({ gte: minPk, lte: maxPk });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type SupportedNumberArray = number[] | Uint8Array | Uint16Array | Uint32Array | Float16Array | Float32Array | Float64Array;
|
|
2
|
+
export declare function getMinValue(array: SupportedNumberArray): number;
|
|
3
|
+
export declare function getMaxValue(array: SupportedNumberArray): number;
|
|
4
|
+
export declare function getMinMaxValue(array: SupportedNumberArray): [number, number];
|
|
5
|
+
export {};
|