You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2024/07/23 09:22:07 UTC
(iotdb) branch beyyes/fix_logical_and created (now 3c6cf84e1f4)
This is an automated email from the ASF dual-hosted git repository.
caogaofei pushed a change to branch beyyes/fix_logical_and
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 3c6cf84e1f4 fix logical and in PushPredicateIntoTableScan
This branch includes the following new commits:
new 3c6cf84e1f4 fix logical and in PushPredicateIntoTableScan
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(iotdb) 01/01: fix logical and in PushPredicateIntoTableScan
Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
caogaofei pushed a commit to branch beyyes/fix_logical_and
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 3c6cf84e1f4fcb8d68251b6afa15cc83eb4826f6
Author: Beyyes <cg...@foxmail.com>
AuthorDate: Tue Jul 23 17:21:54 2024 +0800
fix logical and in PushPredicateIntoTableScan
---
.../planner/optimizations/PushPredicateIntoTableScan.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java
index 6dfec749d5d..4d4c6152493 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java
@@ -169,7 +169,13 @@ public class PushPredicateIntoTableScan implements PlanOptimizer {
tableScanNode.setTimePredicate(resultPair.left);
}
if (Boolean.TRUE.equals(resultPair.right)) {
- tableScanNode.setPushDownPredicate(pushDownPredicate);
+ if (pushDownPredicate instanceof LogicalExpression
+ && ((LogicalExpression) pushDownPredicate).getTerms().size() == 1) {
+ tableScanNode.setPushDownPredicate(
+ ((LogicalExpression) pushDownPredicate).getTerms().get(0));
+ } else {
+ tableScanNode.setPushDownPredicate(pushDownPredicate);
+ }
}
} else {
tableScanNode.setPushDownPredicate(null);