Re: Problem with the windowing function ntile (Exceptions)

2013-07-24 Thread Lars Francke
We're still being bitten by this problem without a workaround. Does anyone have an idea? Thanks, Lars On Wed, Jul 17, 2013 at 11:24 PM, Lars Francke wrote: > Hi, > > I'm running a query like this: > > CREATE TABLE foo > STORED AS ORC > AS > SELECT > id, > season, > amount, > ntile(10)

Re: Semantics of Rank.

2013-07-24 Thread j.barrett Strausser
As an example : If I run my query above removing the arg the following is thrown. FAILED: SemanticException Failed to breakup Windowing invocations into Groups. At least 1 group must only depend on input columns. Also check for circular dependencies. Underlying error: org.apache.hadoop.hive.ql.exe

Re: Semantics of Rank.

2013-07-24 Thread j.barrett Strausser
That isn't true. If you try to run the above HIVE without an argument, it will throw an exception. I have seen other users replicate this problem as well. I can file a JIRA if someone can confirm that my query should work. On Wed, Jul 24, 2013 at 11:02 PM, manishbh...@rocketmail.com < manishbh..

Re: Semantics of Rank.

2013-07-24 Thread manishbh...@rocketmail.com
Analytical function doesn't expect any argument. Rank() itself enough to sequence based on the window you have defined in partition by. So Rank() over (partition by cmscustid order by orderdate) Should work as long as I have wrote right syntax for hive. Sent via Rocket from my HTC - Repl

Re: regarding Hive Thrift Metastore Server

2013-07-24 Thread Shangzhong zhu
We are using Hive 0.9.0. Besides the security issues, any other issues you see when directly hitting mysql? We are frequently seeing Hive jobs failed (both CLI and oozie Hive jobs) due to Meta Thrift server not responding. Any insight into this? Thanks, Shanzhong On Wed, Jul 24, 2013 at 2:23 P

Re: regarding Hive Thrift Metastore Server

2013-07-24 Thread Thejas Nair
Without a metastore server, you would need to make access to the mysql db possible from all hive clients. This is inherently less secure, because anybody who can run hive cli can modify the mysql db, and there is not metastore server doing the authorization checks. If you don't care about security,

regarding Hive Thrift Metastore Server

2013-07-24 Thread Shangzhong zhu
Hi all, Our current setting of Hive is: Hive Thrift server -> MySQL metastore. All requests to MySQL metastore is going through the Thrift server. However, we have been seeing issues with this setting. Thrift server once a while gets stuck with TTransport timeout errors or even OOM. Seems remov

Re: Semantics of Rank.

2013-07-24 Thread j.barrett Strausser
Thanks for the reply. Perhaps my misunderstanding of the relation between rank and the windowing function is wrong. What I want to achieve for the following is : For a given customer id, sort his orders. I thought the below would work. SELECT eh.cmsorderid, eh.orderdate, RANK(orderdate) w FROM or

Re: Semantics of Rank.

2013-07-24 Thread Shahar Glixman
the argument to rank is simply some value, whereas the rank function compare this value to the previous value received, if value is same, rank returns ++index, otherwise, rank return 1. pseudo code: class Rank { int index; Object previousValue = null; int evaluate(Object value) { if (value == p

Semantics of Rank.

2013-07-24 Thread j.barrett Strausser
It seems as though I am required to pass in an argument to RANK(). What is the effect of passing this argument in ? In a RANK function the output for RANK should be the number of rows preceding a row in a given window. As windows are specified by the partition and order by fields I don't underst

Re: GenericUDFRank UDF is not working as expected

2013-07-24 Thread Shahar Glixman
Thanks, but still not working. Any other ideas? On Wed, Jul 24, 2013 at 9:36 AM, Nitin Pawar wrote: > try rank(columntoberanked, columntobegrouped) > > in your case rank (userid, city) > > > On Wed, Jul 24, 2013 at 3:47 AM, Shahar Glixman wrote: > >> Hello, >> >> I'm trying to use GenericUDFRank