我开始使用 Apache kylin(版本 1.5.3)并且在简单查询时遇到了一些问题。
查询
select ft.sid, count(ft.sid) as cs
from (
select sid, lid
from ft_demo
group by lid, sid
) as ft inner join (
select lid
from lt_demo
where abc = '01234'
) as lt on (ft.lid = lt.lid)
group by ft.sid
having (count(ft.sid) > 1);
返回错误
执行 SQL 时出错“select ft.sid, count(ft.sid) as cs from (select sid, lid from ft_demo group by lid, sid) as ft inner join (select lid from lt_demo where abc = '01234') as lt on (ft.lid = lt.lid) group by ft.sid 有 (count(ft.sid) > 1) LIMIT 50000": null
提交一个较短的版本是可行的。喜欢
select ft.sid
from (
select sid, lid
from ft_demo
group by lid, sid
) as ft inner join (
select lid
from lt_demo
where abc = '01234'
) as lt on (ft.lid = lt.lid);
返回 sid 的列表,其中一些出现不止一次。所以,我想通过第一个查询得到一个不止一次出现的 sid 列表及其出现。
该查询在 Apache hive 中运行良好。有谁知道,为什么 kylin 无法提交查询并返回 null?