Skip to content

Commit 3b07fc7

Browse files
committed
Improve formatting
1 parent 1c45991 commit 3b07fc7

File tree

1 file changed

+5
-10
lines changed
  • x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/date

1 file changed

+5
-10
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/date/DayName.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@
3636

3737
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.ParamOrdinal.FIRST;
3838

39-
4039
public 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

Comments
 (0)