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 46e636b06c7 Changed the error code of create table view in tree
dialect to 701 & Fixed the bug that table device is treated as a device with
template
46e636b06c7 is described below
commit 46e636b06c7da41238cc19f188acbcdd510d1c3a
Author: Caideyipi <[email protected]>
AuthorDate: Thu May 29 15:23:08 2025 +0800
Changed the error code of create table view in tree dialect to 701 & Fixed
the bug that table device is treated as a device with template
---
.../java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java | 3 +--
.../schemaregion/mtree/impl/mem/mnode/info/TableDeviceInfo.java | 2 +-
.../schemaregion/mtree/impl/mem/mnode/info/TreeDeviceInfo.java | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
index 89b548e9c6e..f838dadf283 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java
@@ -4623,8 +4623,7 @@ public class ASTVisitor extends
IoTDBSqlParserBaseVisitor<Statement> {
@Override
public Statement visitCreateTableView(final
IoTDBSqlParser.CreateTableViewContext ctx) {
if (true) {
- throw new UnsupportedOperationException(
- "The 'CreateTableView' is unsupported in tree sql-dialect.");
+ throw new SemanticException("The 'CreateTableView' is unsupported in
tree sql-dialect.");
}
return new CreateTableViewStatement(
new CreateView(
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/mnode/info/TableDeviceInfo.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/mnode/info/TableDeviceInfo.java
index f3271435bc9..1c603c6b38e 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/mnode/info/TableDeviceInfo.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/mnode/info/TableDeviceInfo.java
@@ -87,7 +87,7 @@ public class TableDeviceInfo<N extends IMNode<N>> implements
IDeviceInfo<N> {
@Override
public int getSchemaTemplateIdWithState() {
- return 0;
+ return NON_TEMPLATE;
}
@Override
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/mnode/info/TreeDeviceInfo.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/mnode/info/TreeDeviceInfo.java
index 1fc8269a54b..abfbd11e8a4 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/mnode/info/TreeDeviceInfo.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/mem/mnode/info/TreeDeviceInfo.java
@@ -149,7 +149,7 @@ public class TreeDeviceInfo<N extends IMNode<N>> implements
IDeviceInfo<N> {
@Override
public void deactivateTemplate() {
- schemaTemplateId = -1;
+ schemaTemplateId = NON_TEMPLATE;
setUseTemplate(false);
}