hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-2005) Implement BETWEEN operator
Date Tue, 06 Dec 2011 09:27:41 GMT

    [ https://issues.apache.org/jira/browse/HIVE-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13163464#comment-13163464
] 

jiraposter@reviews.apache.org commented on HIVE-2005:
-----------------------------------------------------



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

added already (r2)


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

ah, ok.


bq.  On 2011-12-06 05:29:34, Carl Steinbach wrote:
bq.  > ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java, line 356
bq.  > <https://reviews.apache.org/r/3008/diff/2/?file=62036#file62036line356>
bq.  >
bq.  >     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.


bq.  On 2011-12-06 05:29:34, Carl Steinbach wrote:
bq.  > ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java, line 15
bq.  > <https://reviews.apache.org/r/3008/diff/2/?file=62038#file62038line15>
bq.  >
bq.  >     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:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3008/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-12-06 00:17:31)
bq.  
bq.  
bq.  Review request for hive, John Sichi and Carl Steinbach.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Revised version using 'between' UDF
bq.  
bq.  
bq.  This addresses bug HIVE-2005.
bq.      https://issues.apache.org/jira/browse/HIVE-2005
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java c7342c8 
bq.    ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g eecd9e7 
bq.    ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java PRE-CREATION

bq.    ql/src/test/queries/clientpositive/udf_between.q PRE-CREATION 
bq.    ql/src/test/results/clientpositive/show_functions.q.out 05b784b 
bq.    ql/src/test/results/clientpositive/udf_between.q.out PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3008/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  added new test : udf_between.q
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Navis
bq.  
bq.


                
> Implement BETWEEN operator
> --------------------------
>
>                 Key: HIVE-2005
>                 URL: https://issues.apache.org/jira/browse/HIVE-2005
>             Project: Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.9.0
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>             Fix For: 0.9.0
>
>         Attachments: HIVE-2005.1.patch.txt
>
>
> Reference: http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_between

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message