Skip to content

Commit

Permalink
fixcheckstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
kgyrtkirk committed Oct 9, 2023
1 parent 80ee374 commit 8d75371
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
Expand Down Expand Up @@ -1384,7 +1385,7 @@ public void verify(String sql, List<Object[]> results)
public static void displayResults(String name, List<Object[]> results)
{
PrintStream out = System.out;
out.printf("-- %s results --", name);
out.printf(Locale.ENGLISH, "-- %s results --", name);
for (int rowIndex = 0; rowIndex < results.size(); rowIndex++) {
printArray(results.get(rowIndex), out);
if (rowIndex < results.size() - 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import org.apache.druid.segment.join.JoinableFactoryWrapper;
import org.apache.druid.segment.writeout.OnHeapMemorySegmentWriteOutMediumFactory;
import org.apache.druid.sql.calcite.NotYetSupported.Modes;
import static org.apache.druid.sql.calcite.NotYetSupported.Modes.*;
import org.apache.druid.sql.calcite.NotYetSupported.NotYetSupportedProcessor;
import org.apache.druid.sql.calcite.planner.PlannerContext;
import org.apache.druid.sql.calcite.util.SpecificSegmentsQuerySegmentWalker;
Expand Down Expand Up @@ -145,7 +144,7 @@ public void ensureAllDeclared() throws Exception
if (allCases.remove(ann.value() + ".q")) {
continue;
}
fail(String.format("Testcase [%s] references invalid file [%s].", method.getName(), ann.value()));
fail(String.format(Locale.ENGLISH, "Testcase [%s] references invalid file [%s].", method.getName(), ann.value()));
}

for (String string : allCases) {
Expand Down Expand Up @@ -207,7 +206,7 @@ public DrillTestCase(String filename)
}
catch (Exception e) {
throw new RuntimeException(
String.format("Encountered exception while loading testcase [%s]", filename),
String.format(Locale.ENGLISH, "Encountered exception while loading testcase [%s]", filename),
e);
}
}
Expand Down Expand Up @@ -415,7 +414,7 @@ private static List<Object[]> parseResults(RowSignature rs, List<String[]> resul
newVal = val;
break;
case LONG:
newVal = parseLongValue(val);
newVal = parseLongValue(val);
break;
case DOUBLE:
newVal = Numbers.parseDoubleObject(val);
Expand All @@ -438,23 +437,27 @@ private static Object parseLongValue(final String val)
}
try {
return Long.parseLong(val);
} catch (NumberFormatException e) {
}
catch (NumberFormatException e) {
}
try {
double d = Double.parseDouble(val);
return (long) d;
} catch (NumberFormatException e) {
}
catch (NumberFormatException e) {
}
try {
LocalTime v = LocalTime.parse(val);
return v.getMillisOfDay();
} catch (Exception e) {
}
catch (Exception e) {
}
Function<String, DateTime> parser = TimestampParser.createTimestampParser("auto");
try {
DateTime v = parser.apply(val);
return v.getMillis();
} catch (IllegalArgumentException iae) {
}
catch (IllegalArgumentException iae) {
}
throw new RuntimeException("Can't parse input!");
}
Expand Down

0 comments on commit 8d75371

Please sign in to comment.