-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ESQL: mv_expand pushes down a limit copy and keeps the limit after it…
… untouched (#100782) (#101268) - allow mv_expand to push down limit and project past it - accept a limit after mv_expand when there is also a second limit before the mv_expand - adds a default TopN for cases when there is only a sort at Lucene level - adds OrderBy node type to the exceptions for duplicating the limit after mv_expand (cherry picked from commit 4679b09)
- Loading branch information
Showing
14 changed files
with
756 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pr: 100782 | ||
summary: "ESQL: `mv_expand` pushes down limit and project and keep the limit after\ | ||
\ it untouched" | ||
area: ES|QL | ||
type: bug | ||
issues: | ||
- 99971 | ||
- 100774 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...in/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/LogicalOptimizerContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
package org.elasticsearch.xpack.esql.optimizer; | ||
|
||
import org.elasticsearch.xpack.esql.session.EsqlConfiguration; | ||
|
||
import java.util.Objects; | ||
|
||
public class LogicalOptimizerContext { | ||
private final EsqlConfiguration configuration; | ||
|
||
public LogicalOptimizerContext(EsqlConfiguration configuration) { | ||
this.configuration = configuration; | ||
} | ||
|
||
public EsqlConfiguration configuration() { | ||
return configuration; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (obj == this) return true; | ||
if (obj == null || obj.getClass() != this.getClass()) return false; | ||
var that = (LogicalOptimizerContext) obj; | ||
return Objects.equals(this.configuration, that.configuration); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(configuration); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "LogicalOptimizerContext[" + "configuration=" + configuration + ']'; | ||
} | ||
|
||
} |
Oops, something went wrong.