Skip to content

Commit f76cf79

Browse files
committed
Fix style.
1 parent d2a452c commit f76cf79

File tree

2 files changed

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

2 files changed

+4
-5
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@
3131

3232
import static org.elasticsearch.common.unit.ByteSizeUnit.MB;
3333
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.ParamOrdinal.DEFAULT;
34-
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.ParamOrdinal.FIRST;
35-
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isNumeric;
3634
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isType;
37-
import static org.elasticsearch.xpack.esql.core.expression.TypeResolutions.isWholeNumber;
3835

3936
public class Space extends UnaryScalarFunction {
4037
public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(Expression.class, "Space", Space::new);

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/scalar/string/SpaceTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,16 @@ public static Iterable<Object[]> parameters() {
6969

7070
cases.add(new TestCaseSupplier("Space with number too large", List.of(DataType.INTEGER), () -> {
7171
int max = (int) MB.toBytes(1);
72-
int number = randomIntBetween(max, max+10);
72+
int number = randomIntBetween(max, max + 10);
7373
return new TestCaseSupplier.TestCase(
7474
List.of(new TestCaseSupplier.TypedData(number, DataType.INTEGER, "number")),
7575
"SpaceEvaluator[number=Attribute[channel=0]]",
7676
DataType.KEYWORD,
7777
nullValue()
7878
).withWarning("Line -1:-1: evaluation of [] failed, treating result as null. Only first 20 failures recorded.")
79-
.withWarning("Line -1:-1: java.lang.IllegalArgumentException: Creating strings longer than [" + max + "] bytes is not supported")
79+
.withWarning(
80+
"Line -1:-1: java.lang.IllegalArgumentException: Creating strings longer than [" + max + "] bytes is not supported"
81+
)
8082
.withFoldingException(IllegalArgumentException.class, "Creating strings longer than [" + max + "] bytes is not supported");
8183
}));
8284

0 commit comments

Comments
 (0)