This is an automated email from the ASF dual-hosted git repository. jiangtian pushed a commit to branch fix_table_blob in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit d5dffbe62a985cabf0f84f13da31cfc96876b53b Author: Tian Jiang <[email protected]> AuthorDate: Fri Jul 26 16:56:38 2024 +0800 fix binary type conversion (cherry picked from commit 77546426e17a9e01ed602f9e8b9fa4496bc24df0) --- .../iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java index d2987144508..500827d1a7c 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertRowStatement.java @@ -45,6 +45,7 @@ import org.apache.tsfile.file.metadata.IDeviceID; import org.apache.tsfile.file.metadata.IDeviceID.Factory; import org.apache.tsfile.file.metadata.enums.CompressionType; import org.apache.tsfile.file.metadata.enums.TSEncoding; +import org.apache.tsfile.utils.Binary; import org.apache.tsfile.utils.Pair; import org.apache.tsfile.utils.ReadWriteIOUtils; import org.apache.tsfile.write.schema.MeasurementSchema; @@ -228,7 +229,8 @@ public class InsertRowStatement extends InsertBaseStatement implements ISchemaVa // parse string value to specific type dataTypes[i] = measurementSchemas[i].getType(); try { - if (values[i] != null) { + // if the type is binary and the value is already binary, do not convert + if (values[i] != null && !(dataTypes[i].isBinary() && values[i] instanceof Binary)) { values[i] = CommonUtils.parseValue(dataTypes[i], values[i].toString(), zoneId); } } catch (Exception e) {
