- Notifications
You must be signed in to change notification settings - Fork 25.5k
Remove unnecessary calls to fold() #131870
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
Remove unnecessary calls to fold() #131870
Conversation
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.
Made a first pass and saw about half the PR - I think this is generally doing the right thing! Thanks @julian-elastic !
.../main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/AggregateFunction.java Show resolved Hide resolved
...sql/src/main/java/org/elasticsearch/xpack/esql/expression/function/aggregate/Percentile.java Outdated Show resolved Hide resolved
...esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/ip/CIDRMatch.java Outdated Show resolved Hide resolved
...src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSort.java Outdated Show resolved Hide resolved
...src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSort.java Outdated Show resolved Hide resolved
...src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSort.java Show resolved Hide resolved
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Hi @julian-elastic, I've created a changelog YAML for you. |
...lugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/FunctionUtils.java Outdated Show resolved Hide resolved
...lugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/FunctionUtils.java Show resolved Hide resolved
LGTM, though maybe @alex-spies is better to really approve it |
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 @julian-elastic , this is great!
I mostly have minor comments except for one about the InsensitiveEqualsMapper, which I'd like to look into before merging. Except for that, my comments are minor and this LGTM!
...src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSort.java Show resolved Hide resolved
...src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/multivalue/MvSort.java Outdated Show resolved Hide resolved
...ck/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/Foldables.java Show resolved Hide resolved
...ck/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/Foldables.java Outdated Show resolved Hide resolved
.../elasticsearch/xpack/esql/expression/predicate/operator/comparison/EsqlBinaryComparison.java Outdated Show resolved Hide resolved
...gin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java Show resolved Hide resolved
...gin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java Show resolved Hide resolved
...gin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java Outdated Show resolved Hide resolved
...gin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java Outdated Show resolved Hide resolved
...gin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizerTests.java Outdated Show resolved Hide resolved
dd2a700
to c063010
Compare …-stats * upstream/main: (36 commits) ESQL: Fix async operator warnings not always sent when blocking (elastic#132744) Method not needed anymore (elastic#132912) [Test] Excercise shutdown more reliably in snapshot stress IT (elastic#132909) Update Gradle shadow plugin to 9.0.1 (elastic#132637) Mute org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT test {p0=search/410_named_queries/named_queries_with_score} elastic#132906 Update docker.elastic.co/wolfi/chainguard-base-fips:latest Docker digest to fa6cb69 (elastic#132735) Remove unnecessary calls to fold() (elastic#131870) Use consistent terminology for transport version resources/references (elastic#132882) Mute org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT test {p0=search.vectors/40_knn_search_cosine/kNN search only regular query} elastic#132890 Finalize release notes for v9.1.2 release (elastic#132745) Finalize release notes for v9.0.5 release (elastic#132718) Move inner records out of TransportVersionUtils (elastic#132872) Add support for Lookup Join on Multiple Fields (elastic#131559) Bootstrap PR-based benchmarks (elastic#132717) Refactor MetadataIndexTemplateService to use template maps instead of project metadata (elastic#132662) [Gradle] Update nebula ospackage plugin to 12.1.0 (elastic#132640) Mute org.elasticsearch.xpack.esql.CsvTests test {csv-spec:ip.CdirMatchEqualsInsOrs} elastic#132860 Mute org.elasticsearch.xpack.esql.CsvTests test {csv-spec:floats.InMultivalue} elastic#132859 Revert "Reuse prod code and reduce EsqlSession public surface" (elastic#132843) Mute org.elasticsearch.xpack.esql.CsvTests test {csv-spec:string.LengthOfText} elastic#132857 ...
* upstream/main: (278 commits) ESQL - dense vector support cosine normalization (elastic#132721) [ML] Add support for dimensions in google vertex ai request (elastic#132689) ESQL - Add byte element support for dense_vector data type (elastic#131863) ESQL: Fix async operator warnings not always sent when blocking (elastic#132744) Method not needed anymore (elastic#132912) [Test] Excercise shutdown more reliably in snapshot stress IT (elastic#132909) Update Gradle shadow plugin to 9.0.1 (elastic#132637) Mute org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT test {p0=search/410_named_queries/named_queries_with_score} elastic#132906 Update docker.elastic.co/wolfi/chainguard-base-fips:latest Docker digest to fa6cb69 (elastic#132735) Remove unnecessary calls to fold() (elastic#131870) Use consistent terminology for transport version resources/references (elastic#132882) Mute org.elasticsearch.test.rest.yaml.CcsCommonYamlTestSuiteIT test {p0=search.vectors/40_knn_search_cosine/kNN search only regular query} elastic#132890 Finalize release notes for v9.1.2 release (elastic#132745) Finalize release notes for v9.0.5 release (elastic#132718) Move inner records out of TransportVersionUtils (elastic#132872) Add support for Lookup Join on Multiple Fields (elastic#131559) Bootstrap PR-based benchmarks (elastic#132717) Refactor MetadataIndexTemplateService to use template maps instead of project metadata (elastic#132662) [Gradle] Update nebula ospackage plugin to 12.1.0 (elastic#132640) Mute org.elasticsearch.xpack.esql.CsvTests test {csv-spec:ip.CdirMatchEqualsInsOrs} elastic#132860 ...
This PR removes additional calls to Fold from various function code. With this change all of the functions are handled except DateTrunc.
This is part 2 of 3 to remove folding. There are additional places marked with /* TODO remove me */ in the Analyzer and LogicalPlanBuilder and will be handled in a separate PR.