Skip to content

Commit 0d993fa

Browse files
committed
Merge remote-tracking branch 'felixbarny/promql-adjust-source' into promql-adjust-source
2 parents 4f7b49b + eea43dd commit 0d993fa

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/optimizer/LogicalPlanOptimizer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ public LogicalPlanOptimizer(LogicalOptimizerContext optimizerContext) {
117117
public LogicalPlan optimize(LogicalPlan verified) {
118118
var optimized = execute(verified);
119119

120-
// Failures failures = verifier.verify(optimized, verified.output());
121-
// if (failures.hasFailures()) {
122-
// throw new VerificationException(failures);
123-
// }
120+
// Failures failures = verifier.verify(optimized, verified.output());
121+
// if (failures.hasFailures()) {
122+
// throw new VerificationException(failures);
123+
// }
124124
optimized.setOptimized();
125125
return optimized;
126126
}

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/promql/ParsingUtils.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,7 @@ public static Source adjustSource(Source source, int startLine, int startColumn)
241241
* position inside the full ES|QL query.
242242
*/
243243
public static Location adjustLocation(Location location, int startLine, int startColumn) {
244-
return new Location(
245-
adjustLine(location.getLineNumber(), startLine),
246-
adjustColumn(location.getColumnNumber(), startColumn)
247-
);
244+
return new Location(adjustLine(location.getLineNumber(), startLine), adjustColumn(location.getColumnNumber(), startColumn));
248245
}
249246

250247
/**

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/plan/logical/promql/PromqlCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ public int hashCode() {
102102
public boolean equals(Object obj) {
103103
if (super.equals(obj)) {
104104

105-
PromqlCommand other = (PromqlCommand) obj;
106-
return Objects.equals(child(), other.child()) && Objects.equals(promqlPlan, other.promqlPlan);
107-
}
105+
PromqlCommand other = (PromqlCommand) obj;
106+
return Objects.equals(child(), other.child()) && Objects.equals(promqlPlan, other.promqlPlan);
107+
}
108108

109109
return false;
110110
}

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/optimizer/promql/PromqlLogicalPlanOptimizerTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import org.elasticsearch.TransportVersion;
1111
import org.elasticsearch.index.IndexMode;
12-
import org.elasticsearch.transport.Transport;
1312
import org.elasticsearch.xpack.esql.EsqlTestUtils;
1413
import org.elasticsearch.xpack.esql.action.EsqlCapabilities;
1514
import org.elasticsearch.xpack.esql.analysis.Analyzer;
@@ -23,7 +22,6 @@
2322
import org.elasticsearch.xpack.esql.plan.logical.LogicalPlan;
2423
import org.junit.BeforeClass;
2524

26-
import java.util.Collections;
2725
import java.util.Map;
2826

2927
import static java.util.Collections.emptyMap;

0 commit comments

Comments
 (0)