We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6103ba commit fd057bfCopy full SHA for fd057bf
x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/parser/ExpressionBuilder.java
@@ -643,7 +643,11 @@ public String visitFunctionName(EsqlBaseParser.FunctionNameContext ctx) {
643
}
644
645
private String functionName(EsqlBaseParser.FunctionNameContext ctx) {
646
- TerminalNode first = ctx.LAST();
+ /*
647
+ * FIRST and LAST are valid function names AND tokens used in `NULLS LAST`.
648
+ * So we have to have special handling for them here.
649
+ */
650
+ TerminalNode first = ctx.FIRST();
651
if (first != null) {
652
return first.getText();
653
0 commit comments