fix: Prevent CLI crash on wide tables#21721
Merged
comphead merged 1 commit intoapache:mainfrom Apr 18, 2026
Merged
Conversation
Contributor
Author
|
@Dandandan, @comphead PR is ready for your review. |
4044689 to
7cbd9a6
Compare
comphead
reviewed
Apr 18, 2026
Contributor
comphead
left a comment
There was a problem hiding this comment.
Thanks @Geethapranay1 I'm checking it on my example
Contributor
|
Okie, the test passes, nice work @Geethapranay1 |
comphead
approved these changes
Apr 18, 2026
Contributor
comphead
left a comment
There was a problem hiding this comment.
Thanks @Geethapranay1 I think the formatting needs to be fixed for CI
Contributor
Author
|
fixing it now |
7cbd9a6 to
c6ac6be
Compare
Keep_only_maxrows panics on wide tables. The format string treats the spaces variable as an index. The new code repeats the space character directly. This prevents the format argument error. Closes apache#21709
c6ac6be to
1402511
Compare
Contributor
Author
|
@comphead fixed the fmt!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
The
keep_only_maxrowsfunction panics on wide tables, format string treats the spaces variable as an index and the new code repeats the space character directly. This prevents the format argument error.What changes are included in this PR?
keep_only_maxrows.print_maxrows_limited_wide_tableunit test.test_cli_wide_result_set_no_crashintegration test.Are these changes tested?
Yes. I added unit and integration tests. The unit test passes a ten column schema to
keep_only_maxrowsand the integration test runs a wide query with a small row limit. These tests verify your format bug fix.Are there any user-facing changes?
No