spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyukjin Kwon (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-22345) Sort-merge join generates incorrect code for CodegenFallback filter conditions
Date Tue, 21 May 2019 04:01:15 GMT

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

Hyukjin Kwon updated SPARK-22345:
---------------------------------
    Labels: bulk-closed  (was: )

> Sort-merge join generates incorrect code for CodegenFallback filter conditions
> ------------------------------------------------------------------------------
>
>                 Key: SPARK-22345
>                 URL: https://issues.apache.org/jira/browse/SPARK-22345
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.1.1
>            Reporter: Ryan Blue
>            Priority: Major
>              Labels: bulk-closed
>
> I have a job that is producing incorrect results from a sort-merge join with a filter
on an expression with a Hive UDF. The results are correct when codgen is turned off.
> I tracked the problem to the evaluation of the Hive UDF, here:
> {code:lang=java}
> Object smj_obj1 = ((Expression) references[2]).eval(smj_rightRow1);
> {code}
> The UDF references columns from both left and right, so this was clearly generated incorrectly.
I think it is that the expression used for Hive UDFs is a CodegenFallback, which uses eval
instead of local variables. The non-codegen implementations pass a joined row into eval and
creating a joined row in codegen fixes the problem. I'll post a PR in a minute.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message