This is an automated email from the ASF dual-hosted git repository. jackietien pushed a commit to branch rc/2.0.5 in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 1da4f54f1b354947b2d2029448635153152fd59d Author: Caideyipi <[email protected]> AuthorDate: Fri Jul 25 10:28:04 2025 +0800 Load: Added the missing logic for tsFile conversion disable's cherry-picking (#16024) * Update TreeSchemaAutoCreatorAndVerifier.java * Update LoadTsFileTableSchemaCache.java (cherry picked from commit 5b3cd27d5e2f008bbc9b950571bc32095d9db2b5) --- .../analyze/load/LoadTsFileTableSchemaCache.java | 17 ++++++------ .../load/TreeSchemaAutoCreatorAndVerifier.java | 30 ++++++++++------------ 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTableSchemaCache.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTableSchemaCache.java index 1df3a90ae6f..7ea5154714c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTableSchemaCache.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/LoadTsFileTableSchemaCache.java @@ -25,7 +25,6 @@ import org.apache.iotdb.confignode.rpc.thrift.TDatabaseSchema; import org.apache.iotdb.db.conf.IoTDBConfig; import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.apache.iotdb.db.exception.load.LoadAnalyzeException; -import org.apache.iotdb.db.exception.load.LoadAnalyzeTypeMismatchException; import org.apache.iotdb.db.exception.load.LoadRuntimeOutOfMemoryException; import org.apache.iotdb.db.exception.sql.SemanticException; import org.apache.iotdb.db.queryengine.common.MPPQueryContext; @@ -356,14 +355,14 @@ public class LoadTsFileTableSchemaCache { } } else if (fileColumn.getColumnCategory() == TsTableColumnCategory.FIELD) { ColumnSchema realColumn = fieldColumnNameToSchema.get(fileColumn.getName()); - if (realColumn == null || !fileColumn.getType().equals(realColumn.getType())) { - throw new LoadAnalyzeTypeMismatchException( - String.format( - "Data type mismatch for column %s in table %s, type in TsFile: %s, type in IoTDB: %s", - realColumn.getName(), - realSchema.getTableName(), - fileColumn.getType(), - realColumn.getType())); + if (LOGGER.isDebugEnabled() + && (realColumn == null || !fileColumn.getType().equals(realColumn.getType()))) { + LOGGER.debug( + "Data type mismatch for column {} in table {}, type in TsFile: {}, type in IoTDB: {}", + realColumn.getName(), + realSchema.getTableName(), + fileColumn.getType(), + realColumn.getType()); } } } diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/TreeSchemaAutoCreatorAndVerifier.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/TreeSchemaAutoCreatorAndVerifier.java index dc62a647cad..a15a3013db2 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/TreeSchemaAutoCreatorAndVerifier.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/load/TreeSchemaAutoCreatorAndVerifier.java @@ -439,13 +439,12 @@ public class TreeSchemaAutoCreatorAndVerifier { // check device schema: is aligned or not final boolean isAlignedInTsFile = schemaCache.getDeviceIsAligned(device); final boolean isAlignedInIoTDB = iotdbDeviceSchemaInfo.isAligned(); - if (isAlignedInTsFile != isAlignedInIoTDB) { - throw new LoadAnalyzeException( - String.format( - "Device %s in TsFile is %s, but in IoTDB is %s.", - device, - isAlignedInTsFile ? "aligned" : "not aligned", - isAlignedInIoTDB ? "aligned" : "not aligned")); + if (LOGGER.isDebugEnabled() && isAlignedInTsFile != isAlignedInIoTDB) { + LOGGER.debug( + "Device {} in TsFile is {}, but in IoTDB is {}.", + device, + isAlignedInTsFile ? "aligned" : "not aligned", + isAlignedInIoTDB ? "aligned" : "not aligned"); } // check timeseries schema @@ -463,15 +462,14 @@ public class TreeSchemaAutoCreatorAndVerifier { } // check datatype - if (!tsFileSchema.getType().equals(iotdbSchema.getType())) { - throw new LoadAnalyzeTypeMismatchException( - String.format( - "Measurement %s%s%s datatype not match, TsFile: %s, IoTDB: %s", - device, - TsFileConstant.PATH_SEPARATOR, - iotdbSchema.getMeasurementName(), - tsFileSchema.getType(), - iotdbSchema.getType())); + if (LOGGER.isDebugEnabled() && !tsFileSchema.getType().equals(iotdbSchema.getType())) { + LOGGER.debug( + "Measurement {}{}{} datatype not match, TsFile: {}, IoTDB: {}", + device, + TsFileConstant.PATH_SEPARATOR, + iotdbSchema.getMeasurementName(), + tsFileSchema.getType(), + iotdbSchema.getType()); } // check encoding
