This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch show_create_bug
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/show_create_bug by this push:
new e6c89130de5 bishop
e6c89130de5 is described below
commit e6c89130de5ff64c4069fc860b38da3d46ce3593
Author: Caideyipi <[email protected]>
AuthorDate: Fri Apr 10 16:46:56 2026 +0800
bishop
---
.../config/metadata/relational/ShowCreateTableTask.java | 10 ++++++++--
.../config/metadata/relational/ShowCreateViewTask.java | 10 ++++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateTableTask.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateTableTask.java
index 64581425f01..1d0ede7e03d 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateTableTask.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateTableTask.java
@@ -96,7 +96,13 @@ public class ShowCreateTableTask extends AbstractTableTask {
.append("TAG");
break;
case TIME:
- continue;
+ builder
+ .append(getIdentifier(schema.getColumnName()))
+ .append(" ")
+ .append(schema.getDataType())
+ .append(" ")
+ .append("TIME");
+ break;
case FIELD:
builder
.append(getIdentifier(schema.getColumnName()))
@@ -123,7 +129,7 @@ public class ShowCreateTableTask extends AbstractTableTask {
builder.append(",");
}
- if (table.getColumnList().size() > 1) {
+ if (!table.getColumnList().isEmpty()) {
builder.deleteCharAt(builder.length() - 1);
}
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java
index f4a8578c1e7..3c1f8bc73ee 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/metadata/relational/ShowCreateViewTask.java
@@ -99,7 +99,13 @@ public class ShowCreateViewTask extends AbstractTableTask {
.append("TAG");
break;
case TIME:
- continue;
+ builder
+ .append(getIdentifier(schema.getColumnName()))
+ .append(" ")
+ .append(schema.getDataType())
+ .append(" ")
+ .append("TIME");
+ break;
case FIELD:
builder
.append(getIdentifier(schema.getColumnName()))
@@ -122,7 +128,7 @@ public class ShowCreateViewTask extends AbstractTableTask {
builder.append(",");
}
- if (table.getColumnList().size() > 1) {
+ if (!table.getColumnList().isEmpty()) {
builder.deleteCharAt(builder.length() - 1);
}