This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch fix-table
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/fix-table by this push:
new c7012039c3e table-fix
c7012039c3e is described below
commit c7012039c3e10a0b3d514ace63196b70252934af
Author: Caideyipi <[email protected]>
AuthorDate: Tue Apr 7 10:45:51 2026 +0800
table-fix
---
.../java/org/apache/iotdb/relational/it/schema/IoTDBTableIT.java | 8 ++++++++
.../queryengine/plan/execution/config/TableConfigTaskVisitor.java | 4 ++++
2 files changed, 12 insertions(+)
diff --git
a/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBTableIT.java
b/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBTableIT.java
index b335278321c..66635919755 100644
---
a/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBTableIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/relational/it/schema/IoTDBTableIT.java
@@ -108,6 +108,14 @@ public class IoTDBTableIT {
assertFalse(resultSet.next());
}
+ try {
+ statement.execute(
+ "create table test1.table1(region_id STRING TAG, plant_id STRING
TAG, device_id STRING TAG, model STRING ATTRIBUTE, temperature FLOAT FIELD,
humidity DOUBLE FIELD) with (ttl=100, ttl=200, ttl=300)");
+ fail();
+ } catch (final SQLException e) {
+ assertEquals("701: Duplicated property: ttl", e.getMessage());
+ }
+
// or use full qualified table name
// test "TTL=INF"
// "FIELD" can be omitted when type is specified
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 c2f903398e2..9a622a751c3 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
@@ -880,8 +880,12 @@ public class TableConfigTaskVisitor extends
AstVisitor<IConfigTask, MPPQueryCont
private Map<String, String> convertPropertiesToMap(
final List<Property> propertyList, final boolean serializeDefault) {
final Map<String, String> map = new HashMap<>();
+ final Set<String> deduplicate = new HashSet<>();
for (final Property property : propertyList) {
final String key =
property.getName().getValue().toLowerCase(Locale.ENGLISH);
+ if (!deduplicate.add(key)) {
+ throw new SemanticException("Duplicated property: " + key);
+ }
if (TABLE_ALLOWED_PROPERTIES.contains(key)) {
if (!property.isSetToDefault()) {
final Expression value = property.getNonDefaultValue();