You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2020/01/30 01:47:00 UTC
[jira] [Resolved] (SPARK-30618) Why does SparkSQL allow `WHERE` to
be table alias?
[ https://issues.apache.org/jira/browse/SPARK-30618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon resolved SPARK-30618.
----------------------------------
Resolution: Invalid
Please ask questions into mailing list. See [https://spark.apache.org/contributing.html]
> Why does SparkSQL allow `WHERE` to be table alias?
> --------------------------------------------------
>
> Key: SPARK-30618
> URL: https://issues.apache.org/jira/browse/SPARK-30618
> Project: Spark
> Issue Type: Question
> Components: SQL
> Affects Versions: 2.4.4
> Reporter: Chunjun Xiao
> Priority: Minor
>
> An empty `WHERE` expression is valid in Spark SQL, as: `SELECT * FROM XXX WHERE`. Here `WHERE` is parsed as the table alias.
> I think this surprises most SQL users, as this is an invalid statement in some SQL engines like MySQL.
> I checked the source code, and found more keywords (in most SQL system) are treated as `noReserved` and allowed to be table alias.
> Could anyone please give the rationality behind this decision?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org