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

    https://github.com/apache/drill/pull/1230#discussion_r183097515
  
    --- Diff: 
exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestNewMathFunctions.java
 ---
    @@ -116,8 +115,7 @@ public void testTrigoMathFunc() throws Throwable {
       @Test
       public void testExtendedMathFunc() throws Throwable {
         final BigDecimal d = new 
BigDecimal("100111111111111111111111111111111111.00000000000000000000000000000000000000000000000000001");
    -    final Object [] expected = new Object[] {Math.cbrt(1000), 
Math.log(10), (Math.log(64.0)/Math.log(2.0)), Math.exp(10), 
Math.toDegrees(0.5), Math.toRadians(45.0), Math.PI, Math.cbrt(d.doubleValue()), 
Math.log(d.doubleValue()), (Math.log(d.doubleValue())/Math.log(2)), 
Math.exp(d.doubleValue()), Math.toDegrees(d.doubleValue()), 
Math.toRadians(d.doubleValue())};
    -
    +    final Object [] expected = new Object[] {Math.cbrt(1000), 
Math.log(10), Math.log10(5),  (Math.log(64.0)/Math.log(2.0)), Math.exp(10), 
Math.toDegrees(0.5), Math.toRadians(45.0), Math.PI, Math.cbrt(d.doubleValue()), 
Math.log(d.doubleValue()), (Math.log(d.doubleValue())/Math.log(2)), 
Math.exp(d.doubleValue()), Math.toDegrees(d.doubleValue()), 
Math.toRadians(d.doubleValue())};
    --- End diff --
    
    Could you please add unit tests which check log10 with every type specified 
above. I suppose it will be easier to use TestBuilder for this. I realize that 
it is used java method, but anyway it is fine to add checks for some specific 
values: 1, 10 etc.


---

Reply via email to