Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Re: [SQLWindowing] Windowing function output path syntax (#26)


Copy link to this message
-
Re: [SQLWindowing] Windowing function output path syntax (#26)
Hi Neelesh,

You are using the syntax from the SQLWindowing project; which was done on top of HQL.
Now the syntax is standard SQL; see ptf_general_queries.q for examples. Your e.g can be expressed as:

select sum(tamt) over (partition by mid order by mid rows between unbounded preceding and current row) as cum_amt,
mid,tdate,tamt,cum_amt
>From t_enc

Regards,
Harish.
From: neelesh gadhia <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Reply-To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>, neelesh gadhia <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Date: Friday, February 22, 2013 2:05 PM
To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>, "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Subject: Re: [SQLWindowing] Windowing function output path syntax (#26)

Hello,

I downloaded the source code from ptf-windowing branch and build the dist based on that.

Now when I try to make use of windowing function using the following ql, I get an error as shown below. Am I missing anything here? Please advise.
from <select mid, tdate, tamt from t_enc >
partition by mid
order by mid
with
sum(tamt) over rows between
unbounded preceding and current row as cum_amt
select mid,tdate,tamt,cum_amt;
hive> from <select mid, tdate, tamt from t_enc >
    > partition by mid
    > order by mid
    > with
    > sum(tamt) over rows between
    > unbounded preceding and current row as cum_amt
    > select mid,tdate,tamt,cum_amt;
NoViableAltException(258@[])
    at org.apache.hadoop.hive.ql.parse.HiveParser.joinSource(HiveParser.java:32612)
    at org.apache.hadoop.hive.ql.parse.HiveParser.fromClause(HiveParser.java:32498)
    at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatement(HiveParser.java:26832)
    at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpression(HiveParser.java:26716)
    at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:981)
    at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:687)
    at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:444)
    at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:416)
    at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:335)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:898)
    at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
    at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
    at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:756)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
FAILED: ParseException line 1:5 cannot recognize input near '<' 'select' 'mid' in join source

________________________________
From: hbutani <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
To: hbutani/SQLWindowing <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Cc: ngadhia <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Sent: Sunday, February 17, 2013 4:50 PM
Subject: Re: [SQLWindowing] Windowing function output path syntax (#26)

Hi,
We don't actively support this library anymore. This functionality is in the process of being folded into hive. You can see the latest code at https://github.com/apache/hive, the ptf-windowing branch. Also checkout the Jiras in Hive Jira: look for Jiras whose Component is PTF-Windowing.
regards,
Harish.

Reply to this email directly or view it on GitHub<https://github.com/hbutani/SQLWindowing/issues/26#issuecomment-13701539>.
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB