You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Geethapranay1 (via GitHub)" <gi...@apache.org> on 2026/04/18 17:33:39 UTC

[PR] fix: Prevent CLI crash on wide tables [datafusion]

Geethapranay1 opened a new pull request, #21721:
URL: https://github.com/apache/datafusion/pull/21721

   ## Which issue does this PR close?
    
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   - Closes #21709 
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   The `keep_only_maxrows` function 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?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   - replaces the format string in `keep_only_maxrows`.
   - adds `print_maxrows_limited_wide_table` unit test.
   - adds `test_cli_wide_result_set_no_crash` integration test.
   - adds a wide result set snapshot file.
   
   ## Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   Yes. I added unit and integration tests. The unit test passes a ten column schema to `keep_only_maxrows` and 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
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Prevent CLI crash on wide tables [datafusion]

Posted by "Geethapranay1 (via GitHub)" <gi...@apache.org>.
Geethapranay1 commented on PR #21721:
URL: https://github.com/apache/datafusion/pull/21721#issuecomment-4274231471

   @comphead PR is ready for your review.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Prevent CLI crash on wide tables [datafusion]

Posted by "Geethapranay1 (via GitHub)" <gi...@apache.org>.
Geethapranay1 commented on PR #21721:
URL: https://github.com/apache/datafusion/pull/21721#issuecomment-4274341105

   @comphead fixed the fmt!!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Prevent CLI crash on wide tables [datafusion]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #21721:
URL: https://github.com/apache/datafusion/pull/21721#issuecomment-4274332167

   Okie, the test passes, nice work @Geethapranay1 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Prevent CLI crash on wide tables [datafusion]

Posted by "Geethapranay1 (via GitHub)" <gi...@apache.org>.
Geethapranay1 commented on PR #21721:
URL: https://github.com/apache/datafusion/pull/21721#issuecomment-4274336097

   fixing it now
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Prevent CLI crash on wide tables [datafusion]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead merged PR #21721:
URL: https://github.com/apache/datafusion/pull/21721


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org