hql
如下select length(tag) from table1 order by length(tag) limit 20;
报错FAILED: SemanticException [Error 10004]: Line…Invalid table alias or column reference ‘tag’: (possible column names are: _c0)
FAILED: SemanticException [Error 10004]: Line…Invalid table alias or column reference ‘tag’: (possible column names are: _c0)
修改
用别名替代length(tag)
, 如下select length(tag) as taglen from table1 order by taglen limit 20;
文章来源:https://www.toymoban.com/news/detail-812898.html
在order by
中可以使用普通函数(如to_date()
),但是不能使用聚合函数(如count()
, sum()
)。文章来源地址https://www.toymoban.com/news/detail-812898.html
到了这里,关于hive order by length() 报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!