zyp-V commented on code in PR #67161:
URL: https://github.com/apache/doris/pull/67161#discussion_r3870261393
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PruneOlapScanPartition.java:
##########
@@ -132,14 +132,20 @@ private Pair<LogicalRelation, Optional<Expression>>
prunePartition(LogicalOlapSc
if (prunedPartitions == null) {
return Pair.of(null, Optional.empty());
}
+ boolean hasPartitionPredicate =
prunedPartitionsByFilters.hasPartitionPredicate
+ || !scan.getManuallySpecifiedPartitions().isEmpty()
+ || !scan.getManuallySpecifiedTabletIds().isEmpty();
if (prunedPartitions.isEmpty()) {
+ // Keep scan for short-circuit point queries even when no
partition matches.
+ // ShortCircuitQueryContext needs the scan to initialize and cache
the point-query path.
+ if (filter != null && ctx.statementContext.isShortCircuitQuery()) {
Review Comment:
done
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PruneOlapScanPartition.java:
##########
@@ -132,14 +132,20 @@ private Pair<LogicalRelation, Optional<Expression>>
prunePartition(LogicalOlapSc
if (prunedPartitions == null) {
return Pair.of(null, Optional.empty());
}
+ boolean hasPartitionPredicate =
prunedPartitionsByFilters.hasPartitionPredicate
+ || !scan.getManuallySpecifiedPartitions().isEmpty()
+ || !scan.getManuallySpecifiedTabletIds().isEmpty();
if (prunedPartitions.isEmpty()) {
+ // Keep scan for short-circuit point queries even when no
partition matches.
+ // ShortCircuitQueryContext needs the scan to initialize and cache
the point-query path.
+ if (filter != null && ctx.statementContext.isShortCircuitQuery()) {
+ return Pair.of(scan.withSelectedPartitionIds(prunedPartitions,
hasPartitionPredicate),
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]