[fix](nereids) temp partition is always pruned (#27636)
This commit is contained in:
@ -129,6 +129,16 @@ public class PartitionInfo implements Writable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return both normal partition and temp partition
|
||||
*/
|
||||
public Map<Long, PartitionItem> getAllPartitions() {
|
||||
HashMap all = new HashMap<>();
|
||||
all.putAll(idToTempItem);
|
||||
all.putAll(idToItem);
|
||||
return all;
|
||||
}
|
||||
|
||||
public PartitionItem getItem(long partitionId) {
|
||||
PartitionItem item = idToItem.get(partitionId);
|
||||
if (item == null) {
|
||||
|
||||
@ -103,7 +103,7 @@ public class PartitionPruner extends DefaultExpressionRewriter<Void> {
|
||||
*/
|
||||
public static List<Long> prune(List<Slot> partitionSlots, Expression partitionPredicate,
|
||||
PartitionInfo partitionInfo, CascadesContext cascadesContext, PartitionTableType partitionTableType) {
|
||||
return prune(partitionSlots, partitionPredicate, partitionInfo.getIdToItem(false), cascadesContext,
|
||||
return prune(partitionSlots, partitionPredicate, partitionInfo.getAllPartitions(), cascadesContext,
|
||||
partitionTableType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user