-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(frontend): show distinct in agg #3198
Conversation
impl fmt::Debug for PlanAggCall { | ||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
let mut builder = f.debug_tuple(&format!("{}", self.agg_kind)); | ||
self.inputs.iter().for_each(|child| { | ||
builder.field(child); | ||
let input_ref = InputRefWithDistinct(child, self.distinct); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the fact that distinct
is a variable independent of inputRef
in PlanAggCall
, we will not have the case that an AggCall has multiple inputRef
s but only some of them are distinct
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we do not foresee any agg call to be distinct only on part of its inputs.
However, when an agg call has multiple inputs (e.g. string_agg
), it does not look well: string_agg(distinct $0, distinct $1)
.
Alternatively we can use string_agg-distinct($0, $1)
, or avoid debug_tuple
and implement our own formatting to get string_agg(distinct $0, $1)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented our own formatting
Codecov Report
@@ Coverage Diff @@
## main #3198 +/- ##
=======================================
Coverage 73.57% 73.57%
=======================================
Files 744 744
Lines 102180 102188 +8
=======================================
+ Hits 75174 75182 +8
Misses 27006 27006
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
What's changed and what's your intention?
As per the title.
Checklist
- [ ] I have written necessary docs and comments- [ ] I have added necessary unit tests and integration tests./risedev check
(or alias,./risedev c
)Refer to a related PR or issue link (optional)
closes #2724