Github user maropu commented on the issue: https://github.com/apache/spark/pull/17191 @gatorsmile I checked; ``` // PostgreSQL v9.5 postgres=# \d t Table "public.t" Column | Type | Modifiers --------+---------+----------- gkey | integer | value | integer | postgres=# SELECT gkey AS k, COUNT(value) FROM t GROUP BY k; k | count ----+------- 1 | 1 (1 row) // MySQL v5.7.13 mysql> SHOW COLUMNS FROM t1; +-------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-----+---------+-------+ | gkey | int(11) | YES | | NULL | | | value | int(11) | YES | | NULL | | +-------+---------+------+-----+---------+-------+ 2 rows in set (0.00 sec) mysql> SELECT gkey AS k, COUNT(value) FROM t1 GROUP BY k; +------+--------------+ | k | count(value) | +------+--------------+ | 1 | 1 | +------+--------------+ 1 row in set (0.00 sec) // SQLite v3.8.8.3 Use ".open FILENAME" to reopen on a persistent database. sqlite> .schema CREATE TABLE t(gkey int, value int); sqlite> SELECT gkey AS k, COUNT(value) FROM t GROUP BY k; 1|1 // Hive v2.0.1 hive> describe t; OK gkey int value int Time taken: 0.09 seconds, Fetched: 2 row(s) hive> SELECT gkey AS k, COUNT(value) FROM t GROUP BY k; FAILED: SemanticException [Error 10004]: Line 1:47 Invalid table alias or column reference 'k': (possible column names are: gkey, value) ``` And you know Oracle and SQLServer does not support this syntax; https://github.com/apache/spark/pull/10967#issuecomment-176439624 In summary, Supported: PostgreSQL, MySQL, and SQLite Not-Supported: Hive, Oracle, and SQLServer
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org