Re: Question about various logins...

2012-01-20 Thread Ronak Bhatt
Hi - Thanks..the document gives good information about group and roles. However, I could not find, 1. Where and how I can create user for example jsmith, alee 2. where I can create group for example group_read_only, group_do_everything, group_web_analytics 3. where can I assign use to group and g

Re: Invoke a UDAF inside another UDAF

2012-01-20 Thread rohan monga
my bad, i hastily converted the query to a wrong example. it should be like this select f1, avg(f2) as avg_f2, avg(f2 - avg_f2) from table group by f1; In essence, I just want to use the value generated by one UDAF ( in this case avg(f2) ) as a single number and then apply that value to the grou

Re: Invoke a UDAF inside another UDAF

2012-01-20 Thread Edward Capriolo
IMHO You can not possibly nest the percentile calculation because the results would be meaningless. percentile has to aggregate a set and pick the Nth element, But if you nest then the inner percentile only returns one result to the outer percentile, and that is pretty meaningless. (I think someon

Re: Invoke a UDAF inside another UDAF

2012-01-20 Thread rohan monga
thanks edward that seems to work :) However, I have another query is like this select a, avg(b) as avg_b, percentile_approx( avg_b - percentile_approx( b, .5), .5 ) from table1 group by a Here I will loose the group info if I include the inner query in the FROM clause, is there a way to get thi

Re: Question about various logins...

2012-01-20 Thread Edward Capriolo
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Authorization On 1/20/12, Ronak Bhatt wrote: > Hi - > > I'm from relational background where there is capability of, > > 1. Creating various schema - to logically group related entities > 2. Creating various users with privileges -

Question about various logins...

2012-01-20 Thread Ronak Bhatt
Hi - I'm from relational background where there is capability of, 1. Creating various schema - to logically group related entities 2. Creating various users with privileges - to have better control of who (user) can do what (DML, DDL , access to data) and how much (can consume limited resources )

Re: Invoke a UDAF inside another UDAF

2012-01-20 Thread Edward Capriolo
I think if you are grouping by b, b has to be in your select list. Try this. FROM ( select b,count(a) as theCount from table one group by b ) a select mean(theCount); I think that should work. On 1/20/12, rohan monga wrote: > Hi, > I am trying to run a query like > "select mean(count(a)) from ta

Invoke a UDAF inside another UDAF

2012-01-20 Thread rohan monga
Hi, I am trying to run a query like "select mean(count(a)) from table1 group by b;" I am getting the following error FAILED: Hive Internal Error: java.lang.NullPointerException(null) java.lang.NullPointerException at org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc.newInstance(ExprNodeG

Re: error on left/right join, hive 0.8.0

2012-01-20 Thread Roberto Congiu
Woops... you're right and I apologize for the . We were using the stock cloudera 0.7 version but needed some patches in 0.8 so I took the cloudera hive srpm, changed the spec file, sources and patches to what we needed, and built a 0.8 distribution rpm based on the cloudera file path etc. So the

Re: question on hive multiple insert

2012-01-20 Thread Chen Song
Please disregard my previous email. I figured out that the correct syntax should be FROM a JOIN b on a.col1 = b.col1 INSERT a.col1, a.col2 INSERT ... Thanks Chen From: Chen Song To: hive user list Sent: Friday, January 20, 2012 10:47 AM Subject: question on

question on hive multiple insert

2012-01-20 Thread Chen Song
Hi I am reading on Hive's multiple insert syntax manual and wondering if it is possible to utilize join in any individual insert. e.g.,  FROM a INSERT a.col1, a.col2 join b on a.col1 = b.col1 INSERT ... Apparently, Hive doesn't like this query and give syntax error. In other words, my question