This is an automated email from the ASF dual-hosted git repository. hui pushed a commit to branch lmh/fillCheckDebug in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 80f941f5e5f10c208c7bc0f7986fb5af3e4532b2 Author: Minghui Liu <[email protected]> AuthorDate: Sat Jul 2 10:49:09 2022 +0800 add semantic check --- .../java/org/apache/iotdb/db/mpp/plan/parser/ASTVisitor.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 4418d11349..8b87ae0f0b 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 @@ -973,8 +973,14 @@ public class ASTVisitor extends IoTDBSqlParserBaseVisitor<Statement> { public void parseFillClause(IoTDBSqlParser.FillClauseContext ctx) { FillComponent fillComponent = new FillComponent(); if (ctx.linearClause() != null) { + if (ctx.linearClause().DURATION_LITERAL().size() > 0) { + throw new SemanticException("The specified fill time range is not supported."); + } fillComponent.setFillPolicy(FillPolicy.LINEAR); } else if (ctx.previousClause() != null) { + if (ctx.previousClause().DURATION_LITERAL() != null) { + throw new SemanticException("The specified fill time range is not supported."); + } fillComponent.setFillPolicy(FillPolicy.PREVIOUS); } else if (ctx.specificValueClause() != null) { fillComponent.setFillPolicy(FillPolicy.VALUE); @@ -984,6 +990,10 @@ public class ASTVisitor extends IoTDBSqlParserBaseVisitor<Statement> { } else { throw new SemanticException("fill value cannot be null"); } + } else if (ctx.previousUntilLastClause() != null) { + throw new SemanticException("PREVIOUSUNTILLAST fill is not supported yet."); + } else if (ctx.oldTypeClause() != null) { + throw new SemanticException("The specified fill datatype is not supported."); } queryStatement.setFillComponent(fillComponent); }
