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;
文章來源:http://www.zghlxwxcb.cn/news/detail-812898.html
在order by
中可以使用普通函數(shù)(如to_date()
),但是不能使用聚合函數(shù)(如count()
, sum()
)。文章來源地址http://www.zghlxwxcb.cn/news/detail-812898.html
到了這里,關(guān)于hive order by length() 報錯的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!