You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This wires up the randomized testing for DateFormat. Prior to this PR, none of the randomized testing was hitting the one parameter version of the function, so I wired that up as well. This required some compromises on the type signatures, see comments in line.less
---------
Co-authored-by: elasticsearchmachine <[email protected]>
Copy file name to clipboardExpand all lines: x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormat.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ public class DateFormat extends EsqlConfigurationFunction implements OptionalArg
55
55
)
56
56
publicDateFormat(
57
57
Sourcesource,
58
-
@Param(optional = true, name = "dateFormat", type = { "keyword", "text" }, description = """
58
+
@Param(optional = true, name = "dateFormat", type = { "keyword", "text", "date" }, description = """
59
59
Date format (optional). If no format is specified, the `yyyy-MM-dd'T'HH:mm:ss.SSSZ` format is used.
60
60
If `null`, the function returns `null`.""") Expressionformat,
61
61
@Param(name = "date", type = { "date" }, description = "Date expression. If `null`, the function returns `null`.") Expressiondate,
Copy file name to clipboardExpand all lines: x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatErrorTests.java
Copy file name to clipboardExpand all lines: x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DateFormatTests.java
0 commit comments