@platforma-open/milaboratories.repertoire-diversity-2.model 1.5.2 → 1.5.4
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +15 -0
- package/dist/bundle.js +166 -83
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +4 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/work/repertoire-diversity/repertoire-diversity/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @platforma-open/milaboratories.repertoire-diversity-2.model@1.5.
|
|
3
|
+
> @platforma-open/milaboratories.repertoire-diversity-2.model@1.5.4 build /home/runner/work/repertoire-diversity/repertoire-diversity/model
|
|
4
4
|
> tsup && vite build && block-tools build-model
|
|
5
5
|
|
|
6
6
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
[34mESM[39m Build start
|
|
14
14
|
[32mESM[39m [1mdist/index.js [22m[32m2.87 KB[39m
|
|
15
15
|
[32mESM[39m [1mdist/index.js.map [22m[32m7.25 KB[39m
|
|
16
|
-
[32mESM[39m ⚡️ Build success in
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 127ms
|
|
17
17
|
[32mCJS[39m [1mdist/index.cjs [22m[32m2.89 KB[39m
|
|
18
18
|
[32mCJS[39m [1mdist/index.cjs.map [22m[32m7.34 KB[39m
|
|
19
|
-
[32mCJS[39m ⚡️ Build success in
|
|
19
|
+
[32mCJS[39m ⚡️ Build success in 128ms
|
|
20
20
|
[34mDTS[39m Build start
|
|
21
|
-
[32mDTS[39m ⚡️ Build success in
|
|
21
|
+
[32mDTS[39m ⚡️ Build success in 1994ms
|
|
22
22
|
[32mDTS[39m [1mdist/index.d.cts [22m[32m2.83 KB[39m
|
|
23
23
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.83 KB[39m
|
|
24
24
|
[36mvite v6.2.6 [32mbuilding for production...[36m[39m
|
|
25
25
|
transforming...
|
|
26
|
-
[32m✓[39m
|
|
26
|
+
[32m✓[39m 78 modules transformed.
|
|
27
27
|
rendering chunks...
|
|
28
28
|
computing gzip size...
|
|
29
|
-
[2mdist/[22m[36mbundle.js [39m[1m[
|
|
30
|
-
[2mdist/[22m[36mbundle.js [39m[1m[
|
|
31
|
-
[32m✓ built in
|
|
29
|
+
[2mdist/[22m[36mbundle.js [39m[1m[2m242.24 kB[22m[1m[22m[2m │ gzip: 45.71 kB[22m[2m │ map: 516.75 kB[22m
|
|
30
|
+
[2mdist/[22m[36mbundle.js [39m[1m[2m257.47 kB[22m[1m[22m[2m │ gzip: 46.42 kB[22m[2m │ map: 518.47 kB[22m
|
|
31
|
+
[32m✓ built in 926ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @platforma-open/milaboratories.repertoire-diversity-2.model
|
|
2
2
|
|
|
3
|
+
## 1.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 63c4b69: technical release
|
|
8
|
+
|
|
9
|
+
## 1.5.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 3e39f73: technical release
|
|
14
|
+
- 37c4e58: technical release
|
|
15
|
+
- 7c4d608: technical release
|
|
16
|
+
- a2200a0: technical release
|
|
17
|
+
|
|
3
18
|
## 1.5.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/bundle.js
CHANGED
|
@@ -3964,6 +3964,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
3964
3964
|
quotelessJson,
|
|
3965
3965
|
ZodError
|
|
3966
3966
|
});
|
|
3967
|
+
z.object({
|
|
3968
|
+
type: z.literal("plain"),
|
|
3969
|
+
content: z.string()
|
|
3970
|
+
});
|
|
3967
3971
|
z.object({
|
|
3968
3972
|
/** Included left border. */
|
|
3969
3973
|
from: z.number().min(0),
|
|
@@ -4257,14 +4261,27 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4257
4261
|
const Annotation = {
|
|
4258
4262
|
DiscreteValues: "pl7.app/discreteValues",
|
|
4259
4263
|
Graph: {
|
|
4260
|
-
|
|
4264
|
+
Axis: {
|
|
4265
|
+
HighCardinality: "pl7.app/graph/axis/highCardinality",
|
|
4266
|
+
LowerLimit: "pl7.app/graph/axis/lowerLimit",
|
|
4267
|
+
SymmetricRange: "pl7.app/graph/axis/symmetricRange",
|
|
4268
|
+
UpperLimit: "pl7.app/graph/axis/upperLimit"
|
|
4269
|
+
},
|
|
4270
|
+
IsDenseAxis: "pl7.app/graph/isDenseAxis",
|
|
4271
|
+
IsVirtual: "pl7.app/graph/isVirtual",
|
|
4272
|
+
Palette: "pl7.app/graph/palette",
|
|
4273
|
+
Thresholds: "pl7.app/graph/thresholds",
|
|
4274
|
+
TreatAbsentValuesAs: "pl7.app/graph/treatAbsentValuesAs"
|
|
4261
4275
|
},
|
|
4262
4276
|
HideDataFromUi: "pl7.app/hideDataFromUi",
|
|
4263
4277
|
HideDataFromGraphs: "pl7.app/hideDataFromGraphs",
|
|
4278
|
+
IsDiscreteFilter: "pl7.app/isDiscreteFilter",
|
|
4264
4279
|
IsLinkerColumn: "pl7.app/isLinkerColumn",
|
|
4280
|
+
IsSubset: "pl7.app/isSubset",
|
|
4265
4281
|
Label: "pl7.app/label",
|
|
4266
4282
|
Max: "pl7.app/max",
|
|
4267
4283
|
Min: "pl7.app/min",
|
|
4284
|
+
MultipliesBy: "pl7.app/multipliesBy",
|
|
4268
4285
|
Parents: "pl7.app/parents",
|
|
4269
4286
|
Sequence: {
|
|
4270
4287
|
Annotation: {
|
|
@@ -4278,14 +4295,29 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4278
4295
|
},
|
|
4279
4296
|
Trace: "pl7.app/trace"
|
|
4280
4297
|
};
|
|
4298
|
+
const ValueTypeSchema = z.enum(["Int", "Long", "Float", "Double", "String"]);
|
|
4281
4299
|
const AnnotationJson = {
|
|
4282
4300
|
[Annotation.DiscreteValues]: z.array(z.string()).or(z.array(z.number())),
|
|
4301
|
+
[Annotation.Graph.Axis.HighCardinality]: z.boolean(),
|
|
4302
|
+
[Annotation.Graph.Axis.LowerLimit]: z.number(),
|
|
4303
|
+
[Annotation.Graph.Axis.UpperLimit]: z.number(),
|
|
4304
|
+
[Annotation.Graph.Axis.SymmetricRange]: z.boolean(),
|
|
4305
|
+
[Annotation.Graph.IsDenseAxis]: z.boolean(),
|
|
4306
|
+
[Annotation.Graph.Palette]: z.object({ mapping: z.record(z.number()), name: z.string() }),
|
|
4307
|
+
[Annotation.Graph.Thresholds]: z.array(z.object({
|
|
4308
|
+
columnId: z.object({ valueType: ValueTypeSchema, name: z.string() }),
|
|
4309
|
+
value: z.number()
|
|
4310
|
+
})),
|
|
4311
|
+
[Annotation.Graph.TreatAbsentValuesAs]: z.number(),
|
|
4283
4312
|
[Annotation.Graph.IsVirtual]: z.boolean(),
|
|
4284
4313
|
[Annotation.HideDataFromUi]: z.boolean(),
|
|
4285
4314
|
[Annotation.HideDataFromGraphs]: z.boolean(),
|
|
4315
|
+
[Annotation.IsDiscreteFilter]: z.boolean(),
|
|
4286
4316
|
[Annotation.IsLinkerColumn]: z.boolean(),
|
|
4317
|
+
[Annotation.IsSubset]: z.boolean(),
|
|
4287
4318
|
[Annotation.Max]: z.number(),
|
|
4288
4319
|
[Annotation.Min]: z.number(),
|
|
4320
|
+
[Annotation.MultipliesBy]: z.array(z.string()),
|
|
4289
4321
|
[Annotation.Parents]: z.array(z.string()),
|
|
4290
4322
|
[Annotation.Sequence.Annotation.Mapping]: z.record(z.string(), z.string()),
|
|
4291
4323
|
[Annotation.Sequence.IsAnnotation]: z.boolean(),
|
|
@@ -5289,6 +5321,80 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5289
5321
|
}
|
|
5290
5322
|
const StagingAccessorName = "staging";
|
|
5291
5323
|
const MainAccessorName = "main";
|
|
5324
|
+
function filterDataInfoEntries(dataInfoEntries, axisFilters) {
|
|
5325
|
+
const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
|
|
5326
|
+
const { type } = dataInfoEntries;
|
|
5327
|
+
switch (type) {
|
|
5328
|
+
case "Json": {
|
|
5329
|
+
const { keyLength } = dataInfoEntries;
|
|
5330
|
+
for (const [axisIdx] of axisFilters)
|
|
5331
|
+
if (axisIdx >= keyLength)
|
|
5332
|
+
throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
|
|
5333
|
+
break;
|
|
5334
|
+
}
|
|
5335
|
+
case "JsonPartitioned":
|
|
5336
|
+
case "BinaryPartitioned":
|
|
5337
|
+
case "ParquetPartitioned": {
|
|
5338
|
+
const { partitionKeyLength } = dataInfoEntries;
|
|
5339
|
+
for (const [axisIdx] of axisFilters)
|
|
5340
|
+
if (axisIdx >= partitionKeyLength)
|
|
5341
|
+
throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);
|
|
5342
|
+
break;
|
|
5343
|
+
}
|
|
5344
|
+
default:
|
|
5345
|
+
throw new Error(`Unsupported data info type: ${type}`);
|
|
5346
|
+
}
|
|
5347
|
+
const keyMatchesFilters = (key) => {
|
|
5348
|
+
for (const [axisIdx, axisValue] of sortedFilters)
|
|
5349
|
+
if (key[axisIdx] !== axisValue)
|
|
5350
|
+
return false;
|
|
5351
|
+
return true;
|
|
5352
|
+
};
|
|
5353
|
+
const removeFilteredAxes = (key) => {
|
|
5354
|
+
const newKey = [...key];
|
|
5355
|
+
for (const [axisIdx] of sortedFilters)
|
|
5356
|
+
newKey.splice(axisIdx, 1);
|
|
5357
|
+
return newKey;
|
|
5358
|
+
};
|
|
5359
|
+
switch (dataInfoEntries.type) {
|
|
5360
|
+
case "Json":
|
|
5361
|
+
return {
|
|
5362
|
+
type: "Json",
|
|
5363
|
+
keyLength: dataInfoEntries.keyLength - axisFilters.length,
|
|
5364
|
+
data: dataInfoEntries.data.filter((entry) => keyMatchesFilters(entry.key)).map((entry) => ({
|
|
5365
|
+
key: removeFilteredAxes(entry.key),
|
|
5366
|
+
value: entry.value
|
|
5367
|
+
}))
|
|
5368
|
+
};
|
|
5369
|
+
case "JsonPartitioned":
|
|
5370
|
+
return {
|
|
5371
|
+
type: "JsonPartitioned",
|
|
5372
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
5373
|
+
parts: dataInfoEntries.parts.filter((entry) => keyMatchesFilters(entry.key)).map((entry) => ({
|
|
5374
|
+
key: removeFilteredAxes(entry.key),
|
|
5375
|
+
value: entry.value
|
|
5376
|
+
}))
|
|
5377
|
+
};
|
|
5378
|
+
case "BinaryPartitioned":
|
|
5379
|
+
return {
|
|
5380
|
+
type: "BinaryPartitioned",
|
|
5381
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
5382
|
+
parts: dataInfoEntries.parts.filter((entry) => keyMatchesFilters(entry.key)).map((entry) => ({
|
|
5383
|
+
key: removeFilteredAxes(entry.key),
|
|
5384
|
+
value: entry.value
|
|
5385
|
+
}))
|
|
5386
|
+
};
|
|
5387
|
+
case "ParquetPartitioned":
|
|
5388
|
+
return {
|
|
5389
|
+
type: "ParquetPartitioned",
|
|
5390
|
+
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
5391
|
+
parts: dataInfoEntries.parts.filter((entry) => keyMatchesFilters(entry.key)).map((entry) => ({
|
|
5392
|
+
key: removeFilteredAxes(entry.key),
|
|
5393
|
+
value: entry.value
|
|
5394
|
+
}))
|
|
5395
|
+
};
|
|
5396
|
+
}
|
|
5397
|
+
}
|
|
5292
5398
|
const TraceEntry = z.object({
|
|
5293
5399
|
type: z.string(),
|
|
5294
5400
|
importance: z.number().optional(),
|
|
@@ -5414,9 +5520,11 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5414
5520
|
const RT_RESOURCE_MAP_PARTITIONED = PCD_PREFIX + "Partitioned/ResourceMap";
|
|
5415
5521
|
const RT_JSON_PARTITIONED = PCD_PREFIX + "JsonPartitioned";
|
|
5416
5522
|
const RT_BINARY_PARTITIONED = PCD_PREFIX + "BinaryPartitioned";
|
|
5523
|
+
const RT_PARQUET_PARTITIONED = PCD_PREFIX + "ParquetPartitioned";
|
|
5417
5524
|
const PCD_SUP_PREFIX = PCD_PREFIX + "Partitioned/";
|
|
5418
5525
|
const RT_JSON_SUPER_PARTITIONED = PCD_SUP_PREFIX + "JsonPartitioned";
|
|
5419
5526
|
const RT_BINARY_SUPER_PARTITIONED = PCD_SUP_PREFIX + "BinaryPartitioned";
|
|
5527
|
+
const RT_PARQUET_SUPER_PARTITIONED = PCD_SUP_PREFIX + "ParquetPartitioned";
|
|
5420
5528
|
const removeIndexSuffix = (keyStr) => {
|
|
5421
5529
|
if (keyStr.endsWith(".index")) {
|
|
5422
5530
|
return { baseKey: keyStr.substring(0, keyStr.length - 6), type: "index" };
|
|
@@ -5442,10 +5550,12 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5442
5550
|
break;
|
|
5443
5551
|
case RT_JSON_PARTITIONED:
|
|
5444
5552
|
case RT_BINARY_PARTITIONED:
|
|
5553
|
+
case RT_PARQUET_PARTITIONED:
|
|
5445
5554
|
keyLength = meta["partitionKeyLength"];
|
|
5446
5555
|
break;
|
|
5447
5556
|
case RT_BINARY_SUPER_PARTITIONED:
|
|
5448
5557
|
case RT_JSON_SUPER_PARTITIONED:
|
|
5558
|
+
case RT_PARQUET_SUPER_PARTITIONED:
|
|
5449
5559
|
keyLength = meta["superPartitionKeyLength"] + meta["partitionKeyLength"];
|
|
5450
5560
|
break;
|
|
5451
5561
|
}
|
|
@@ -5453,6 +5563,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5453
5563
|
case RT_RESOURCE_MAP:
|
|
5454
5564
|
case RT_JSON_PARTITIONED:
|
|
5455
5565
|
case RT_BINARY_PARTITIONED:
|
|
5566
|
+
case RT_PARQUET_PARTITIONED:
|
|
5456
5567
|
for (let keyStr of acc.listInputFields()) {
|
|
5457
5568
|
if (rt === RT_BINARY_PARTITIONED) {
|
|
5458
5569
|
keyStr = removeIndexSuffix(keyStr).baseKey;
|
|
@@ -5464,6 +5575,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5464
5575
|
case RT_RESOURCE_MAP_PARTITIONED:
|
|
5465
5576
|
case RT_BINARY_SUPER_PARTITIONED:
|
|
5466
5577
|
case RT_JSON_SUPER_PARTITIONED:
|
|
5578
|
+
case RT_PARQUET_SUPER_PARTITIONED:
|
|
5467
5579
|
for (const supKeyStr of acc.listInputFields()) {
|
|
5468
5580
|
const keyPrefix = [...JSON.parse(supKeyStr)];
|
|
5469
5581
|
const value = acc.resolve({ field: supKeyStr, assertFieldType: "Input" });
|
|
@@ -5482,7 +5594,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5482
5594
|
return { data, keyLength };
|
|
5483
5595
|
}
|
|
5484
5596
|
function getUniquePartitionKeysForDataEntries(list) {
|
|
5485
|
-
if (list.type !== "JsonPartitioned" && list.type !== "BinaryPartitioned")
|
|
5597
|
+
if (list.type !== "JsonPartitioned" && list.type !== "BinaryPartitioned" && list.type !== "ParquetPartitioned")
|
|
5486
5598
|
throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${list.type}`);
|
|
5487
5599
|
const { parts, partitionKeyLength } = list;
|
|
5488
5600
|
const result = [];
|
|
@@ -5530,7 +5642,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5530
5642
|
return void 0;
|
|
5531
5643
|
const resourceType = acc.resourceType.name;
|
|
5532
5644
|
const meta = acc.getDataAsJson();
|
|
5533
|
-
if (keyPrefix.length > 0 && (resourceType === RT_JSON_SUPER_PARTITIONED || resourceType === RT_BINARY_SUPER_PARTITIONED)) {
|
|
5645
|
+
if (keyPrefix.length > 0 && (resourceType === RT_JSON_SUPER_PARTITIONED || resourceType === RT_BINARY_SUPER_PARTITIONED || resourceType === RT_PARQUET_SUPER_PARTITIONED)) {
|
|
5534
5646
|
throw new Error(`Unexpected nested super-partitioned resource: ${resourceType}`);
|
|
5535
5647
|
}
|
|
5536
5648
|
switch (resourceType) {
|
|
@@ -5595,6 +5707,24 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5595
5707
|
parts
|
|
5596
5708
|
};
|
|
5597
5709
|
}
|
|
5710
|
+
case RT_PARQUET_PARTITIONED: {
|
|
5711
|
+
if (typeof (meta == null ? void 0 : meta.partitionKeyLength) !== "number") {
|
|
5712
|
+
throw new Error(`Missing partitionKeyLength in metadata for ${resourceType}`);
|
|
5713
|
+
}
|
|
5714
|
+
const parts = [];
|
|
5715
|
+
for (const keyStr of acc.listInputFields()) {
|
|
5716
|
+
const value = acc.resolve({ field: keyStr, assertFieldType: "Input" });
|
|
5717
|
+
if (value === void 0)
|
|
5718
|
+
return void 0;
|
|
5719
|
+
const key = [...keyPrefix, ...JSON.parse(keyStr)];
|
|
5720
|
+
parts.push({ key, value });
|
|
5721
|
+
}
|
|
5722
|
+
return {
|
|
5723
|
+
type: "ParquetPartitioned",
|
|
5724
|
+
partitionKeyLength: meta.partitionKeyLength,
|
|
5725
|
+
parts
|
|
5726
|
+
};
|
|
5727
|
+
}
|
|
5598
5728
|
case RT_JSON_SUPER_PARTITIONED: {
|
|
5599
5729
|
if (typeof (meta == null ? void 0 : meta.superPartitionKeyLength) !== "number" || typeof (meta == null ? void 0 : meta.partitionKeyLength) !== "number") {
|
|
5600
5730
|
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${resourceType}`);
|
|
@@ -5647,6 +5777,32 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5647
5777
|
parts
|
|
5648
5778
|
};
|
|
5649
5779
|
}
|
|
5780
|
+
case RT_PARQUET_SUPER_PARTITIONED: {
|
|
5781
|
+
if (typeof (meta == null ? void 0 : meta.superPartitionKeyLength) !== "number" || typeof (meta == null ? void 0 : meta.partitionKeyLength) !== "number") {
|
|
5782
|
+
throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${resourceType}`);
|
|
5783
|
+
}
|
|
5784
|
+
const totalKeyLength = meta.superPartitionKeyLength + meta.partitionKeyLength;
|
|
5785
|
+
const parts = [];
|
|
5786
|
+
for (const supKeyStr of acc.listInputFields()) {
|
|
5787
|
+
const superPartition = acc.resolve({ field: supKeyStr, assertFieldType: "Input" });
|
|
5788
|
+
if (superPartition === void 0)
|
|
5789
|
+
return void 0;
|
|
5790
|
+
if (superPartition.resourceType.name !== RT_PARQUET_PARTITIONED) {
|
|
5791
|
+
throw new Error(`Expected ${RT_PARQUET_PARTITIONED} inside ${resourceType}, but got ${superPartition.resourceType.name}`);
|
|
5792
|
+
}
|
|
5793
|
+
const innerResult = parsePColumnData(superPartition, JSON.parse(supKeyStr));
|
|
5794
|
+
if (innerResult === void 0)
|
|
5795
|
+
return void 0;
|
|
5796
|
+
if (innerResult.type !== "ParquetPartitioned")
|
|
5797
|
+
throw new Error(`Unexpected inner result type for ${resourceType}: ${innerResult.type}`);
|
|
5798
|
+
parts.push(...innerResult.parts);
|
|
5799
|
+
}
|
|
5800
|
+
return {
|
|
5801
|
+
type: "ParquetPartitioned",
|
|
5802
|
+
partitionKeyLength: totalKeyLength,
|
|
5803
|
+
parts
|
|
5804
|
+
};
|
|
5805
|
+
}
|
|
5650
5806
|
default:
|
|
5651
5807
|
throw new Error(`Unknown resource type: ${resourceType}`);
|
|
5652
5808
|
}
|
|
@@ -5662,80 +5818,6 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
5662
5818
|
return parsePColumnData(acc);
|
|
5663
5819
|
throw new Error(`Unexpected input type: ${typeof acc}`);
|
|
5664
5820
|
}
|
|
5665
|
-
function filterDataInfoEntries(dataInfoEntries, axisFilters) {
|
|
5666
|
-
const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
|
|
5667
|
-
const { type } = dataInfoEntries;
|
|
5668
|
-
switch (type) {
|
|
5669
|
-
case "Json": {
|
|
5670
|
-
const { keyLength } = dataInfoEntries;
|
|
5671
|
-
for (const [axisIdx] of axisFilters)
|
|
5672
|
-
if (axisIdx >= keyLength)
|
|
5673
|
-
throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
|
|
5674
|
-
break;
|
|
5675
|
-
}
|
|
5676
|
-
case "JsonPartitioned":
|
|
5677
|
-
case "BinaryPartitioned":
|
|
5678
|
-
case "ParquetPartitioned": {
|
|
5679
|
-
const { partitionKeyLength } = dataInfoEntries;
|
|
5680
|
-
for (const [axisIdx] of axisFilters)
|
|
5681
|
-
if (axisIdx >= partitionKeyLength)
|
|
5682
|
-
throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);
|
|
5683
|
-
break;
|
|
5684
|
-
}
|
|
5685
|
-
default:
|
|
5686
|
-
throw new Error(`Unsupported data info type: ${type}`);
|
|
5687
|
-
}
|
|
5688
|
-
const keyMatchesFilters = (key) => {
|
|
5689
|
-
for (const [axisIdx, axisValue] of sortedFilters)
|
|
5690
|
-
if (key[axisIdx] !== axisValue)
|
|
5691
|
-
return false;
|
|
5692
|
-
return true;
|
|
5693
|
-
};
|
|
5694
|
-
const removeFilteredAxes = (key) => {
|
|
5695
|
-
const newKey = [...key];
|
|
5696
|
-
for (const [axisIdx] of sortedFilters)
|
|
5697
|
-
newKey.splice(axisIdx, 1);
|
|
5698
|
-
return newKey;
|
|
5699
|
-
};
|
|
5700
|
-
switch (dataInfoEntries.type) {
|
|
5701
|
-
case "Json":
|
|
5702
|
-
return {
|
|
5703
|
-
type: "Json",
|
|
5704
|
-
keyLength: dataInfoEntries.keyLength - axisFilters.length,
|
|
5705
|
-
data: dataInfoEntries.data.filter((entry) => keyMatchesFilters(entry.key)).map((entry) => ({
|
|
5706
|
-
key: removeFilteredAxes(entry.key),
|
|
5707
|
-
value: entry.value
|
|
5708
|
-
}))
|
|
5709
|
-
};
|
|
5710
|
-
case "JsonPartitioned":
|
|
5711
|
-
return {
|
|
5712
|
-
type: "JsonPartitioned",
|
|
5713
|
-
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
5714
|
-
parts: dataInfoEntries.parts.filter((entry) => keyMatchesFilters(entry.key)).map((entry) => ({
|
|
5715
|
-
key: removeFilteredAxes(entry.key),
|
|
5716
|
-
value: entry.value
|
|
5717
|
-
}))
|
|
5718
|
-
};
|
|
5719
|
-
case "BinaryPartitioned":
|
|
5720
|
-
return {
|
|
5721
|
-
type: "BinaryPartitioned",
|
|
5722
|
-
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
5723
|
-
parts: dataInfoEntries.parts.filter((entry) => keyMatchesFilters(entry.key)).map((entry) => ({
|
|
5724
|
-
key: removeFilteredAxes(entry.key),
|
|
5725
|
-
value: entry.value
|
|
5726
|
-
}))
|
|
5727
|
-
};
|
|
5728
|
-
case "ParquetPartitioned":
|
|
5729
|
-
return {
|
|
5730
|
-
type: "ParquetPartitioned",
|
|
5731
|
-
partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
|
|
5732
|
-
parts: dataInfoEntries.parts.filter((entry) => keyMatchesFilters(entry.key)).map((entry) => ({
|
|
5733
|
-
key: removeFilteredAxes(entry.key),
|
|
5734
|
-
value: entry.value
|
|
5735
|
-
}))
|
|
5736
|
-
};
|
|
5737
|
-
}
|
|
5738
|
-
}
|
|
5739
5821
|
function isPColumnValues(value) {
|
|
5740
5822
|
if (!Array.isArray(value))
|
|
5741
5823
|
return false;
|
|
@@ -6523,7 +6605,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6523
6605
|
this.ctx.logError(msg);
|
|
6524
6606
|
}
|
|
6525
6607
|
}
|
|
6526
|
-
var version = "1.
|
|
6608
|
+
var version = "1.45.0";
|
|
6527
6609
|
const PlatformaSDKVersion = version;
|
|
6528
6610
|
function isConfigLambda(cfgOrFh) {
|
|
6529
6611
|
return cfgOrFh.__renderLambda === true;
|
|
@@ -6821,7 +6903,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6821
6903
|
if (params.coreColumnPredicate) {
|
|
6822
6904
|
coreColumns = [];
|
|
6823
6905
|
for (const c of params.columns)
|
|
6824
|
-
if (params.coreColumnPredicate(c
|
|
6906
|
+
if (params.coreColumnPredicate(getColumnIdAndSpec(c)))
|
|
6825
6907
|
coreColumns.push(c);
|
|
6826
6908
|
else
|
|
6827
6909
|
secondaryColumns.push(c);
|
|
@@ -6848,9 +6930,9 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6848
6930
|
return readAnnotation(spec, Annotation.Table.Visibility) === "optional";
|
|
6849
6931
|
}
|
|
6850
6932
|
function createPlDataTableV2(ctx, inputColumns, tableState, ops) {
|
|
6851
|
-
if (inputColumns.length === 0)
|
|
6852
|
-
return void 0;
|
|
6853
6933
|
const columns = inputColumns.filter((c) => isLinkerColumn(c.spec) || !isColumnHidden(c.spec));
|
|
6934
|
+
if (columns.length === 0)
|
|
6935
|
+
return void 0;
|
|
6854
6936
|
const tableStateNormalized = upgradePlDataTableStateV2(tableState);
|
|
6855
6937
|
const allLabelColumns = getAllLabelColumns(ctx.resultPool);
|
|
6856
6938
|
if (!allLabelColumns)
|
|
@@ -6900,6 +6982,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6900
6982
|
return columns.filter((c) => isColumnOptional(c.spec)).map((c) => c.id);
|
|
6901
6983
|
})());
|
|
6902
6984
|
columns.filter((c) => isLinkerColumn(c.spec)).forEach((c) => hiddenColumns.delete(c.id));
|
|
6985
|
+
const coreColumnPredicate = ops == null ? void 0 : ops.coreColumnPredicate;
|
|
6903
6986
|
[...partitionFilters.map((f) => f.column), ...filters.map((f) => f.column), ...sorting.map((s) => s.column)].filter((c) => c.type === "column").forEach((c) => hiddenColumns.delete(c.id));
|
|
6904
6987
|
const visibleColumns = columns.filter((c) => !hiddenColumns.has(c.id));
|
|
6905
6988
|
const visibleLabelColumns = getMatchingLabelColumns(visibleColumns.map(getColumnIdAndSpec), allLabelColumns);
|
|
@@ -6912,7 +6995,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
6912
6995
|
partitionFilters,
|
|
6913
6996
|
filters,
|
|
6914
6997
|
sorting,
|
|
6915
|
-
coreColumnPredicate
|
|
6998
|
+
coreColumnPredicate
|
|
6916
6999
|
});
|
|
6917
7000
|
const visibleHandle = ctx.createPTable(visibleDef);
|
|
6918
7001
|
return {
|
|
@@ -7065,7 +7148,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
7065
7148
|
if (!blockColumns) {
|
|
7066
7149
|
const columns2 = new PColumnCollection();
|
|
7067
7150
|
columns2.addColumnProvider(ctx.resultPool);
|
|
7068
|
-
const allColumns = columns2.getColumns(() =>
|
|
7151
|
+
const allColumns = columns2.getColumns((spec) => !isHiddenFromGraphColumn(spec), { dontWaitAllData: true, overrideLabelAnnotation: false }) ?? [];
|
|
7069
7152
|
if (!allColumnsReady(allColumns)) {
|
|
7070
7153
|
return void 0;
|
|
7071
7154
|
}
|