[fix](planner) Fix the bug of can't query the data of new added partition when set partition_prune_algorithm_version = 2 (#9844)

This commit is contained in:
Kikyou1997
2022-06-01 23:44:14 +08:00
committed by GitHub
parent 2082d0a01f
commit fccb7b8055
2 changed files with 7 additions and 1 deletions

View File

@ -76,6 +76,7 @@ public abstract class LiteralExpr extends Expr implements Comparable<LiteralExpr
case HLL:
case STRING:
literalExpr = new StringLiteral(value);
literalExpr.setType(type);
break;
case DATE:
case DATETIME:

View File

@ -38,6 +38,11 @@ import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* ListPartitionPrunerV2
* @since 1.0
*/
@SuppressWarnings("UnstableApiUsage")
public class ListPartitionPrunerV2 extends PartitionPrunerV2Base {
private final Map<UniqueId, Range<PartitionKey>> uidToPartitionRange;
@ -131,7 +136,7 @@ public class ListPartitionPrunerV2 extends PartitionPrunerV2Base {
// Convert the grouped map to a RangeMap.
TreeRangeMap<ColumnBound, List<UniqueId>> candidateRangeMap = TreeRangeMap.create();
grouped.forEach((k, v) -> candidateRangeMap.put(k, v));
grouped.forEach(candidateRangeMap::put);
return finalFilters.filters.stream()
.map(filter -> {