[FIX](Map) fix map compaction error (#17795)

When compaction case, memory map offsets coming to  same olap convertor which is from 0 to 0+size
but it should be continue in different pages when in one segment writer . 
eg : 
last block with map offset : [3, 6, 8, ... 100] 
this block with map offset : [5, 10, 15 ..., 100] 
the same convertor should record last offset to make later coming offset followed last offset.
so after convertor : 
the current offset should [105, 110, 115, ... 200], then column writer just call append_data() to make the right offset data append pages
This commit is contained in:
amory
2023-03-16 13:54:01 +08:00
committed by GitHub
parent 0086fdbbdb
commit ee7226348d
7 changed files with 4255 additions and 9 deletions

View File

@ -612,12 +612,9 @@ public abstract class Type {
return ScalarType.isImplicitlyCastable((ScalarType) t1, (ScalarType) t2, strict);
}
if (t1.isComplexType() || t2.isComplexType()) {
if (t1.isArrayType() && t2.isArrayType()) {
if ((t1.isArrayType() && t2.isArrayType()) || (t1.isMapType() && t2.isMapType())
|| (t1.isStructType() && t2.isStructType())) {
return t1.matchesType(t2);
} else if (t1.isMapType() && t2.isMapType()) {
return true;
} else if (t1.isStructType() && t2.isStructType()) {
return true;
}
return false;
}