You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Josh Rosen (JIRA)" <ji...@apache.org> on 2016/01/31 21:44:39 UTC
[jira] [Resolved] (SPARK-13105) Spark 1.6 and earlier should reject
NATURAL JOIN queries instead of returning wrong answers
[ https://issues.apache.org/jira/browse/SPARK-13105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh Rosen resolved SPARK-13105.
--------------------------------
Resolution: Not A Problem
I'm going to resolve this as "not a problem" per discussion on my per request. It looks like Hive also lacks support for the {{NATURAL}} keyword, so Spark 1.6 and earlier's behavior is consistent with Hive. It was deemed too risky to change this behavior in a maintenance release since it might break existing queries, so I guess this is going to have to remain a rough edge in those versions.
> Spark 1.6 and earlier should reject NATURAL JOIN queries instead of returning wrong answers
> -------------------------------------------------------------------------------------------
>
> Key: SPARK-13105
> URL: https://issues.apache.org/jira/browse/SPARK-13105
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 1.4.1, 1.5.2, 1.6.0
> Reporter: Josh Rosen
> Assignee: Josh Rosen
>
> In Spark 1.6 and earlier, Spark SQL does not support {{NATURAL JOIN}} queries. However, its SQL parser does not consider {{NATURAL}} to be a reserved word, which causes natural joins to be parsed as regular joins where the left table has been aliased. For instance,
> {code}
> SELECT * FROM foo NATURAL JOIN bar
> {code}
> gets interpreted as "foo JOIN bar" where "foo" is aliased to "natural".
> Rather than doing this, which leads to confusing / wrong results for users who expect NATURAL JOIN behavior, Spark should immediately reject these queries at analysis time and should provide an informative error message.
> We're going to add natural join support in Spark 2.0, but for earlier versions we should add a bugfix to throw errors.
--
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