diff --git a/java/tsfile/src/main/java/org/apache/tsfile/read/common/block/column/TsBlockSerde.java b/java/tsfile/src/main/java/org/apache/tsfile/read/common/block/column/TsBlockSerde.java index 818ac3c2c..c8d4b0354 100644 --- a/java/tsfile/src/main/java/org/apache/tsfile/read/common/block/column/TsBlockSerde.java +++ b/java/tsfile/src/main/java/org/apache/tsfile/read/common/block/column/TsBlockSerde.java @@ -103,7 +103,10 @@ public ByteBuffer serialize(TsBlock tsBlock) throws IOException { // Value column data types. for (int i = 0; i < tsBlock.getValueColumnCount(); i++) { - if (tsBlock.getColumn(i).getDataType() == TSDataType.DATE) { + // To be compatible with the Python client, because it does not support data type values other + // than 0-5, the value of DATE is 9. + if ((tsBlock.getColumn(i) instanceof IntColumn) + && tsBlock.getColumn(i).getDataType() == TSDataType.DATE) { ((IntColumn) tsBlock.getColumn(i)).modifyDataType(TSDataType.INT32); } tsBlock.getColumn(i).getDataType().serializeTo(dataOutputStream);