This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch object-name-fix
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/object-name-fix by this push:
new 624d999e52b create-check
624d999e52b is described below
commit 624d999e52b8d3583b0997704a2d9826aaae235f
Author: Caideyipi <[email protected]>
AuthorDate: Mon Jan 5 16:17:48 2026 +0800
create-check
---
.../plan/execution/config/TableConfigTaskVisitor.java | 2 +-
.../metadata/fetcher/TableHeaderSchemaValidator.java | 11 ++++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java
index 0f6c4bdb538..4b609aa87eb 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/TableConfigTaskVisitor.java
@@ -580,7 +580,7 @@ public class TableConfigTaskVisitor extends
AstVisitor<IConfigTask, MPPQueryCont
final TsTableColumnCategory category =
columnDefinition.getColumnCategory();
final String columnName = columnDefinition.getName().getValue();
final TSDataType dataType = getDataType(columnDefinition.getType());
- hasObject |= dataType.equals(TSDataType.OBJECT);
+ hasObject |= dataType == TSDataType.OBJECT;
final String comment = columnDefinition.getComment();
if (checkTimeColumnIdempotent(category, columnName, dataType, comment,
table)
&& !hasTimeColumn) {
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableHeaderSchemaValidator.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableHeaderSchemaValidator.java
index daea9a9e9da..9c90f15d368 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableHeaderSchemaValidator.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableHeaderSchemaValidator.java
@@ -20,6 +20,7 @@
package org.apache.iotdb.db.queryengine.plan.relational.metadata.fetcher;
import org.apache.iotdb.commons.exception.IoTDBException;
+import org.apache.iotdb.commons.exception.MetadataException;
import org.apache.iotdb.commons.schema.table.InsertNodeMeasurementInfo;
import org.apache.iotdb.commons.schema.table.TreeViewSchema;
import org.apache.iotdb.commons.schema.table.TsTable;
@@ -629,6 +630,7 @@ public class TableHeaderSchemaValidator {
return tsTable;
}
+ boolean hasObject = false;
for (int i = 0; i < measurements.length; i++) {
if (measurements[i] == null) {
continue;
@@ -657,9 +659,16 @@ public class TableHeaderSchemaValidator {
throw new ColumnCreationFailException(
"Cannot create column " + columnName + " datatype is not
provided");
}
-
+ hasObject |= dataType == TSDataType.OBJECT;
tsTable.addColumnSchema(generateColumnSchema(category, columnName,
dataType, null, null));
}
+ if (hasObject) {
+ try {
+ tsTable.checkTableNameAndObjectNames4Object();
+ } catch (final MetadataException e) {
+ throw new SemanticException(e.getMessage(), e.getErrorCode());
+ }
+ }
return tsTable;
}