Geethapranay1 commented on issue #21709:
URL: https://github.com/apache/datafusion/issues/21709#issuecomment-4273307767

   Hi @comphead , I looked into this.
   
   The panic comes from `keep_only_maxrows `in `print_format.rs` (100). The 
format string uses `{:<spaces$}` which rust treats as a positional argument 
index. When the table is wide (many columns), the spaces value exceeds the 
number of format arguments and panics.
   
   The fix replaces the format string with` " ".repeat(spaces)`. This works for 
any table width.
   
   Data collection in exec.rs already stops storing batches at the maxrows 
limit (default 40). The crash is in the formatting step, not eager consumption.
   
   I have a fix with a unit test and a CLI integration test. Ready to open a 
PR. Let me know if you want anything else addressed here.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to