|IF| is implemented as a generic UDF in Hive (|GenericUDFIf|). It seems
that this function can’t be properly resolved. Could you provide a
minimum code snippet that reproduces this issue?
Cheng
On 1/20/15 1:22 AM, Xuelin Cao wrote:
Hi,
I'm trying to migrate some hive scripts to Spark-SQL. However, I
found some statement is incompatible in Spark-sql.
Here is my SQL. And the same SQL works fine in HIVE environment.
SELECT
*if(ad_user_id>1000, 1000, ad_user_id) as user_id*
FROM
ad_search_keywords
What I found is, the parser reports error on the "*if*" statement:
No function to evaluate expression. type: AttributeReference, tree:
ad_user_id#4
Anyone have any idea about this?