查询:
SELECT DISTINCT seg from mytable ORDER BY 1 ASC结果

+-------+--+
|  seg  |
+-------+--+
| NONE  |
| AFS   |
+-------+--+

作为SELECT DISTINCT seg from mytable ORDER BY seg ASC的结果
+-------+--+
|  seg  |
+-------+--+
| AFS   |
| NONE  |
+-------+--+

Hive不支持在ORDER BY中按位置引用列吗?

最佳答案

自Hive 0.11起支持按位置排序,但仅从Hive 2.2.0起默认启用。

https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties



10-08 12:37