Skip to content

Commit

Permalink
Enable query rewrites on the coordinator for ESQL (#119667) (#119836)
Browse files Browse the repository at this point in the history
* Enable query rewrites on the coordinator for ESQL

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <[email protected]>
Co-authored-by: Felix Barnsteiner <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2025
1 parent 61e16d4 commit 6ba9972
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.elasticsearch.index.query.Rewriteable;
import org.elasticsearch.search.SearchService;
import org.elasticsearch.transport.TransportService;
import org.elasticsearch.xpack.esql.action.EsqlCapabilities;
import org.elasticsearch.xpack.esql.core.util.Holder;
import org.elasticsearch.xpack.esql.expression.function.fulltext.FullTextFunction;
import org.elasticsearch.xpack.esql.plan.logical.EsRelation;
Expand Down Expand Up @@ -59,12 +58,6 @@ public void resolveQueryBuilders(
ActionListener<Result> listener,
BiConsumer<LogicalPlan, ActionListener<Result>> callback
) {
// TODO: remove once SEMANTIC_TEXT_TYPE is enabled outside of snapshots
if (false == EsqlCapabilities.Cap.SEMANTIC_TEXT_TYPE.isEnabled()) {
callback.accept(plan, listener);
return;
}

if (plan.optimized() == false) {
listener.onFailure(new IllegalStateException("Expected optimized plan before query builder rewrite."));
return;
Expand Down

0 comments on commit 6ba9972

Please sign in to comment.