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

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,13 +1,13 @@
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.101 build /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
3
+ > @milaboratories/milaboratories.pool-explorer.model@1.0.103 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 5s
10
+ created dist, dist in 8.2s
11
11
  
12
12
  ./src/index.ts → dist...
13
13
  (!) Circular dependency
@@ -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.101 type-check /home/runner/_work/platforma/platforma/etc/blocks/pool-explorer/model
3
+ > @milaboratories/milaboratories.pool-explorer.model@1.0.103 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,18 @@
1
1
  # @milaboratories/milaboratories.pool-explorer.model
2
2
 
3
+ ## 1.0.103
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [fcdb249]
8
+ - @platforma-sdk/model@1.44.13
9
+
10
+ ## 1.0.102
11
+
12
+ ### Patch Changes
13
+
14
+ - @platforma-sdk/model@1.44.8
15
+
3
16
  ## 1.0.101
4
17
 
5
18
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -5600,9 +5600,11 @@
5600
5600
  const RT_RESOURCE_MAP_PARTITIONED = PCD_PREFIX + 'Partitioned/ResourceMap';
5601
5601
  const RT_JSON_PARTITIONED = PCD_PREFIX + 'JsonPartitioned';
5602
5602
  const RT_BINARY_PARTITIONED = PCD_PREFIX + 'BinaryPartitioned';
5603
+ const RT_PARQUET_PARTITIONED = PCD_PREFIX + 'ParquetPartitioned';
5603
5604
  const PCD_SUP_PREFIX = PCD_PREFIX + 'Partitioned/';
5604
5605
  const RT_JSON_SUPER_PARTITIONED = PCD_SUP_PREFIX + 'JsonPartitioned';
5605
5606
  const RT_BINARY_SUPER_PARTITIONED = PCD_SUP_PREFIX + 'BinaryPartitioned';
5607
+ const RT_PARQUET_SUPER_PARTITIONED = PCD_SUP_PREFIX + 'ParquetPartitioned';
5606
5608
  const removeIndexSuffix = (keyStr) => {
5607
5609
  if (keyStr.endsWith('.index')) {
5608
5610
  return { baseKey: keyStr.substring(0, keyStr.length - 6), type: 'index' };
@@ -5673,7 +5675,7 @@
5673
5675
  return { data, keyLength };
5674
5676
  }
5675
5677
  function getUniquePartitionKeysForDataEntries(list) {
5676
- if (list.type !== 'JsonPartitioned' && list.type !== 'BinaryPartitioned')
5678
+ if (list.type !== 'JsonPartitioned' && list.type !== 'BinaryPartitioned' && list.type !== 'ParquetPartitioned')
5677
5679
  throw new Error(`Splitting requires Partitioned DataInfoEntries, got ${list.type}`);
5678
5680
  const { parts, partitionKeyLength } = list;
5679
5681
  const result = [];
@@ -5732,7 +5734,9 @@
5732
5734
  const meta = acc.getDataAsJson();
5733
5735
  // Prevent recursive super-partitioned resources
5734
5736
  if (keyPrefix.length > 0
5735
- && (resourceType === RT_JSON_SUPER_PARTITIONED || resourceType === RT_BINARY_SUPER_PARTITIONED)) {
5737
+ && (resourceType === RT_JSON_SUPER_PARTITIONED
5738
+ || resourceType === RT_BINARY_SUPER_PARTITIONED
5739
+ || resourceType === RT_PARQUET_SUPER_PARTITIONED)) {
5736
5740
  throw new Error(`Unexpected nested super-partitioned resource: ${resourceType}`);
5737
5741
  }
5738
5742
  switch (resourceType) {
@@ -5800,6 +5804,24 @@
5800
5804
  parts,
5801
5805
  };
5802
5806
  }
5807
+ case RT_PARQUET_PARTITIONED: {
5808
+ if (typeof meta?.partitionKeyLength !== 'number') {
5809
+ throw new Error(`Missing partitionKeyLength in metadata for ${resourceType}`);
5810
+ }
5811
+ const parts = [];
5812
+ for (const keyStr of acc.listInputFields()) {
5813
+ const value = acc.resolve({ field: keyStr, assertFieldType: 'Input' });
5814
+ if (value === undefined)
5815
+ return undefined;
5816
+ const key = [...keyPrefix, ...JSON.parse(keyStr)];
5817
+ parts.push({ key, value });
5818
+ }
5819
+ return {
5820
+ type: 'ParquetPartitioned',
5821
+ partitionKeyLength: meta.partitionKeyLength,
5822
+ parts,
5823
+ };
5824
+ }
5803
5825
  case RT_JSON_SUPER_PARTITIONED: {
5804
5826
  if (typeof meta?.superPartitionKeyLength !== 'number'
5805
5827
  || typeof meta?.partitionKeyLength !== 'number') {
@@ -5858,6 +5880,35 @@
5858
5880
  parts,
5859
5881
  };
5860
5882
  }
5883
+ case RT_PARQUET_SUPER_PARTITIONED: {
5884
+ if (typeof meta?.superPartitionKeyLength !== 'number'
5885
+ || typeof meta?.partitionKeyLength !== 'number') {
5886
+ throw new Error(`Missing superPartitionKeyLength or partitionKeyLength in metadata for ${resourceType}`);
5887
+ }
5888
+ const totalKeyLength = meta.superPartitionKeyLength + meta.partitionKeyLength;
5889
+ const parts = [];
5890
+ // Process all super partitions
5891
+ for (const supKeyStr of acc.listInputFields()) {
5892
+ const superPartition = acc.resolve({ field: supKeyStr, assertFieldType: 'Input' });
5893
+ if (superPartition === undefined)
5894
+ return undefined;
5895
+ // Validate inner type
5896
+ if (superPartition.resourceType.name !== RT_PARQUET_PARTITIONED) {
5897
+ throw new Error(`Expected ${RT_PARQUET_PARTITIONED} inside ${resourceType}, but got ${superPartition.resourceType.name}`);
5898
+ }
5899
+ const innerResult = parsePColumnData(superPartition, JSON.parse(supKeyStr));
5900
+ if (innerResult === undefined)
5901
+ return undefined;
5902
+ if (innerResult.type !== 'ParquetPartitioned')
5903
+ throw new Error(`Unexpected inner result type for ${resourceType}: ${innerResult.type}`);
5904
+ parts.push(...innerResult.parts);
5905
+ }
5906
+ return {
5907
+ type: 'ParquetPartitioned',
5908
+ partitionKeyLength: totalKeyLength,
5909
+ parts,
5910
+ };
5911
+ }
5861
5912
  default:
5862
5913
  throw new Error(`Unknown resource type: ${resourceType}`);
5863
5914
  }
@@ -6805,7 +6856,7 @@
6805
6856
  }
6806
6857
  }
6807
6858
 
6808
- var version = "1.44.5";
6859
+ var version = "1.44.13";
6809
6860
 
6810
6861
  const PlatformaSDKVersion = version;
6811
6862