Review Board 1.7.22


HIVE-2005 Implement BETWEEN operator

Review Request #3008 - Created Dec. 5, 2011 and submitted

Navis Ryu
trunk
HIVE-2005
Reviewers
hive
cws, jvs
hive-git
Revised version using 'between' UDF
added new test : udf_between.q
ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
Revision c7342c8 New Change
[20] 144 lines
[+20]
145
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFnGrams;
145
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFnGrams;
146
import org.apache.hadoop.hive.ql.udf.generic.GenericUDF;
146
import org.apache.hadoop.hive.ql.udf.generic.GenericUDF;
147
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFArray;
147
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFArray;
148
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFArrayContains;
148
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFArrayContains;
149
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFAssertTrue;
149
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFAssertTrue;

    
   
150
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBetween;
150
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge;
151
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge;
151
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCase;
152
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCase;
152
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCoalesce;
153
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCoalesce;
153
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFConcatWS;
154
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFConcatWS;
154
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFEWAHBitmapAnd;
155
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFEWAHBitmapAnd;
[+20] [20] 195 lines
[+20]
350
    registerGenericUDF("<=", GenericUDFOPEqualOrLessThan.class);
351
    registerGenericUDF("<=", GenericUDFOPEqualOrLessThan.class);
351
    registerGenericUDF(">", GenericUDFOPGreaterThan.class);
352
    registerGenericUDF(">", GenericUDFOPGreaterThan.class);
352
    registerGenericUDF(">=", GenericUDFOPEqualOrGreaterThan.class);
353
    registerGenericUDF(">=", GenericUDFOPEqualOrGreaterThan.class);
353
    registerGenericUDF("not", GenericUDFOPNot.class);
354
    registerGenericUDF("not", GenericUDFOPNot.class);
354
    registerGenericUDF("!", GenericUDFOPNot.class);
355
    registerGenericUDF("!", GenericUDFOPNot.class);

    
   
356
    registerGenericUDF("btw", GenericUDFBetween.class);
355

    
   
357

   
356
    registerGenericUDF("ewah_bitmap_and", GenericUDFEWAHBitmapAnd.class);
358
    registerGenericUDF("ewah_bitmap_and", GenericUDFEWAHBitmapAnd.class);
357
    registerGenericUDF("ewah_bitmap_or", GenericUDFEWAHBitmapOr.class);
359
    registerGenericUDF("ewah_bitmap_or", GenericUDFEWAHBitmapOr.class);
358
    registerGenericUDF("ewah_bitmap_empty", GenericUDFEWAHBitmapEmpty.class);
360
    registerGenericUDF("ewah_bitmap_empty", GenericUDFEWAHBitmapEmpty.class);
359

    
   
361

   
[+20] [20] 777 lines
ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g
Revision eecd9e7 New Change
 
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java
New File
 
ql/src/test/queries/clientpositive/udf_between.q
New File
 
ql/src/test/results/clientpositive/show_functions.q.out
Revision 05b784b New Change
 
ql/src/test/results/clientpositive/udf_between.q.out
New File
 
  1. ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java: Loading...
  2. ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g: Loading...
  3. ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBetween.java: Loading...
  4. ql/src/test/queries/clientpositive/udf_between.q: Loading...
  5. ql/src/test/results/clientpositive/show_functions.q.out: Loading...
  6. ql/src/test/results/clientpositive/udf_between.q.out: Loading...