|
22 | 22 | import org.elasticsearch.xpack.esql.core.type.DataType; |
23 | 23 | import org.elasticsearch.xpack.esql.expression.function.Example; |
24 | 24 | import org.elasticsearch.xpack.esql.expression.function.FunctionInfo; |
25 | | -import org.elasticsearch.xpack.esql.expression.function.OptionalArgument; |
26 | 25 | import org.elasticsearch.xpack.esql.expression.function.Param; |
27 | 26 | import org.elasticsearch.xpack.esql.expression.function.ThreeOptionalArguments; |
28 | | -import org.elasticsearch.xpack.esql.expression.function.TwoOptionalArguments; |
29 | 27 | import org.elasticsearch.xpack.esql.expression.function.scalar.EsqlScalarFunction; |
30 | 28 | import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput; |
31 | 29 |
|
32 | 30 | import java.io.IOException; |
33 | 31 | import java.util.ArrayList; |
34 | | -import java.util.Arrays; |
35 | 32 | import java.util.List; |
36 | 33 | import java.util.Locale; |
37 | | -import java.util.Objects; |
38 | 34 | import java.util.TimeZone; |
39 | 35 |
|
40 | 36 | import static org.elasticsearch.common.time.DateFormatter.forPattern; |
@@ -73,16 +69,8 @@ public DateParse( |
73 | 69 | type = { "keyword", "text" }, |
74 | 70 | description = "Date expression as a string. If `null` or an empty string, the function returns `null`." |
75 | 71 | ) Expression second, |
76 | | - @Param( |
77 | | - name="dateLocale", |
78 | | - type = { "keyword", "text" }, |
79 | | - description = "The locale to parse with" |
80 | | - ) Expression third, |
81 | | - @Param( |
82 | | - name="dateTimezone", |
83 | | - type = { "keyword", "text" }, |
84 | | - description = "The timezone to parse with" |
85 | | - ) Expression forth |
| 72 | + @Param(name = "dateLocale", type = { "keyword", "text" }, description = "The locale to parse with") Expression third, |
| 73 | + @Param(name = "dateTimezone", type = { "keyword", "text" }, description = "The timezone to parse with") Expression forth |
86 | 74 | ) { |
87 | 75 | super(source, fields(first, second, third, forth)); |
88 | 76 | this.field = second != null ? second : first; |
@@ -218,7 +206,8 @@ public Expression replaceChildren(List<Expression> newChildren) { |
218 | 206 | newChildren.get(0), |
219 | 207 | newChildren.size() > 1 ? newChildren.get(1) : null, |
220 | 208 | newChildren.size() > 2 ? newChildren.get(2) : null, |
221 | | - newChildren.size() > 3 ? newChildren.get(3) : null); |
| 209 | + newChildren.size() > 3 ? newChildren.get(3) : null |
| 210 | + ); |
222 | 211 | } |
223 | 212 |
|
224 | 213 | @Override |
|
0 commit comments