@milaboratories/pframes-rs-node 1.1.4 → 1.1.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/export/addon-def.ts +2 -2
- package/export/tests/pframes.test.ts +19 -19
- package/export/wrapper.ts +2 -2
- package/package.json +4 -4
package/export/addon-def.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type {
|
|
|
11
11
|
TableRange,
|
|
12
12
|
UniqueValuesRequest,
|
|
13
13
|
UniqueValuesResponse,
|
|
14
|
-
|
|
14
|
+
DataQuery,
|
|
15
15
|
} from "@milaboratories/pl-model-common";
|
|
16
16
|
import type { PFrameInternal } from "@milaboratories/pl-model-middle-layer";
|
|
17
17
|
|
|
@@ -68,7 +68,7 @@ interface NodeFrame {
|
|
|
68
68
|
id: PFrameInternal.PTableId,
|
|
69
69
|
request: {
|
|
70
70
|
tableSpec: PTableColumnSpec[];
|
|
71
|
-
dataQuery:
|
|
71
|
+
dataQuery: DataQuery;
|
|
72
72
|
},
|
|
73
73
|
) => NodeTableSymbol;
|
|
74
74
|
pFrameGetUniqueValues: (
|
|
@@ -15,7 +15,7 @@ import type {
|
|
|
15
15
|
PTableColumnSpec,
|
|
16
16
|
PTableSorting,
|
|
17
17
|
PTableVector,
|
|
18
|
-
|
|
18
|
+
DataQuery,
|
|
19
19
|
UniqueValuesResponse,
|
|
20
20
|
} from "@milaboratories/pl-model-common";
|
|
21
21
|
import { PFrameFactory } from "..";
|
|
@@ -371,7 +371,7 @@ describe("PFrame Table Creation", () => {
|
|
|
371
371
|
await expect(table.getShape()).rejects.toThrow();
|
|
372
372
|
});
|
|
373
373
|
|
|
374
|
-
//
|
|
374
|
+
// DataQuery requests for createTableV2 tests
|
|
375
375
|
const createTableV2Requests = {
|
|
376
376
|
request1: {
|
|
377
377
|
tableSpec: [
|
|
@@ -391,7 +391,7 @@ describe("PFrame Table Creation", () => {
|
|
|
391
391
|
},
|
|
392
392
|
},
|
|
393
393
|
] as PTableColumnSpec[],
|
|
394
|
-
dataQuery: { type: "column",
|
|
394
|
+
dataQuery: { type: "column", column: "column" } as DataQuery,
|
|
395
395
|
},
|
|
396
396
|
request2: {
|
|
397
397
|
tableSpec: [
|
|
@@ -411,7 +411,7 @@ describe("PFrame Table Creation", () => {
|
|
|
411
411
|
},
|
|
412
412
|
},
|
|
413
413
|
] as PTableColumnSpec[],
|
|
414
|
-
dataQuery: { type: "column",
|
|
414
|
+
dataQuery: { type: "column", column: "column" } as DataQuery,
|
|
415
415
|
},
|
|
416
416
|
request3: {
|
|
417
417
|
tableSpec: [
|
|
@@ -431,7 +431,7 @@ describe("PFrame Table Creation", () => {
|
|
|
431
431
|
},
|
|
432
432
|
},
|
|
433
433
|
] as PTableColumnSpec[],
|
|
434
|
-
dataQuery: { type: "column",
|
|
434
|
+
dataQuery: { type: "column", column: "column" } as DataQuery,
|
|
435
435
|
},
|
|
436
436
|
request4: {
|
|
437
437
|
tableSpec: [
|
|
@@ -451,17 +451,17 @@ describe("PFrame Table Creation", () => {
|
|
|
451
451
|
},
|
|
452
452
|
},
|
|
453
453
|
] as PTableColumnSpec[],
|
|
454
|
-
dataQuery: { type: "column",
|
|
454
|
+
dataQuery: { type: "column", column: "column" } as DataQuery,
|
|
455
455
|
},
|
|
456
456
|
};
|
|
457
457
|
|
|
458
458
|
test.concurrent("create_table_by_data_query_1", async ({ expect }) => {
|
|
459
459
|
const testCase = "create_table_request_1";
|
|
460
460
|
const expectedResponse = createTableExpectedResponses.request1;
|
|
461
|
-
const
|
|
461
|
+
const DataqueryRequest = createTableV2Requests.request1;
|
|
462
462
|
|
|
463
463
|
using pframe = await readPFrame(testCase);
|
|
464
|
-
using table = pframe.createTableV2(ulid() as PFrameInternal.PTableId,
|
|
464
|
+
using table = pframe.createTableV2(ulid() as PFrameInternal.PTableId, DataqueryRequest);
|
|
465
465
|
|
|
466
466
|
const columnIndices = Array.from({ length: table.getSpec().length }, (_, i) => i);
|
|
467
467
|
const actualResponse = await table.getData(columnIndices);
|
|
@@ -471,10 +471,10 @@ describe("PFrame Table Creation", () => {
|
|
|
471
471
|
test.concurrent("create_table_by_data_query_2", async ({ expect }) => {
|
|
472
472
|
const testCase = "create_table_request_2";
|
|
473
473
|
const expectedResponse = createTableExpectedResponses.request2;
|
|
474
|
-
const
|
|
474
|
+
const DataqueryRequest = createTableV2Requests.request2;
|
|
475
475
|
|
|
476
476
|
using pframe = await readPFrame(testCase);
|
|
477
|
-
using table = pframe.createTableV2(ulid() as PFrameInternal.PTableId,
|
|
477
|
+
using table = pframe.createTableV2(ulid() as PFrameInternal.PTableId, DataqueryRequest);
|
|
478
478
|
|
|
479
479
|
const columnIndices = Array.from({ length: table.getSpec().length }, (_, i) => i);
|
|
480
480
|
const actualResponse = await table.getData(columnIndices);
|
|
@@ -484,10 +484,10 @@ describe("PFrame Table Creation", () => {
|
|
|
484
484
|
test.concurrent("create_table_by_data_query_3", async ({ expect }) => {
|
|
485
485
|
const testCase = "create_table_request_3";
|
|
486
486
|
const expectedResponse = createTableExpectedResponses.request3;
|
|
487
|
-
const
|
|
487
|
+
const DataqueryRequest = createTableV2Requests.request3;
|
|
488
488
|
|
|
489
489
|
using pframe = await readPFrame(testCase);
|
|
490
|
-
using table = pframe.createTableV2(ulid() as PFrameInternal.PTableId,
|
|
490
|
+
using table = pframe.createTableV2(ulid() as PFrameInternal.PTableId, DataqueryRequest);
|
|
491
491
|
|
|
492
492
|
const columnIndices = Array.from({ length: table.getSpec().length }, (_, i) => i);
|
|
493
493
|
const actualResponse = await table.getData(columnIndices);
|
|
@@ -497,10 +497,10 @@ describe("PFrame Table Creation", () => {
|
|
|
497
497
|
test.concurrent("create_table_by_data_query_4", async ({ expect }) => {
|
|
498
498
|
const testCase = "create_table_request_4";
|
|
499
499
|
const expectedResponse = createTableExpectedResponses.request4;
|
|
500
|
-
const
|
|
500
|
+
const DataqueryRequest = createTableV2Requests.request4;
|
|
501
501
|
|
|
502
502
|
using pframe = await readPFrame(testCase);
|
|
503
|
-
using table = pframe.createTableV2(ulid() as PFrameInternal.PTableId,
|
|
503
|
+
using table = pframe.createTableV2(ulid() as PFrameInternal.PTableId, DataqueryRequest);
|
|
504
504
|
|
|
505
505
|
const columnIndices = Array.from({ length: table.getSpec().length }, (_, i) => i);
|
|
506
506
|
const actualResponse = await table.getData(columnIndices);
|
|
@@ -524,8 +524,8 @@ describe("PFrame Table Creation", () => {
|
|
|
524
524
|
pframe.addColumnSpec(columnId, columnSpec);
|
|
525
525
|
await pframe.setColumnData(columnId, dataInfo);
|
|
526
526
|
|
|
527
|
-
// Construct
|
|
528
|
-
const
|
|
527
|
+
// Construct DataQuery request for the failing column
|
|
528
|
+
const DataqueryRequest = {
|
|
529
529
|
tableSpec: [
|
|
530
530
|
{
|
|
531
531
|
type: "axis",
|
|
@@ -545,13 +545,13 @@ describe("PFrame Table Creation", () => {
|
|
|
545
545
|
] as PTableColumnSpec[],
|
|
546
546
|
dataQuery: {
|
|
547
547
|
type: "column",
|
|
548
|
-
|
|
549
|
-
} as
|
|
548
|
+
column: "column",
|
|
549
|
+
} as DataQuery,
|
|
550
550
|
};
|
|
551
551
|
|
|
552
552
|
using table = (pframe as unknown as PFrame).createTableV2(
|
|
553
553
|
ulid() as PFrameInternal.PTableId,
|
|
554
|
-
|
|
554
|
+
DataqueryRequest,
|
|
555
555
|
);
|
|
556
556
|
|
|
557
557
|
await expect(table.getShape()).rejects.toThrow();
|
package/export/wrapper.ts
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
type TableRange,
|
|
15
15
|
type UniqueValuesRequest,
|
|
16
16
|
type UniqueValuesResponse,
|
|
17
|
-
type
|
|
17
|
+
type DataQuery,
|
|
18
18
|
ensureError,
|
|
19
19
|
isAbortError,
|
|
20
20
|
} from "@milaboratories/pl-model-common";
|
|
@@ -427,7 +427,7 @@ export class PFrame implements PFrameInternal.PFrameV13 {
|
|
|
427
427
|
requestId: PFrameInternal.PTableId,
|
|
428
428
|
request: {
|
|
429
429
|
tableSpec: PTableColumnSpec[];
|
|
430
|
-
dataQuery:
|
|
430
|
+
dataQuery: DataQuery;
|
|
431
431
|
},
|
|
432
432
|
): PTable {
|
|
433
433
|
const timer = PerfTimer.start();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pframes-rs-node",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "PFrames - Node.js Native Addon",
|
|
5
5
|
"homepage": "https://github.com/milaboratory/pframes-rs#readme",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@mapbox/node-pre-gyp": "^2.0.3",
|
|
40
40
|
"@milaboratories/helpers": "1.13.1",
|
|
41
|
-
"@milaboratories/pl-model-common": "1.24.
|
|
41
|
+
"@milaboratories/pl-model-common": "1.24.7",
|
|
42
42
|
"ulid": "^3.0.2",
|
|
43
|
-
"@milaboratories/pframes-rs-serv": "1.1.
|
|
43
|
+
"@milaboratories/pframes-rs-serv": "1.1.5"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@milaboratories/build-configs": "1.4.0",
|
|
47
|
-
"@milaboratories/pl-model-middle-layer": "1.11.
|
|
47
|
+
"@milaboratories/pl-model-middle-layer": "1.11.9",
|
|
48
48
|
"@milaboratories/ts-builder": "1.2.9",
|
|
49
49
|
"@milaboratories/ts-configs": "1.2.0",
|
|
50
50
|
"@types/node": "~22.19.5",
|