This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch select-into
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/select-into by this push:
new f234ea7 query types check
f234ea7 is described below
commit f234ea775caf0959361e5bc83d5a36d4ea1646de
Author: Steve Yurong Su <[email protected]>
AuthorDate: Thu Jul 22 09:26:41 2021 +0800
query types check
---
.../db/qp/logical/crud/SelectIntoOperator.java | 32 +++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectIntoOperator.java
b/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectIntoOperator.java
index 1303145..2bba539 100644
---
a/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectIntoOperator.java
+++
b/server/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectIntoOperator.java
@@ -56,7 +56,37 @@ public class SelectIntoOperator extends Operator {
public void check() throws LogicalOperatorException {
queryOperator.check();
- // TODO: check query plan type
+ if (queryOperator.isAlignByDevice()) {
+ throw new LogicalOperatorException("select into: align by device clauses
are not supported.");
+ }
+
+ // disable align
+ if (!queryOperator.isAlignByTime()) {
+ throw new LogicalOperatorException("select into: disable align clauses
are not supported.");
+ }
+
+ if (queryOperator instanceof LastQueryOperator) {
+ throw new LogicalOperatorException("select into: last clauses are not
supported.");
+ }
+
+ if (queryOperator instanceof AggregationQueryOperator
+ && (!(queryOperator instanceof GroupByQueryOperator))
+ || !(queryOperator instanceof GroupByFillQueryOperator)) {
+ throw new LogicalOperatorException("select into: aggregation queries are
not supported.");
+ }
+
+ if (queryOperator.getSpecialClauseComponent() != null) {
+ SpecialClauseComponent specialClauseComponent =
queryOperator.getSpecialClauseComponent();
+ if (specialClauseComponent.hasSlimit()) {
+ throw new LogicalOperatorException("select into: slimit clauses are
not supported.");
+ }
+ if (specialClauseComponent.getSeriesOffset() > 0) {
+ throw new LogicalOperatorException("select into: soffset clauses are
not supported.");
+ }
+ if (!specialClauseComponent.isAscending()) {
+ throw new LogicalOperatorException("select into: descending clauses
are not supported.");
+ }
+ }
}
public void setQueryOperator(QueryOperator queryOperator) {