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))).

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