hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elliot West <>
Subject Hive Macros roadmap
Date Fri, 11 Sep 2015 19:38:40 GMT

I noticed some time ago the Hive Macro feature. To me at least this seemed
like an excellent addition to HQL, allowing the user to encapsulate complex
column logic as an independent HQL, reusable macro while avoiding the
complexities of Java UDFs. However, few people seem to be aware of them or
use them. If you are unfamiliar with macros they look like this:

hive> create temporary macro MYSIGMOID(x DOUBLE)
    > 2.0 / (1.0 + exp(-x));

hive> select MYSIGMOID(1.0) from dual;


As far as I can tell, they are no longer documented on the Hive wiki. There
is a tiny reference to them in the O'Reilly 'Programming Hive' book (page
185). Can anyone advise me on the following:

   - Are there are plans to keep or remove this functionality?
   - Are there are plans to document this functionality?
   - Aside from limitations of HQL are there compelling reasons not to use

Thanks - Elliot.

View raw message