This is an automated email from the ASF dual-hosted git repository.
zyk 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 2f223b054d0 Forbid GROUP BY TAG query on views (#10239)
2f223b054d0 is described below
commit 2f223b054d0d844f60af04f73cb94a27a084deea
Author: Marcos_Zyk <[email protected]>
AuthorDate: Tue Jun 20 20:42:49 2023 +0800
Forbid GROUP BY TAG query on views (#10239)
---
.../org/apache/iotdb/db/mpp/plan/analyze/AnalyzeVisitor.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/AnalyzeVisitor.java
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/AnalyzeVisitor.java
index 1077f471912..d0212d5985f 100644
---
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/AnalyzeVisitor.java
+++
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/analyze/AnalyzeVisitor.java
@@ -269,8 +269,13 @@ public class AnalyzeVisitor extends
StatementVisitor<Analysis, MPPQueryContext>
// make sure paths in logical view is fetched
updateSchemaTreeByViews(analysis, schemaTree);
- if (analysis.useLogicalView() && queryStatement.isAlignByDevice()) {
- throw new SemanticException("Views cannot be used in ALIGN BY DEVICE
query yet.");
+ if (analysis.useLogicalView()) {
+ if (queryStatement.isAlignByDevice()) {
+ throw new SemanticException("Views cannot be used in ALIGN BY
DEVICE query yet.");
+ }
+ if (queryStatement.isGroupByTag()) {
+ throw new SemanticException("Views cannot be used in GROUP BY TAGS
query yet.");
+ }
}
} finally {
logger.debug("[EndFetchSchema]");