You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/04/20 16:03:00 UTC
[jira] [Commented] (DRILL-6345) Add LOG10 function implementation
[ https://issues.apache.org/jira/browse/DRILL-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16445942#comment-16445942 ]
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_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.
> 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)