Skip to content

[BugFix] concat(col) should return cloned column instead of original column to avoid abusing sharing column #57522

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

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

satanson
Copy link
Contributor

@satanson satanson commented Apr 2, 2025

Why I'm doing:

Chunk::check_or_die fails since columns in chunk has different sizes.

F20250401 18:53:38.763079 22825814390336 chunk.cpp:367] Check failed: num_rows() == c->size() (988 vs. 506) F20250401 18:53:38.885509 22825883203136 chunk.cpp:367] Check failed: num_rows() == c->size() (964 vs. 494) F20250401 18:53:38.939654 22825759340096 chunk.cpp:367] Check failed: num_rows() == c->size() (989 vs. 501) F20250401 18:53:39.071995 22825745577536 chunk.cpp:367] Check failed: num_rows() == c->size() (1025 vs. 517)
    @         0x1ef8d39d std::_Function_handler<void (), std::_Bind<void (starrocks::ThreadPool::*(starrocks::ThreadPool*))()> >::_M_invoke(std::_Any_data const&)
    @         0x12595a6e std::function<void ()>::operator()() const
    @         0x1ef59346 starrocks::Thread::supervise_thread(void*)
    @     0x14c355b84ac3 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x94ac2)
    @     0x14c355c16850 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x12684f)
start time: Tue Apr  1 18:53:42 CST 2025, server uptime:  18:53:41 up 139 days,  3:01,  3 users,  load average: 9.24, 4.64, 3.73

The root cause is:

In the plan, project operator output both column dept_nbr and concat(dept_nbr), when concat is applied to only one argument, the column is return directly, so dept_nbr appears twice in output chunk of project operator, accumulator operator is descendant of the project operator, it try to merge small chunks into big one via column::append method, so twice-appearing column is appended twice, its size is large than other columns.

img_v3_02ku_11209bd8-fcff-4c76-be92-3ad0a9c0d95g

img_v3_02ku_8f6259ec-5886-4aed-9703-56348ef88cag

What I'm doing:

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.5
    • 3.4
    • 3.3
    • 3.2
    • 3.1

…column to avoid abusing sharing column

Signed-off-by: satanson <[email protected]>
@LiShuMing LiShuMing enabled auto-merge (squash) April 2, 2025 02:30
satanson added a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (backport #57522)

Signed-off-by: satanson <[email protected]>
satanson added a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (backport #57522)

Signed-off-by: satanson <[email protected]>
kangkaisen pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (backport #57522) (#57523)

Signed-off-by: satanson <[email protected]>
andyziye pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (backport #57522) (#57524)

Signed-off-by: satanson <[email protected]>
@andyziye andyziye disabled auto-merge April 2, 2025 02:48
@andyziye andyziye merged commit 0380dcd into main Apr 2, 2025
57 of 59 checks passed
@andyziye andyziye deleted the stupid_bug_concat_apply_to_only_one_arg branch April 2, 2025 02:48
Copy link

github-actions bot commented Apr 2, 2025

@Mergifyio backport branch-3.1

Copy link

github-actions bot commented Apr 2, 2025

@Mergifyio backport branch-3.5

Copy link

github-actions bot commented Apr 2, 2025

@Mergifyio backport branch-3.3

Copy link

github-actions bot commented Apr 2, 2025

@Mergifyio backport branch-3.4

Copy link

github-actions bot commented Apr 2, 2025

@Mergifyio backport branch-3.2

@github-actions github-actions bot removed the 3.3 label Apr 2, 2025
Copy link
Contributor

mergify bot commented Apr 2, 2025

backport branch-3.1

✅ Backports have been created

Copy link
Contributor

mergify bot commented Apr 2, 2025

backport branch-3.5

✅ Backports have been created

Copy link
Contributor

mergify bot commented Apr 2, 2025

backport branch-3.3

✅ Backports have been created

Copy link
Contributor

mergify bot commented Apr 2, 2025

backport branch-3.4

✅ Backports have been created

Copy link
Contributor

mergify bot commented Apr 2, 2025

backport branch-3.2

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (#57522)

Signed-off-by: satanson <[email protected]>
(cherry picked from commit 0380dcd)
mergify bot pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (#57522)

Signed-off-by: satanson <[email protected]>
(cherry picked from commit 0380dcd)
mergify bot pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (#57522)

Signed-off-by: satanson <[email protected]>
(cherry picked from commit 0380dcd)
mergify bot pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (#57522)

Signed-off-by: satanson <[email protected]>
(cherry picked from commit 0380dcd)
mergify bot pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (#57522)

Signed-off-by: satanson <[email protected]>
(cherry picked from commit 0380dcd)
wanpengfei-git pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (backport #57522) (#57529)

Co-authored-by: satanson <[email protected]>
wanpengfei-git pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (backport #57522) (#57530)

Co-authored-by: satanson <[email protected]>
wanpengfei-git pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (backport #57522) (#57528)

Co-authored-by: satanson <[email protected]>
satanson added a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (#57522)

Signed-off-by: satanson <[email protected]>
(cherry picked from commit 0380dcd)
Signed-off-by: satanson <[email protected]>
andyziye pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (backport #57522) (#57526)

Co-authored-by: satanson <[email protected]>
wanpengfei-git pushed a commit that referenced this pull request Apr 2, 2025
…column to avoid abusing sharing column (backport #57522) (#57527)

Signed-off-by: satanson <[email protected]>
Co-authored-by: satanson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants