You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve display of operators in Explain output #347
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently the plan shows the operators using the name instead of symbol. A readability improvement would be to use the operators symbols instead.
Old
Filter: #SUM(c) Gt Int64(10) And #b Gt Int64(10) And #SUM(c) Lt Int64(20)
New
Filter: #SUM(c) > Int64(10) AND #b > Int64(10) AND #SUM(c) < Int64(20)
Describe the solution you'd like
Change the Debug implementation to use Display for the operator + fix the tests (74 tests need to be updated).
IMO in general we should avoid relying on {:?} for printing things to end users. {:?} with #[derive(Debug)] is very useful to developers; usually users want less information.
I can give this a shot. To confirm - is the BinaryExpr the only variant of Expr that needs Display implemented?
Thanks @matthewmturner ! I think the intent is to have Display implemented for all variants of Expr (eventually) but it doesn't have to be all in one PR. I'll leave a comment on #971
Activity
[-]Improve display of operators in Explain[/-][+]Improve display of operators in Explain putput[/+][-]Improve display of operators in Explain putput[/-][+]Improve display of operators in Explain output[/+]alamb commentedon May 16, 2021
I think this is a great idea. Thank you
jorgecarleitao commentedon May 16, 2021
IMO in general we should avoid relying on
{:?}for printing things to end users.{:?}with#[derive(Debug)]is very useful to developers; usually users want less information.alamb commentedon May 16, 2021
I agree @jorgecarleitao
Dandandan commentedon May 16, 2021
Exactly 👍
IMO explain output also should be close or equal to SQL syntax, e.g. for the used expressions.
alamb commentedon May 19, 2021
FWIW this likely requires implementing
DisplayforExprmatthewmturner commentedon Sep 6, 2021
I can give this a shot. To confirm - is the
BinaryExprthe only variant ofExprthat needsDisplayimplemented?alamb commentedon Sep 9, 2021
Thanks @matthewmturner ! I think the intent is to have
Displayimplemented for all variants of Expr (eventually) but it doesn't have to be all in one PR. I'll leave a comment on #971alamb commentedon Sep 9, 2021
(ps sorry for the belated reviews, but I am just catching up from being on vacation)
Add more content to the user guide (apache#347)