[ 
https://issues.apache.org/jira/browse/DRILL-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16452716#comment-16452716
 ] 

ASF GitHub Bot commented on DRILL-6345:
---------------------------------------

Github user vvysotskyi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1230#discussion_r184107121
  
    --- 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 " +
    +            "" +
    +            "from dfs.`data.json`";
    +    File file = new File(dirTestWatcher.getRootDir(), "data.json");
    +    try {
    +      FileUtils.writeStringToFile(file, json);
    +      test("alter session set `%s` = true", 
ExecConstants.JSON_READ_NUMBERS_AS_DOUBLE);
    --- End diff --
    
    Please consider `setSessionOption`.


> Add LOG10 function implementation
> ---------------------------------
>
>                 Key: DRILL-6345
>                 URL: https://issues.apache.org/jira/browse/DRILL-6345
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Functions - Drill
>            Reporter: Volodymyr Tkach
>            Assignee: Volodymyr Tkach
>            Priority: Major
>             Fix For: 1.14.0
>
>
> Add LOG10 function implementation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to