spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SunYonggang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-18780) "org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Binding attribute, tree fromunixtime(cast(…))"
Date Thu, 08 Dec 2016 09:16:58 GMT

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

SunYonggang commented on SPARK-18780:
-------------------------------------

But if you use first_value(), it can avoid this error: "select a, first_value(b), substring(starttime,
1, 13) as minute from table_name group by a, substring(starttime, 1, 13) having length(a)
= 32". it can be solved.🚴

> "org.apache.spark.sql.catalyst.errors.package$TreeNodeException: Binding attribute, tree
fromunixtime(cast(…))"
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-18780
>                 URL: https://issues.apache.org/jira/browse/SPARK-18780
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Shell, SQL
>    Affects Versions: 1.6.0
>         Environment: hdp 2.4.0.0-169 with 10 servers in CentOS 6.5;
> spark 1.6.0   hive 1.2.1    hadoop 2.7.1
>            Reporter: SunYonggang
>            Priority: Minor
>
> In Spark-Shell, I want to generate RDD from hivecontext.sql(hql_content), the syntax
is fine, when i use actions like "first, collect", it occurs error like this "org.apache.spark.sql.catalyst.errors.package$TreeNodeException:
Binding
> attribute, tree fromunixtime(cast(…))" .
> I searched in jira, and didn't find my solution. Is this a bug in Spark 1.6.0?
> sql like below: "select a, collect_set(b)[0], (from_unixtime(cast(round(unix_timestamp(c,
‘yyyyMMddHHmmSS’) / 60) * 60 as bigint))) as minute from table_name group by a, (from_unixtime(cast(round(unix_timestamp(c,
‘yyyyMMddHHmmSS’) / 60) * 60 as bigint))) having length(a) = 32"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message