Conversation
...ain/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregator.java
Outdated
Show resolved
Hide resolved
Could you also check if old issues like #227 can be fixed here? |
# Conflicts: # core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/SumAggregator.java # core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AvgAggregatorTest.java # core/src/test/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/SumAggregatorTest.java
Yes, added new signature to support MIN and MAX with string. Thanks! |
Awesome! Let's resolve old issues if fixed in new engine. Thanks. |
...ain/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/AvgAggregator.java
Outdated
Show resolved
Hide resolved
...ain/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregator.java
Show resolved
Hide resolved
Thanks for your comment! I think only min/max for string is covered additionally in this PR. FYI, in this new query engine, we haven't pushed down the aggregation to Elasticsearch DSL yet. The aggregation is implemented and happening in memory for now. @chloe-zh is it possible to support date too? |
Don't need to that in memory. Here https://discuss.elastic.co/t/min-date-and-max-date/125174 |
Thanks for the info! Yeah, just to clarify, the post-processing in memory capability is to make sure our new engine can handle queries that unable to push down to ES DSL simply. For example, in future, we may support min/max aggregation on result of another subquery. I think it's good to consider date support at this moment because our current aggregate operator is using JDK |
# Conflicts: # core/src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/function/BuiltinFunctionName.java
# Conflicts: # integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/StatsCommandIT.java
Hi @coderReview @dai-chen , this pr supports min/max aggregation date and time types now |
...ain/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregator.java
Outdated
Show resolved
Hide resolved
...ain/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregator.java
Outdated
Show resolved
Hide resolved
...ain/java/com/amazon/opendistroforelasticsearch/sql/expression/aggregation/MinAggregator.java
Outdated
Show resolved
Hide resolved
# Conflicts: # integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/ppl/StatsCommandIT.java # sql/src/main/antlr/OpenDistroSQLParser.g4
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.
LGTM. Could you also add some comparison test from SQL side?
Done, thanks! |
Done, thanks! |
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 for the change.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.