Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
Signed-off-by: shuming.li <[email protected]>
  • Loading branch information
LiShuMing committed Dec 25, 2024
1 parent 40179c8 commit c0e9586
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,17 +199,19 @@ public String toString() {
return "";
}
StringBuilder sb = new StringBuilder();
sb.append("size=").append(compensations.size());
sb.append("[size=").append(compensations.size()).append("]");
int size = Math.min(Config.max_mv_task_run_meta_message_values_length, compensations.size());
sb.append(" [");
List<String> partitions = Lists.newArrayList();
for (int i = 0; i < size; i++) {
PartitionKey key = compensations.get(i);
List<String> keys = key.getKeys()
.stream()
.map(LiteralExpr::getStringValue)
.collect(Collectors.toList());
sb.append(", (").append(Joiner.on(",").join(keys)).append(")");
partitions.add("(" + Joiner.on(",").join(keys) + ")");
}
sb.append(Joiner.on(",").join(partitions));
sb.append("]");
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public OptExpression visitLogicalTableScan(OptExpression optExpression, Void con
if (compensation.isNoCompensate()) {
return optExpression;
}
if (MvPartitionCompensator.isSupportPartitionPruneCompensate(refBaseTable)) {
if (MvPartitionCompensator.isSupportPartitionCompensate(refBaseTable)) {
LogicalScanOperator newScanOperator = compensation.compensate(optimizerContext, mv, scanOperator);
// reset the partition prune flag to be pruned again.
newScanOperator.resetOpRuleBit(OP_PARTITION_PRUNED);
Expand Down

0 comments on commit c0e9586

Please sign in to comment.