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 2023/06/25 09:50:45 UTC

[iotdb] branch beyyes/improve_query_fe created (now 371f801f7ce)

This is an automated email from the ASF dual-hosted git repository.

caogaofei pushed a change to branch beyyes/improve_query_fe
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 371f801f7ce change conf of sonar-coveralls

This branch includes the following new commits:

     new 6d93bd7ed7e add more semantic restricts when using having clause
     new 371f801f7ce change conf of sonar-coveralls

The 2 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/02: add more semantic restricts when using having clause

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

caogaofei pushed a commit to branch beyyes/improve_query_fe
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 6d93bd7ed7ed5e800279e55f6001187c02493cdc
Author: Beyyes <cg...@foxmail.com>
AuthorDate: Sun Jun 25 17:49:05 2023 +0800

    add more semantic restricts when using having clause
---
 .../iotdb/db/mpp/plan/statement/crud/QueryStatement.java       | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/statement/crud/QueryStatement.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/statement/crud/QueryStatement.java
index 93a9732c776..2cf6154a1c4 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/statement/crud/QueryStatement.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/statement/crud/QueryStatement.java
@@ -549,8 +549,13 @@ public class QueryStatement extends Statement {
           != ResultColumn.ColumnType.AGGREGATION) {
         throw new SemanticException("Expression of HAVING clause must to be an Aggregation");
       }
+      if (!isAggregationQuery()) {
+        throw new SemanticException(
+            "Expression of HAVING clause can not be used in NonAggregationQuery");
+      }
       try {
-        if (isGroupByLevel()) { // check path in SELECT and HAVING only have one node
+        if (isGroupByLevel()) {
+          // check path in SELECT and HAVING only have one node
           for (ResultColumn resultColumn : getSelectComponent().getResultColumns()) {
             ExpressionAnalyzer.checkIsAllMeasurement(resultColumn.getExpression());
           }
@@ -579,6 +584,9 @@ public class QueryStatement extends Statement {
         if (getWhereCondition() != null) {
           ExpressionAnalyzer.checkIsAllMeasurement(getWhereCondition().getPredicate());
         }
+        if (hasHaving()) {
+          ExpressionAnalyzer.checkIsAllMeasurement(getHavingCondition().getPredicate());
+        }
       } catch (SemanticException e) {
         throw new SemanticException("ALIGN BY DEVICE: " + e.getMessage());
       }


[iotdb] 02/02: change conf of sonar-coveralls

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

caogaofei pushed a commit to branch beyyes/improve_query_fe
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 371f801f7ce317f898b156bdbbc6f924e4dcc4c3
Author: Beyyes <cg...@foxmail.com>
AuthorDate: Sun Jun 25 17:50:28 2023 +0800

    change conf of sonar-coveralls
---
 .github/workflows/sonar-coveralls.yml | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/sonar-coveralls.yml b/.github/workflows/sonar-coveralls.yml
index f649f789712..17a2fe2a314 100644
--- a/.github/workflows/sonar-coveralls.yml
+++ b/.github/workflows/sonar-coveralls.yml
@@ -5,21 +5,21 @@ name: Sonar-Coveralls
 
 on:
   push:
-    branches:
-      - master
-      - "rel/*"
-      - "new_*"
-    paths-ignore:
-      - "docs/**"
-      - 'site/**'
-  pull_request:
-    branches:
-      - master
-      - "rel/*"
-      - "new_*"
+#    branches:
+#      - master
+#      - "rel/*"
+#      - "new_*"
     paths-ignore:
       - "docs/**"
       - 'site/**'
+#  pull_request:
+#    branches:
+#      - master
+#      - "rel/*"
+#      - "new_*"
+#    paths-ignore:
+#      - "docs/**"
+#      - 'site/**'
   # allow manually run the action:
   workflow_dispatch: