Skip to content

Commit d44915b

Browse files
committed
More renaming from stop to end
1 parent daf1560 commit d44915b

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ public LogicalPlan createStatement(String query) {
4949
return createStatement(query, null, null);
5050
}
5151

52-
public LogicalPlan createStatement(String query, Instant start, Instant stop) {
52+
public LogicalPlan createStatement(String query, Instant start, Instant end) {
5353
if (log.isDebugEnabled()) {
5454
log.debug("Parsing as expression: {}", query);
5555
}
5656

5757
if (start == null) {
5858
start = Instant.now(UTC);
5959
}
60-
return invokeParser(query, start, stop, PromqlBaseParser::singleStatement, PromqlAstBuilder::plan);
60+
return invokeParser(query, start, end, PromqlBaseParser::singleStatement, PromqlAstBuilder::plan);
6161
}
6262

6363
private <T> T invokeParser(
6464
String query,
6565
Instant start,
66-
Instant stop,
66+
Instant end,
6767
Function<PromqlBaseParser, ParserRuleContext> parseFunction,
6868
BiFunction<PromqlAstBuilder, ParserRuleContext, T> visitor
6969
) {
@@ -97,7 +97,7 @@ private <T> T invokeParser(
9797
if (log.isTraceEnabled()) {
9898
log.trace("Parse tree: {}", tree.toStringTree());
9999
}
100-
return visitor.apply(new PromqlAstBuilder(start, stop), tree);
100+
return visitor.apply(new PromqlAstBuilder(start, end), tree);
101101
} catch (StackOverflowError e) {
102102
throw new ParsingException(
103103
"PromQL statement is too large, causing stack overflow when generating the parsing tree: [{}]",

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,20 @@
7474

7575
class ExpressionBuilder extends IdentifierBuilder {
7676

77-
protected final Instant start, stop;
77+
protected final Instant start, end;
7878

7979
ExpressionBuilder() {
8080
this(null, null);
8181
}
8282

83-
ExpressionBuilder(Instant start, Instant stop) {
83+
ExpressionBuilder(Instant start, Instant end) {
8484
Instant now = null;
85-
if (start == null || stop == null) {
85+
if (start == null || end == null) {
8686
now = DateUtils.nowWithMillisResolution().toInstant();
8787
}
8888

8989
this.start = start != null ? start : now;
90-
this.stop = stop != null ? stop : now;
90+
this.end = end != null ? end : now;
9191
}
9292

9393
protected Expression expression(ParseTree ctx) {
@@ -282,7 +282,7 @@ public Evaluation visitEvaluation(EvaluationContext ctx) {
282282
if (atCtx.AT_START() != null) {
283283
at = start;
284284
} else if (atCtx.AT_END() != null) {
285-
at = stop;
285+
at = end;
286286
} else {
287287
TimeValue timeValue = visitTimeValue(atCtx.timeValue());
288288
// the value can have a floating point

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public PromqlAstBuilder() {
2323
this(null, null);
2424
}
2525

26-
public PromqlAstBuilder(Instant start, Instant stop) {
27-
super(start, stop);
26+
public PromqlAstBuilder(Instant start, Instant end) {
27+
super(start, end);
2828
}
2929

3030
public LogicalPlan plan(ParseTree ctx) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public class PromqlLogicalPlanBuilder extends ExpressionBuilder {
5050
this(null, null);
5151
}
5252

53-
PromqlLogicalPlanBuilder(Instant start, Instant stop) {
54-
super(start, stop);
53+
PromqlLogicalPlanBuilder(Instant start, Instant end) {
54+
super(start, end);
5555
}
5656

5757
protected LogicalPlan plan(ParseTree ctx) {

0 commit comments

Comments
 (0)