> On 2011-12-06 05:29:34, Carl Steinbach wrote:
> > * show_functions.q.out needs to be updated. There might be other test diffs 
> > too.

added already (r2)


> On 2011-12-06 05:29:34, Carl Steinbach wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java, 
> > line 1
> > <https://reviews.apache.org/r/3008/diff/2/?file=62038#file62038line1>
> >
> >     Missing ASF License header.

ah, ok.


> On 2011-12-06 05:29:34, Carl Steinbach wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java, line 356
> > <https://reviews.apache.org/r/3008/diff/2/?file=62036#file62036line356>
> >
> >     Is it possible to register this as "between", or does that result in 
> > syntax errors?

I remember naming 'between' made a parsing exception. I'll try one more time.


> On 2011-12-06 05:29:34, Carl Steinbach wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java, 
> > line 15
> > <https://reviews.apache.org/r/3008/diff/2/?file=62038#file62038line15>
> >
> >     Since we still end up expressing this as two UDFs, would it make more 
> > sense to implement this as a rewrite rule in the parser instead of as its 
> > own UDF? Implementing it as a special purpose UDF results in it appearing 
> > in the FunctionRegistry, and in the output of "show functions", which isn't 
> > super desirable for things that are fundamentally syntactic sugar.

The first version was implemented by using rewrite rule, something like 'A 
BETWEEN B AND C' --> 'B <= A AND A <= C'. But this made target expression(A) 
evaluated twice which made some queries slow. But I agree on the 'syntactic 
sugar' part.

Making system functions not visible was requested before (to me). Would it be 
useful for the problem?


- Navis


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3008/#review3656
-----------------------------------------------------------


On 2011-12-06 00:17:31, Navis Ryu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/3008/
> -----------------------------------------------------------
> 
> (Updated 2011-12-06 00:17:31)
> 
> 
> Review request for hive, John Sichi and Carl Steinbach.
> 
> 
> Summary
> -------
> 
> Revised version using 'between' UDF
> 
> 
> This addresses bug HIVE-2005.
>     https://issues.apache.org/jira/browse/HIVE-2005
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java c7342c8 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g eecd9e7 
>   ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java 
> PRE-CREATION 
>   ql/src/test/queries/clientpositive/udf_between.q PRE-CREATION 
>   ql/src/test/results/clientpositive/show_functions.q.out 05b784b 
>   ql/src/test/results/clientpositive/udf_between.q.out PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/3008/diff
> 
> 
> Testing
> -------
> 
> added new test : udf_between.q
> 
> 
> Thanks,
> 
> Navis
> 
>

Reply via email to