You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/12/19 01:41:00 UTC

[iotdb] branch master updated: [IOTDB-5212] Remove deprecated syntax in CQ

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

jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new a320b0280a [IOTDB-5212] Remove deprecated syntax in CQ
a320b0280a is described below

commit a320b0280a982d5c5bec2e55f0cd6f3db39fb85c
Author: liuminghui233 <36...@users.noreply.github.com>
AuthorDate: Mon Dec 19 09:40:55 2022 +0800

    [IOTDB-5212] Remove deprecated syntax in CQ
---
 antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4    | 1 -
 .../src/main/java/org/apache/iotdb/db/mpp/plan/parser/ASTVisitor.java | 4 ----
 2 files changed, 5 deletions(-)

diff --git a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4 b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
index 42d0880792..3645cc78e1 100644
--- a/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
+++ b/antlr/src/main/antlr4/org/apache/iotdb/db/qp/sql/IoTDBSqlParser.g4
@@ -164,7 +164,6 @@ createContinuousQuery
 resampleClause
     : RESAMPLE
         (EVERY everyInterval=DURATION_LITERAL)?
-        (FOR DURATION_LITERAL)?
         (BOUNDARY boundaryTime=timeValue)?
         (RANGE startTimeOffset=DURATION_LITERAL (COMMA endTimeOffset=DURATION_LITERAL)?)?
     ;
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/parser/ASTVisitor.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/parser/ASTVisitor.java
index 89a4147ea4..672f741e77 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/parser/ASTVisitor.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/parser/ASTVisitor.java
@@ -858,10 +858,6 @@ public class ASTVisitor extends IoTDBSqlParserBaseVisitor<Statement> {
 
   private void parseResampleClause(
       IoTDBSqlParser.ResampleClauseContext ctx, CreateContinuousQueryStatement statement) {
-    if (ctx.FOR() != null) {
-      throw new SemanticException("CQ: The syntax of CREATE CQ statement has changed from v0.14");
-    }
-
     if (ctx.EVERY() != null) {
       statement.setEveryInterval(
           DateTimeUtils.convertDurationStrToLong(ctx.everyInterval.getText()));