Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit 2e1dbff

Browse files
committed
Bug fix, using Local.Root when format the string in DateTimeFunctionIT (#794)
1 parent 275fddb commit 2e1dbff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

integ-test/src/test/java/com/amazon/opendistroforelasticsearch/sql/sql/DateTimeFunctionIT.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import static com.amazon.opendistroforelasticsearch.sql.util.MatcherUtils.verifySchema;
2323
import static com.amazon.opendistroforelasticsearch.sql.util.TestUtils.getResponseBody;
2424

25+
import com.amazon.opendistroforelasticsearch.sql.common.utils.StringUtils;
2526
import com.amazon.opendistroforelasticsearch.sql.legacy.SQLIntegTestCase;
2627
import com.amazon.opendistroforelasticsearch.sql.util.TestUtils;
2728
import java.io.IOException;
@@ -354,9 +355,10 @@ public void testYear() throws IOException {
354355
}
355356

356357
private void week(String date, int mode, int expectedResult) throws IOException {
357-
JSONObject result = executeQuery(String.format("select week(date('%s'), %d)", date, mode));
358+
JSONObject result = executeQuery(StringUtils.format("select week(date('%s'), %d)", date,
359+
mode));
358360
verifySchema(result,
359-
schema(String.format("week(date('%s'), %d)", date, mode), null, "integer"));
361+
schema(StringUtils.format("week(date('%s'), %d)", date, mode), null, "integer"));
360362
verifyDataRows(result, rows(expectedResult));
361363
}
362364

0 commit comments

Comments
 (0)