FAQ
Hello all,

I was trying to do something like this today and Hive didn't like it:

SELECT AVG(IF(expression, anotherexpression, NULL)) ...

I don't think Hive supports returning NULL as the value of the last argument
to IF(...).

Is there any plan to support this?

Thanks,
Ryan

Search Discussions

  • Ning Zhang at Nov 3, 2009 at 11:30 pm
    It is supported in trunk. Which version of Hive are you running?

    Ning
    On Nov 3, 2009, at 2:35 PM, Ryan LeCompte wrote:

    Hello all,

    I was trying to do something like this today and Hive didn't like it:

    SELECT AVG(IF(expression, anotherexpression, NULL)) ...

    I don't think Hive supports returning NULL as the value of the last
    argument to IF(...).

    Is there any plan to support this?

    Thanks,
    Ryan
  • Ryan LeCompte at Nov 3, 2009 at 11:39 pm
    I'm running 0.40 release. I can try trunk.

    Thanks,
    Ryan



    On Nov 3, 2009, at 6:29 PM, Ning Zhang wrote:

    It is supported in trunk. Which version of Hive are you running?

    Ning
    On Nov 3, 2009, at 2:35 PM, Ryan LeCompte wrote:

    Hello all,

    I was trying to do something like this today and Hive didn't like it:

    SELECT AVG(IF(expression, anotherexpression, NULL)) ...

    I don't think Hive supports returning NULL as the value of the last
    argument to IF(...).

    Is there any plan to support this?

    Thanks,
    Ryan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedNov 3, '09 at 10:35p
activeNov 3, '09 at 11:39p
posts3
users2
websitehive.apache.org

2 users in discussion

Ryan LeCompte: 2 posts Ning Zhang: 1 post

People

Translate

site design / logo © 2021 Grokbase