Re: Problème with min function in HiveQL

2013-08-30 Thread Jérôme Verdier
Ok, thanks for this solution. Unfortunately, i have rewrited my script like this : INSERT INTO TABLE default.THM_CA_RGRP_PRODUITS_SEM SELECT '${hiveconf:in_co_societe}' as co_societe, '${hiveconf:in_co_an_semaine}'as co_an_semaine,

Re: Problème with min function in HiveQL

2013-08-30 Thread Stephen Sprague
awright Jerome. look closely at the error message. you can figure this one out. On Fri, Aug 30, 2013 at 1:17 AM, Jérôme Verdier verdier.jerom...@gmail.comwrote: Ok, thanks for this solution. Unfortunately, i have rewrited my script like this : INSERT INTO TABLE

Re: Problème with min function in HiveQL

2013-08-30 Thread Jérôme Verdier
Thanks Stephen, Yes i realise that it was so a stupid questionMaybe i wasn't really awaked this morning ;-) now it's working well. Thanks everyone. 2013/8/30 Stephen Sprague sprag...@gmail.com awright Jerome. look closely at the error message. you can figure this one out. On Fri,

Re: Problème with min function in HiveQL

2013-08-30 Thread Jérôme Verdier
Hi, Is it possible to have multiple conditions in Having clause ? I get an error when i'm trying this. Thanks a lot. 2013/8/30 Jérôme Verdier verdier.jerom...@gmail.com Thanks Stephen, Yes i realise that it was so a stupid questionMaybe i wasn't really awaked this morning ;-) now

Re: Problème with min function in HiveQL

2013-08-30 Thread Stephen Sprague
there should be no limitation AFAIK. example + error message is always helpful - even if you might regret it. :) On Fri, Aug 30, 2013 at 8:16 AM, Jérôme Verdier verdier.jerom...@gmail.comwrote: Hi, Is it possible to have multiple conditions in Having clause ? I get an error when i'm

Problème with min function in HiveQL

2013-08-29 Thread Jérôme Verdier
Hi everybody, I am coding some HiveQL script to do some calculations. I have a problem with the min() function. My hive script is below : INSERT INTO TABLE default.THM_CA_RGRP_PRODUITS_SEM SELECT '${hiveconf:in_co_societe}' as co_societe,

Re: Problème with min function in HiveQL

2013-08-29 Thread Stephen Sprague
the min function at column 62 is on on the column b.dt_jour. what datatype is that? if its of type 'timestamp' that might explain it. On Thu, Aug 29, 2013 at 3:01 AM, Jérôme Verdier verdier.jerom...@gmail.comwrote: Hi everybody, I am coding some HiveQL script to do some calculations. I

Re: Problème with min function in HiveQL

2013-08-29 Thread Jérôme Verdier
: Re: Problème with min function in HiveQL the min function at column 62 is on on the column b.dt_jour. what datatype is that? if its of type 'timestamp' that might explain it. On Thu, Aug 29, 2013 at 3:01 AM, Jérôme Verdier verdier.jerom...@gmail.comwrote: Hi everybody, I am coding some

Re: Problème with min function in HiveQL

2013-08-29 Thread Stephen Sprague
*Subject: *Re: Problème with min function in HiveQL the min function at column 62 is on on the column b.dt_jour. what datatype is that? if its of type 'timestamp' that might explain it. On Thu, Aug 29, 2013 at 3:01 AM, Jérôme Verdier verdier.jerom...@gmail.com wrote: Hi everybody, I am

Re: Problème with min function in HiveQL

2013-08-29 Thread Jason Dere
Looks like the issue is the use of min() within the WHERE clause - the place where the exception is being thrown has the following comment: // UDAF in filter condition, group-by caluse, param of funtion, etc. On Aug 29, 2013, at 3:01 AM, Jérôme Verdier verdier.jerom...@gmail.com wrote:

Re: Problème with min function in HiveQL

2013-08-29 Thread John Meagher
Aggregate functions need to go in a HAVING clause instead of the WHERE clause. WHERE clauses are applied prior to aggregation, HAVING is applied post aggregation. select ... from ... where some row level filter group by ... having some aggregate level filter On Thu, Aug 29, 2013 at 2:49 PM,

Re: Problème with min function in HiveQL

2013-08-29 Thread Stephen Sprague
indeed. you nailed it. On Thu, Aug 29, 2013 at 11:53 AM, John Meagher john.meag...@gmail.comwrote: Aggregate functions need to go in a HAVING clause instead of the WHERE clause. WHERE clauses are applied prior to aggregation, HAVING is applied post aggregation. select ... from ... where