@milaboratories/milaboratories.pool-explorer.model 1.0.103 → 1.0.105

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.
@@ -1,16 +1,16 @@
1
1
   WARN  Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @milaboratories/milaboratories.pool-explorer.model@1.0.103 build /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
3
+ > @milaboratories/milaboratories.pool-explorer.model@1.0.105 build /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
4
4
  > ts-builder build --target block-model && block-tools build-model
5
5
 
6
6
  Building block-model project...
7
7
  ↳ rollup -c /configs/rollup.block-model.config.js
8
8
  
9
9
  ./src/index.ts → dist, dist...
10
- created dist, dist in 8.2s
10
+ created dist, dist in 8.6s
11
11
  
12
12
  ./src/index.ts → dist...
13
13
  (!) Circular dependency
14
14
  ../../../../sdk/model/dist/components/PFrameForGraphs.js -> ../../../../sdk/model/dist/components/PlDataTable.js -> ../../../../sdk/model/dist/components/PFrameForGraphs.js
15
- created dist in 3.7s
15
+ created dist in 7.5s
16
16
  Build completed successfully
@@ -1,6 +1,6 @@
1
1
   WARN  Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @milaboratories/milaboratories.pool-explorer.model@1.0.103 type-check /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
3
+ > @milaboratories/milaboratories.pool-explorer.model@1.0.105 type-check /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
4
4
  > ts-builder types --target block-model
5
5
 
6
6
  ↳ tsc --noEmit --project ./tsconfig.json
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @milaboratories/milaboratories.pool-explorer.model
2
2
 
3
+ ## 1.0.105
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [3ef2381]
8
+ - @platforma-sdk/model@1.45.0
9
+
10
+ ## 1.0.104
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [31a1ac2]
15
+ - @platforma-sdk/model@1.44.14
16
+
3
17
  ## 1.0.103
4
18
 
5
19
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -5451,6 +5451,89 @@
5451
5451
  const StagingAccessorName = 'staging';
5452
5452
  const MainAccessorName = 'main';
5453
5453
 
5454
+ function filterDataInfoEntries(dataInfoEntries, axisFilters) {
5455
+ // Sort filters by axis index in descending order to safely remove elements from arrays
5456
+ const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
5457
+ // Check for invalid filter axes
5458
+ const { type } = dataInfoEntries;
5459
+ switch (type) {
5460
+ case 'Json': {
5461
+ const { keyLength } = dataInfoEntries;
5462
+ for (const [axisIdx] of axisFilters)
5463
+ if (axisIdx >= keyLength)
5464
+ throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
5465
+ break;
5466
+ }
5467
+ case 'JsonPartitioned':
5468
+ case 'BinaryPartitioned':
5469
+ case 'ParquetPartitioned': {
5470
+ const { partitionKeyLength } = dataInfoEntries;
5471
+ for (const [axisIdx] of axisFilters)
5472
+ if (axisIdx >= partitionKeyLength)
5473
+ throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);
5474
+ break;
5475
+ }
5476
+ default:
5477
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
5478
+ throw new Error(`Unsupported data info type: ${type}`);
5479
+ }
5480
+ const keyMatchesFilters = (key) => {
5481
+ for (const [axisIdx, axisValue] of sortedFilters)
5482
+ if (key[axisIdx] !== axisValue)
5483
+ return false;
5484
+ return true;
5485
+ };
5486
+ const removeFilteredAxes = (key) => {
5487
+ const newKey = [...key];
5488
+ // Remove axes in descending order to maintain correct indices
5489
+ for (const [axisIdx] of sortedFilters)
5490
+ newKey.splice(axisIdx, 1);
5491
+ return newKey;
5492
+ };
5493
+ switch (dataInfoEntries.type) {
5494
+ case 'Json': return {
5495
+ type: 'Json',
5496
+ keyLength: dataInfoEntries.keyLength - axisFilters.length,
5497
+ data: dataInfoEntries.data
5498
+ .filter((entry) => keyMatchesFilters(entry.key))
5499
+ .map((entry) => ({
5500
+ key: removeFilteredAxes(entry.key),
5501
+ value: entry.value,
5502
+ })),
5503
+ };
5504
+ case 'JsonPartitioned': return {
5505
+ type: 'JsonPartitioned',
5506
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
5507
+ parts: dataInfoEntries.parts
5508
+ .filter((entry) => keyMatchesFilters(entry.key))
5509
+ .map((entry) => ({
5510
+ key: removeFilteredAxes(entry.key),
5511
+ value: entry.value,
5512
+ })),
5513
+ };
5514
+ case 'BinaryPartitioned': return {
5515
+ type: 'BinaryPartitioned',
5516
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
5517
+ parts: dataInfoEntries.parts
5518
+ .filter((entry) => keyMatchesFilters(entry.key))
5519
+ .map((entry) => ({
5520
+ key: removeFilteredAxes(entry.key),
5521
+ value: entry.value,
5522
+ })),
5523
+ };
5524
+ case 'ParquetPartitioned': return {
5525
+ type: 'ParquetPartitioned',
5526
+ partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
5527
+ parts: dataInfoEntries.parts
5528
+ .filter((entry) => keyMatchesFilters(entry.key))
5529
+ .map((entry) => ({
5530
+ key: removeFilteredAxes(entry.key),
5531
+ value: entry.value,
5532
+ })),
5533
+ };
5534
+ }
5535
+ }
5536
+
5454
5537
  const TraceEntry = z.object({
5455
5538
  type: z.string(),
5456
5539
  importance: z.number().optional(),
@@ -5635,10 +5718,12 @@
5635
5718
  break;
5636
5719
  case RT_JSON_PARTITIONED:
5637
5720
  case RT_BINARY_PARTITIONED:
5721
+ case RT_PARQUET_PARTITIONED:
5638
5722
  keyLength = meta['partitionKeyLength'];
5639
5723
  break;
5640
5724
  case RT_BINARY_SUPER_PARTITIONED:
5641
5725
  case RT_JSON_SUPER_PARTITIONED:
5726
+ case RT_PARQUET_SUPER_PARTITIONED:
5642
5727
  keyLength = meta['superPartitionKeyLength'] + meta['partitionKeyLength'];
5643
5728
  break;
5644
5729
  }
@@ -5646,6 +5731,7 @@
5646
5731
  case RT_RESOURCE_MAP:
5647
5732
  case RT_JSON_PARTITIONED:
5648
5733
  case RT_BINARY_PARTITIONED:
5734
+ case RT_PARQUET_PARTITIONED:
5649
5735
  for (let keyStr of acc.listInputFields()) {
5650
5736
  if (rt === RT_BINARY_PARTITIONED) {
5651
5737
  keyStr = removeIndexSuffix(keyStr).baseKey;
@@ -5657,6 +5743,7 @@
5657
5743
  case RT_RESOURCE_MAP_PARTITIONED:
5658
5744
  case RT_BINARY_SUPER_PARTITIONED:
5659
5745
  case RT_JSON_SUPER_PARTITIONED:
5746
+ case RT_PARQUET_SUPER_PARTITIONED:
5660
5747
  for (const supKeyStr of acc.listInputFields()) {
5661
5748
  const keyPrefix = [...JSON.parse(supKeyStr)];
5662
5749
  const value = acc.resolve({ field: supKeyStr, assertFieldType: 'Input' });
@@ -5931,89 +6018,6 @@
5931
6018
  throw new Error(`Unexpected input type: ${typeof acc}`);
5932
6019
  }
5933
6020
 
5934
- function filterDataInfoEntries(dataInfoEntries, axisFilters) {
5935
- // Sort filters by axis index in descending order to safely remove elements from arrays
5936
- const sortedFilters = [...axisFilters].sort((a, b) => b[0] - a[0]);
5937
- // Check for invalid filter axes
5938
- const { type } = dataInfoEntries;
5939
- switch (type) {
5940
- case 'Json': {
5941
- const { keyLength } = dataInfoEntries;
5942
- for (const [axisIdx] of axisFilters)
5943
- if (axisIdx >= keyLength)
5944
- throw new Error(`Can't filter on non-data axis ${axisIdx}. Must be >= ${keyLength}`);
5945
- break;
5946
- }
5947
- case 'JsonPartitioned':
5948
- case 'BinaryPartitioned':
5949
- case 'ParquetPartitioned': {
5950
- const { partitionKeyLength } = dataInfoEntries;
5951
- for (const [axisIdx] of axisFilters)
5952
- if (axisIdx >= partitionKeyLength)
5953
- throw new Error(`Can't filter on non-partitioned axis ${axisIdx}. Must be >= ${partitionKeyLength}`);
5954
- break;
5955
- }
5956
- default:
5957
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
5958
- throw new Error(`Unsupported data info type: ${type}`);
5959
- }
5960
- const keyMatchesFilters = (key) => {
5961
- for (const [axisIdx, axisValue] of sortedFilters)
5962
- if (key[axisIdx] !== axisValue)
5963
- return false;
5964
- return true;
5965
- };
5966
- const removeFilteredAxes = (key) => {
5967
- const newKey = [...key];
5968
- // Remove axes in descending order to maintain correct indices
5969
- for (const [axisIdx] of sortedFilters)
5970
- newKey.splice(axisIdx, 1);
5971
- return newKey;
5972
- };
5973
- switch (dataInfoEntries.type) {
5974
- case 'Json': return {
5975
- type: 'Json',
5976
- keyLength: dataInfoEntries.keyLength - axisFilters.length,
5977
- data: dataInfoEntries.data
5978
- .filter((entry) => keyMatchesFilters(entry.key))
5979
- .map((entry) => ({
5980
- key: removeFilteredAxes(entry.key),
5981
- value: entry.value,
5982
- })),
5983
- };
5984
- case 'JsonPartitioned': return {
5985
- type: 'JsonPartitioned',
5986
- partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
5987
- parts: dataInfoEntries.parts
5988
- .filter((entry) => keyMatchesFilters(entry.key))
5989
- .map((entry) => ({
5990
- key: removeFilteredAxes(entry.key),
5991
- value: entry.value,
5992
- })),
5993
- };
5994
- case 'BinaryPartitioned': return {
5995
- type: 'BinaryPartitioned',
5996
- partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
5997
- parts: dataInfoEntries.parts
5998
- .filter((entry) => keyMatchesFilters(entry.key))
5999
- .map((entry) => ({
6000
- key: removeFilteredAxes(entry.key),
6001
- value: entry.value,
6002
- })),
6003
- };
6004
- case 'ParquetPartitioned': return {
6005
- type: 'ParquetPartitioned',
6006
- partitionKeyLength: dataInfoEntries.partitionKeyLength - axisFilters.length,
6007
- parts: dataInfoEntries.parts
6008
- .filter((entry) => keyMatchesFilters(entry.key))
6009
- .map((entry) => ({
6010
- key: removeFilteredAxes(entry.key),
6011
- value: entry.value,
6012
- })),
6013
- };
6014
- }
6015
- }
6016
-
6017
6021
  function isPColumnValues(value) {
6018
6022
  if (!Array.isArray(value))
6019
6023
  return false;
@@ -6856,7 +6860,7 @@
6856
6860
  }
6857
6861
  }
6858
6862
 
6859
- var version = "1.44.13";
6863
+ var version = "1.45.0";
6860
6864
 
6861
6865
  const PlatformaSDKVersion = version;
6862
6866