ESQL - Add dense_vector SUM function#142129
Conversation
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
…avg-function' into feature/esql-dense-vector-avg-function
…avg-function' into feature/esql-dense-vector-avg-function
…the AggregateMapper
…avg-function' into feature/esql-dense-vector-avg-function
…ctor-avg-function # Conflicts: # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java # x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/aggregate/SumTests.java
…ctor-avg-function
…avg-function' into feature/esql-dense-vector-avg-function
…avg-function' into feature/esql-dense-vector-avg-function
| } | ||
|
|
||
| @Override | ||
| public void toIntermediate(Block[] blocks, int offset, IntVector selected, DriverContext driverContext) { |
There was a problem hiding this comment.
can potentially use toValuesBlock() or extract out duplicate code.
…ctor-avg-function # Conflicts: # x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java
...src/test/java/org/elasticsearch/xpack/esql/expression/function/MultiRowTestCaseSupplier.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/elasticsearch/xpack/esql/expression/function/MultiRowTestCaseSupplier.java
Outdated
Show resolved
Hide resolved
…ctor-avg-function
ivancea
left a comment
There was a problem hiding this comment.
Thanks for the changes, LGTM! Let's add warnings in a different issue, as it may require some extra iteration
There was a problem hiding this comment.
This is a fix.
This class generates classes. As this code path was never executed in main, this never failed. I took it from #141272
There was a problem hiding this comment.
Same; fix from the other PR
| } | ||
| } | ||
|
|
||
| public void failed(boolean failed) { |
There was a problem hiding this comment.
This is now called from the autogenerated Function class!
For the grouping function, it's within the AbstractFallibleArrayState, so it's automatically handled by the generated code
|
Thank you for all your help on this one @ivancea ! |
Adds dense_vector support for SUM.
This is a first step for getting AVG dense_vector support (as we can implement it as a surrogate using SUM / COUNT) and a validation that aggregation functions are implemented the right way for dense_vectors with this approach.