From 4f280a5f66e0a41bd4c4ffff9277822c06654e21 Mon Sep 17 00:00:00 2001 From: Chen YZ Date: Fri, 24 May 2024 21:15:17 +0800 Subject: [PATCH] fix it --- .../plan/node/write/InsertRowNode.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowNode.java index 943c13f8dbc2..d961f0d869c6 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowNode.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowNode.java @@ -326,9 +326,11 @@ private void putDataTypesAndValues(ByteBuffer buffer) { ReadWriteIOUtils.write((Boolean) values[i], buffer); break; case INT32: + case DATE: ReadWriteIOUtils.write((Integer) values[i], buffer); break; case INT64: + case TIMESTAMP: ReadWriteIOUtils.write((Long) values[i], buffer); break; case FLOAT: @@ -338,6 +340,8 @@ private void putDataTypesAndValues(ByteBuffer buffer) { ReadWriteIOUtils.write((Double) values[i], buffer); break; case TEXT: + case STRING: + case BLOB: ReadWriteIOUtils.write((Binary) values[i], buffer); break; default: @@ -377,9 +381,11 @@ private void putDataTypesAndValues(DataOutputStream stream) throws IOException { ReadWriteIOUtils.write((Boolean) values[i], stream); break; case INT32: + case DATE: ReadWriteIOUtils.write((Integer) values[i], stream); break; case INT64: + case TIMESTAMP: ReadWriteIOUtils.write((Long) values[i], stream); break; case FLOAT: @@ -389,6 +395,8 @@ private void putDataTypesAndValues(DataOutputStream stream) throws IOException { ReadWriteIOUtils.write((Double) values[i], stream); break; case TEXT: + case STRING: + case BLOB: ReadWriteIOUtils.write((Binary) values[i], stream); break; default: @@ -462,9 +470,11 @@ private void fillDataTypesAndValues(ByteBuffer buffer) { values[i] = ReadWriteIOUtils.readBool(buffer); break; case INT32: + case DATE: values[i] = ReadWriteIOUtils.readInt(buffer); break; case INT64: + case TIMESTAMP: values[i] = ReadWriteIOUtils.readLong(buffer); break; case FLOAT: @@ -474,6 +484,8 @@ private void fillDataTypesAndValues(ByteBuffer buffer) { values[i] = ReadWriteIOUtils.readDouble(buffer); break; case TEXT: + case STRING: + case BLOB: values[i] = ReadWriteIOUtils.readBinary(buffer); break; default: @@ -524,9 +536,11 @@ private int serializeMeasurementsAndValuesSize() { size += Byte.BYTES; break; case INT32: + case DATE: size += Integer.BYTES; break; case INT64: + case TIMESTAMP: size += Long.BYTES; break; case FLOAT: @@ -536,6 +550,8 @@ private int serializeMeasurementsAndValuesSize() { size += Double.BYTES; break; case TEXT: + case STRING: + case BLOB: size += ReadWriteIOUtils.sizeToWrite((Binary) values[i]); break; default: @@ -682,9 +698,11 @@ public void fillDataTypesAndValuesFromWAL(DataInputStream stream) throws IOExcep values[i] = ReadWriteIOUtils.readBool(stream); break; case INT32: + case DATE: values[i] = ReadWriteIOUtils.readInt(stream); break; case INT64: + case TIMESTAMP: values[i] = ReadWriteIOUtils.readLong(stream); break; case FLOAT: @@ -694,6 +712,8 @@ public void fillDataTypesAndValuesFromWAL(DataInputStream stream) throws IOExcep values[i] = ReadWriteIOUtils.readDouble(stream); break; case TEXT: + case STRING: + case BLOB: values[i] = ReadWriteIOUtils.readBinary(stream); break; default: @@ -762,9 +782,11 @@ public void fillDataTypesAndValuesFromWAL(ByteBuffer buffer) { values[i] = ReadWriteIOUtils.readBool(buffer); break; case INT32: + case DATE: values[i] = ReadWriteIOUtils.readInt(buffer); break; case INT64: + case TIMESTAMP: values[i] = ReadWriteIOUtils.readLong(buffer); break; case FLOAT: @@ -774,6 +796,8 @@ public void fillDataTypesAndValuesFromWAL(ByteBuffer buffer) { values[i] = ReadWriteIOUtils.readDouble(buffer); break; case TEXT: + case STRING: + case BLOB: values[i] = ReadWriteIOUtils.readBinary(buffer); break; default: