Github user vvysotskyi commented on a diff in the pull request:
https://github.com/apache/drill/pull/1230#discussion_r184106411
--- Diff:
exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewMathFunctions.java
---
@@ -132,4 +148,200 @@ public void testIsNumeric() throws Throwable{
final Object [] expected = new Object[] {1, 1, 1, 0};
runTest(expected, "functions/testIsNumericFunction.json");
}
+
+ @Test
+ public void testLog10WithDouble() throws Throwable {
+ String json = "{" +
+ "\"positive_infinity\" : Infinity," +
+ "\"negative_infinity\" : -Infinity," +
+ "\"nan\" : NaN," +
+ "\"num1\": 0.0," +
+ "\"num2\": 0.1," +
+ "\"num3\": 1.0," +
+ "\"num4\": 1.5," +
+ "\"num5\": -1.5," +
+ "\"num6\": 10.0" +
+ "}";
+ String query = "select " +
+ "log10(positive_infinity) as pos_inf, " +
+ "log10(negative_infinity) as neg_inf, " +
+ "log10(nan) as nan, " +
+ "log10(num1) as num1, " +
+ "log10(num2) as num2, " +
+ "log10(num3) as num3, " +
+ "log10(num4) as num4, " +
+ "log10(num5) as num5, " +
+ "log10(num6) as num6 " +
+ "" +
--- End diff --
Please remove empty string here and in other places.
---