Skip to content

Commit ee62b27

Browse files
author
chengyitian
committed
AJ-792: fix issue about serialize BasicIotAnyVector;
1 parent 9a2a398 commit ee62b27

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/com/xxdb/data/AbstractVector.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ public void write(ExtendedDataOutput out) throws IOException{
9292
if(this instanceof BasicSymbolVector)
9393
flag += 128;
9494
out.writeShort(flag);
95-
out.writeInt(rows());
95+
if (getDataType() == DATA_TYPE.DT_IOTANY)
96+
out.writeInt(((BasicIotAnyVector) this).serializeAnyVectorRows());
97+
else
98+
out.writeInt(rows());
9699
out.writeInt(columns());
97100
if (Entity.DATA_TYPE.valueOf(dataType) == DATA_TYPE.DT_DECIMAL32_ARRAY
98101
|| Entity.DATA_TYPE.valueOf(dataType) == DATA_TYPE.DT_DECIMAL64_ARRAY

src/com/xxdb/data/BasicIotAnyVector.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ public int rows() {
122122
return indexs.rows();
123123
}
124124

125+
protected int serializeAnyVectorRows() {
126+
return subVector.size() + 1;
127+
}
128+
125129
@JsonIgnore
126130
@Override
127131
public int getUnitLength(){

0 commit comments

Comments
 (0)