spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shagun Sodhani <sshagunsodh...@gmail.com>
Subject Re: Exception when using cosh
Date Wed, 21 Oct 2015 17:44:57 GMT
@Reynold submitted the PR: https://github.com/apache/spark/pull/9199

On Wed, Oct 21, 2015 at 11:01 PM, Shagun Sodhani <sshagunsodhani@gmail.com>
wrote:

> Sure! Would do that.
>
> Thanks a lot
>
> On Wed, Oct 21, 2015 at 10:59 PM, Reynold Xin <rxin@databricks.com> wrote:
>
>> I think we made a mistake and forgot to register the function in the
>> registry:
>> https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
>>
>> Do you mind submitting a pull request to fix this? Should be an one line
>> change. I filed a ticket to track this:
>> https://issues.apache.org/jira/browse/SPARK-11233
>>
>>
>>
>>
>> On Wed, Oct 21, 2015 at 2:30 AM, Shagun Sodhani <sshagunsodhani@gmail.com
>> > wrote:
>>
>>> Hi! I was trying out different arithmetic functions in SparkSql. I
>>> noticed a weird thing. While *sinh* and *tanh* functions are working,
>>> using *cosh* results in an error saying:
>>>
>>> *Exception in thread "main" org.apache.spark.sql.AnalysisException:
>>> undefined function cosh;*
>>>
>>> The documentation says *cosh* is implemented since 1.4 and I also find
>>> it weird that since *tanh* and *sinh* are implemented (and working) why
>>> would *cosh* fail. I looked for it on jira but could not find any
>>> related bug. Could someone confirm if this is an actual issue or something
>>> wrong on my part.
>>>
>>> Query I am using: SELECT cosh(`age`) as `data` FROM `table`
>>> Spark Version: 10.4
>>> SparkSql Version: 1.5.1
>>>
>>> I am using the standard example of (name, age) schema (though I am
>>> setting age as Double and not Int as I am trying out maths functions).
>>>
>>> The entire error stack can be found here <http://pastebin.com/Tc7BQkCm>.
>>>
>>> Thanks!
>>>
>>> Shagun
>>>
>>
>>
>

Mime
View raw message