V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
myyou
V2EX  ›  Hadoop

Apache Kylin 在 left outer join 后为何不支持+-*/运算啊?

  •  1
     
  •   myyou · 2018-08-06 15:44:30 +08:00 · 3448 次点击
    这是一个创建于 2299 天前的主题,其中的信息可能已经有所发展或是发生改变。
    • kylin sql
    select
      a."member_num", b."member_num_tb", a."member_num" / b."member_num_tb"
    from
    (
        select
          count(distinct mobile) as "member_num"
          ,'week' as "dtype"
        from member
        where dweek <= '18.06.04~18.06.10'
    ) as a
    left outer join
    (
        select
          count(distinct mobile) as "member_num_tb"
          ,'week' as "dtype"
        from member
        where dweek_tb <= '18.06.04~18.06.10'
    ) as b on a."dtype" = b."dtype"
    
    • 报错信息
    That the right side of the BinaryTupleExpression owns columns is not supported for / while executing SQL: 
    "select a."member_num", b."member_num_tb", a."member_num" / b."member_num_tb" from ( select count(distinct mobile) as "member_num" ,'week' as "dtype" from member where dweek <= '18.06.04~18.06.10' ) as a left outer join ( select count(distinct mobile) as "member_num_tb" ,'week' as "dtype" from member where dweek_tb <= '18.06.04~18.06.10' ) as b on a."dtype" = b."dtype" "
    

    请问这是是什么原因啊?

    9 条回复    2018-08-06 17:13:38 +08:00
    zog
        1
    zog  
       2018-08-06 16:17:18 +08:00
    你用的什么版本 Kylin?
    myyou
        2
    myyou  
    OP
       2018-08-06 16:30:27 +08:00
    @zog kylin-2.4.0, 测试了一下,发现 a."member_num" / 3.0 是可以执行的,也就是右边不能为表达式只能是已知到的值,你有遇到这个问题吗?有什么解决办法没?
    zog
        3
    zog  
       2018-08-06 16:38:26 +08:00
    被除数不能是个 measure
    myyou
        4
    myyou  
    OP
       2018-08-06 16:43:00 +08:00
    @zog 请问有什么办法或写法可以解决上面的问题吗?
    zog
        5
    zog  
       2018-08-06 16:43:49 +08:00   ❤️ 1
    myyou
        6
    myyou  
    OP
       2018-08-06 16:54:25 +08:00
    @zog 它这个要 2.5.0 修复,请问老版本(低于 2.4.0 )有这个问题吗?
    zog
        7
    zog  
       2018-08-06 17:01:23 +08:00   ❤️ 1
    你自己打个 patch 修一下....以前好像也有
    myyou
        8
    myyou  
    OP
       2018-08-06 17:06:54 +08:00
    @zog ok,我看一下,非常感谢
    zog
        9
    zog  
       2018-08-06 17:13:38 +08:00
    客气了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2686 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 15:28 · PVG 23:28 · LAX 07:28 · JFK 10:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.