Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloneFullColumn does not clone the subcolumns at the second and higher levels #9605

Closed
gengliqi opened this issue Nov 12, 2024 · 0 comments · Fixed by #9606
Closed

cloneFullColumn does not clone the subcolumns at the second and higher levels #9605

gengliqi opened this issue Nov 12, 2024 · 0 comments · Fixed by #9606
Labels
affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/major type/bug The issue is confirmed as a bug.

Comments

@gengliqi
Copy link
Contributor

Bug Report

MutablePtr cloneFullColumn() const
{
MutablePtr res = clone();
res->forEachSubcolumn([](Ptr & subcolumn) { subcolumn = subcolumn->clone(); });
return res;
}

cloneFullColumn only clones the first-level subcolumn so the inner column data will be shared if the column has subcolumns at second and higher levels. For instance, ColumnNullable(ColumnArray(ColumnVector))).

@gengliqi gengliqi added type/bug The issue is confirmed as a bug. severity/major affects-8.5 This bug affects the 8.5.x(LTS) versions. labels Nov 12, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in e591694 Nov 13, 2024
ti-chi-bot bot pushed a commit that referenced this issue Nov 13, 2024
…he second and higher levels (#9606) (#9607)

close #9605

Fix the bug that `cloneFullColumn` does not clone the subcolumns at the second and higher levels

Signed-off-by: gengliqi <gengliqiii@gmail.com>

Co-authored-by: gengliqi <gengliqiii@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
1 participant