vranes opened a new pull request, #58660: URL: https://github.com/apache/spark/pull/58660
### What changes were proposed in this pull request? Override `stringArgs` on the `BinBy` logical node and the `BinByExec` physical node so `EXPLAIN` renders their arguments readably: - `BIN WIDTH` and `ALIGN TO` show as a day-time interval and a timestamp instead of raw microseconds. - The attribute lists are labeled: `range`, `distribute`, `scaledDistribute`, `appends`, `zone`. Analyzed plan, before: ``` BinBy 300000000, ts_start#12: timestamp, ts_end#13: timestamp, 1704067200000000, [value#14], [value#20], [bin_start#21, bin_end#22, bin_distribute_ratio#23], UTC ``` After: ``` BinBy range=[ts_start#12, ts_end#13], binWidth=INTERVAL '0 00:05:00' DAY TO SECOND, alignTo=2024-01-01 00:00:00, distribute=[value#14], scaledDistribute=[value#20], appends=[bin_start#21, bin_end#22, bin_distribute_ratio#23], zone=UTC ``` ### Why are the changes needed? The default rendering prints the constructor fields positionally: the bin width and origin as raw microseconds, and the attribute lists without labels. The microsecond values are hard to read, and the `distribute` inputs share names with their `scaledDistribute` outputs, so the unlabeled lists look like duplicates. ### Does this PR introduce _any_ user-facing change? No. Only the `EXPLAIN` text of `BIN BY` plan nodes changes; query behavior and results are unchanged. ### How was this patch tested? Regenerated the `bin-by.sql` analyzer golden and confirmed the output in `SQLQueryTestSuite`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code -- 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]
