-
Notifications
You must be signed in to change notification settings - Fork 33
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
All-fields
as an argument of aggregator such as count() can be resolved after other field
#814
Conversation
…r fields Signed-off-by: Lantao Jin <[email protected]>
@@ -662,11 +662,7 @@ public Expression visitCorrelationMapping(FieldsMapping node, CatalystPlanContex | |||
|
|||
@Override | |||
public Expression visitAllFields(AllFields node, CatalystPlanContext context) { | |||
// Case of aggregation step - no start projection can be added | |||
if (context.getNamedParseExpressions().isEmpty()) { |
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.
@YANG-DB could you double confirm this fixing? IMO it's safe to remove the condition. Any case do I miss? Since I don't understand the comment of L665. Another similar case is in method visitEval()
, the same condition could be removed since each eval
command must convert to a project list start with *
.
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 this can be removed...
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.
Thanks! Merging to main.
All-fields
as an argument of aggregator such as count() can be resolved after other fields
All-fields
as an argument of aggregator such as count() can be resolved after other fields
All-fields
as an argument of aggregator such as count() can be resolved after other field
@@ -662,11 +662,7 @@ public Expression visitCorrelationMapping(FieldsMapping node, CatalystPlanContex | |||
|
|||
@Override | |||
public Expression visitAllFields(AllFields node, CatalystPlanContext context) { | |||
// Case of aggregation step - no start projection can be added | |||
if (context.getNamedParseExpressions().isEmpty()) { |
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 this can be removed...
…r fields (opensearch-project#814) Signed-off-by: Lantao Jin <[email protected]>
Description
Count()
, as iscount(*)
in SQL, cannot be resolved correctly when it located after other fields resolution.For example:
Throws
But
works as expected.
Related Issues
Resolves #811
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.