[ 
https://issues.apache.org/jira/browse/TAJO-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jae Young Lee updated TAJO-386:
-------------------------------

    Attachment: TAJO-386.patch

I've attach patch file for this issue.
But when I tested "testLog()", 
I got following error in "select log(col1,col2), log(col2,col3), log(col3,co1) 
from table1".
Please check this problem.

------ Error Log ---------
java.lang.IllegalStateException: Some targets cannot be evaluated in the query 
block "@ROOT"
        at 
com.google.common.base.Preconditions.checkState(Preconditions.java:176)
        at 
org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:669)
        at 
org.apache.tajo.engine.planner.LogicalPlanner.visitProjection(LogicalPlanner.java:73)
        at 
org.apache.tajo.engine.planner.BaseAlgebraVisitor.visitChild(BaseAlgebraVisitor.java:53)
        at 
org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:106)
        at 
org.apache.tajo.engine.eval.ExprTestBase.getRawTargets(ExprTestBase.java:79)
        at 
org.apache.tajo.engine.eval.ExprTestBase.testEval(ExprTestBase.java:123)
        at 
org.apache.tajo.engine.function.TestMathFunctions.testLog(TestMathFunctions.java:475)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
        at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
        at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
        at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
        at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
        at 
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
        at 
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
        at 
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

> Implement logarithm 
> --------------------
>
>                 Key: TAJO-386
>                 URL: https://issues.apache.org/jira/browse/TAJO-386
>             Project: Tajo
>          Issue Type: Sub-task
>          Components: function/udf
>            Reporter: Jae Young Lee
>            Assignee: Jae Young Lee
>            Priority: Minor
>         Attachments: TAJO-386.patch
>
>
> - Implement 4 logarithm functions below: 
> ln( x ) - Returns the natural logarithm of x
> log([b], x ) - Returns the logarithm of x with base b
> log10( x ) - Returns the logarithm of x with base 10
> log2( x ) - Returns the logarithm of x with base 2



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to