This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch rel/1.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.1 by this push:
new c15e779a51 [To rel/1.1][IOTDB-5757] Fix Not Supported Exception when
use like 's3 || false' in where even Type of s3 is Boolean
c15e779a51 is described below
commit c15e779a511765fc2c83abec16b1b9f3316ad593
Author: Weihao Li <[email protected]>
AuthorDate: Fri Apr 7 08:57:47 2023 +0800
[To rel/1.1][IOTDB-5757] Fix Not Supported Exception when use like 's3 ||
false' in where even Type of s3 is Boolean
---
.../src/test/java/org/apache/iotdb/db/it/IoTDBFilterIT.java | 5 +++++
.../org/apache/iotdb/db/mpp/plan/analyze/ExpressionAnalyzer.java | 4 +++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBFilterIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBFilterIT.java
index 258083e1ff..2f8ebb6d02 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBFilterIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBFilterIT.java
@@ -147,6 +147,11 @@ public class IoTDBFilterIT {
"select s1, s2 from root.vehicle.testTimeSeries " + "Where s1 || s2",
expectedHeader,
retArray);
+
+ resultSetEqualTest(
+ "select s1, s2 from root.vehicle.testTimeSeries " + "Where s1 ||
false",
+ expectedHeader,
+ retArray);
}
@Test
diff --git
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ExpressionAnalyzer.java
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ExpressionAnalyzer.java
index 2cbda77f77..915afc8b06 100644
---
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ExpressionAnalyzer.java
+++
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/ExpressionAnalyzer.java
@@ -938,7 +938,9 @@ public class ExpressionAnalyzer {
false);
}
return new Pair<>(null, true);
- } else if
(predicate.getExpressionType().equals(ExpressionType.TIMESERIES)) {
+ } else if (predicate.getExpressionType().equals(ExpressionType.TIMESERIES)
+ || predicate.getExpressionType().equals(ExpressionType.CONSTANT)
+ || predicate.getExpressionType().equals(ExpressionType.NULL)) {
return new Pair<>(null, true);
} else {
throw new IllegalArgumentException(