3636
3737import static org .elasticsearch .xpack .esql .core .expression .TypeResolutions .ParamOrdinal .FIRST ;
3838
39-
4039public class DayName extends EsqlConfigurationFunction {
4140 public static final NamedWriteableRegistry .Entry ENTRY = new NamedWriteableRegistry .Entry (Expression .class , "DayName" , DayName ::new );
4241
4342 private final Expression field ;
4443
45- @ FunctionInfo (returnType = "keyword" , description = "Returns the name of the weekday for date based on the configured Locale." ,
46- examples = @ Example (file = "date" , tag = "docsDayName" )
44+ @ FunctionInfo (
45+ returnType = "keyword" ,
46+ description = "Returns the name of the weekday for date based on the configured Locale." ,
47+ examples = @ Example (file = "date" , tag = "docsDayName" )
4748 )
4849 public DayName (
4950 Source source ,
@@ -59,11 +60,7 @@ public DayName(
5960 }
6061
6162 private DayName (StreamInput in ) throws IOException {
62- this (
63- Source .readFrom ((PlanStreamInput ) in ),
64- in .readNamedWriteable (Expression .class ),
65- ((PlanStreamInput ) in ).configuration ()
66- );
63+ this (Source .readFrom ((PlanStreamInput ) in ), in .readNamedWriteable (Expression .class ), ((PlanStreamInput ) in ).configuration ());
6764 }
6865
6966 @ Override
@@ -86,14 +83,12 @@ public DataType dataType() {
8683 return DataType .KEYWORD ;
8784 }
8885
89-
9086 @ Override
9187 protected TypeResolution resolveType () {
9288 if (childrenResolved () == false ) {
9389 return new TypeResolution ("Unresolved children" );
9490 }
9591
96-
9792 String operationName = sourceText ();
9893 TypeResolution resolution = TypeResolutions .isType (field , DataType ::isDate , operationName , FIRST , "datetime or date_nanos" );
9994 if (resolution .unresolved ()) {
0 commit comments