hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward Capriolo (JIRA)" <>
Subject [jira] [Commented] (HIVE-2165) variable to be assigned with an atomic value from a query
Date Fri, 13 May 2011 20:47:52 GMT


Edward Capriolo commented on HIVE-2165:

I was thinking about this. Getting 1 row result is simple enough. We can tap the the result
set as it streamed back to it and store it and provide access with something like: ${LASTROW}[0].
The question is how many of these type of features do we need before should tackle a stored
procedure like language.

> variable to be assigned with an atomic value from a query
> ---------------------------------------------------------
>                 Key: HIVE-2165
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Query Processor
>            Reporter: Ning Zhang
> Currently variable can only be assigned by a constant. There are cases where a query
generate a single value that should be used by the second query. It would be nice to assign
this value to a variable and pass it to the second query. For exmaple:
> {code}
> hive> set x_avg = `select avg(x) from T`;
> hive> select my_udf(${hiveconf:x_avg}, y) from T2;
> {code}

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message