[fix](split_by_string) Fix split by string core on column string#28030
[fix](split_by_string) Fix split by string core on column string#28030yiguolei merged 3 commits intoapache:masterfrom
Conversation
|
run buildall |
|
run buildall |
|
run buildall |
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G' |
| str_pos += delimiter_ref.size; | ||
| const size_t new_size = old_size + split_part_size; | ||
| column_string_chars.resize(new_size); | ||
| if (split_part_size > 0) { |
There was a problem hiding this comment.
what if str_ref.length>16
There was a problem hiding this comment.
I dont know. The snippet is copied from #18496
It seems that there is no guarantee for the memory alignment. I will figure it out.
There was a problem hiding this comment.
I think we are safe here, since ColumnString uses PaddedPODArray as its data type.
using PaddedPODArray = PODArray<T, initial_bytes, TAllocator, 15, 16>; means it will always be safe to read/write 16 bytes after end of StrRef of a ColumnString.
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…ysql result (apache#28069) BE will core dump if result block is invalid when we doing result serialization. An existing bug case is described in apache#28030, so we add check branch to avoid BE core dump due to out of range related problem.
…ysql result (apache#28069) BE will core dump if result block is invalid when we doing result serialization. An existing bug case is described in apache#28030, so we add check branch to avoid BE core dump due to out of range related problem.
wait for another PR to merge to 2.0 branch and then merge this PR.
Applying
split_by_stringon string column, such asselect split_by_string ("abc", string) from tbl, will trigger LOG_FATAL on master and make branch-2.0 core dump on mysql result serde.Since we will have an invalid block like below: