Chunjun Xiao created SPARK-30618: ------------------------------------ Summary: 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
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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org