Skip to content

Commit

Permalink
Fix rehydration and char partitions
Browse files Browse the repository at this point in the history
- Return the partitioned tables columns instead of no columns, so rehydration will succeed
- Fix char type partitions - needed to create the raw filter value better
  • Loading branch information
mofojed committed Jan 5, 2024
1 parent a9e834b commit dd761a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/iris-grid/src/IrisGridPartitionedTableModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ class IrisGridPartitionedTableModel
this.partitionedTable.close();
}

get columns(): readonly Column[] {
return this.partitionedTable.columns;
}

get partitionColumns(): readonly Column[] {
return this.partitionedTable.keyColumns;
}
Expand Down
5 changes: 5 additions & 0 deletions packages/jsapi-utils/src/TableUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1788,6 +1788,11 @@ export class TableUtils {
*/
makeFilterRawValue(columnType: string, rawValue: unknown): FilterValue {
const { dh } = this;
if (TableUtils.isCharType(columnType)) {
return dh.FilterValue.ofString(
typeof rawValue === 'number' ? String.fromCharCode(rawValue) : rawValue
);
}
if (TableUtils.isTextType(columnType)) {
return dh.FilterValue.ofString(rawValue);
}
Expand Down

0 comments on commit dd761a1

Please sign in to comment.