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 e1c47b4 New Change
[20] 149 lines
[+20]
150
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFnGrams;
150
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFnGrams;
151
import org.apache.hadoop.hive.ql.udf.generic.GenericUDF;
151
import org.apache.hadoop.hive.ql.udf.generic.GenericUDF;
152
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFArray;
152
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFArray;
153
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFArrayContains;
153
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFArrayContains;
154
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFAssertTrue;
154
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFAssertTrue;

    
   
155
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBetween;
155
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge;
156
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge;
156
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCase;
157
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCase;
157
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCoalesce;
158
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCoalesce;
158
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFConcatWS;
159
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFConcatWS;
159
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFEWAHBitmapAnd;
160
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFEWAHBitmapAnd;
[+20] [20] 200 lines
[+20]
360
    registerGenericUDF("<=", GenericUDFOPEqualOrLessThan.class);
361
    registerGenericUDF("<=", GenericUDFOPEqualOrLessThan.class);
361
    registerGenericUDF(">", GenericUDFOPGreaterThan.class);
362
    registerGenericUDF(">", GenericUDFOPGreaterThan.class);
362
    registerGenericUDF(">=", GenericUDFOPEqualOrGreaterThan.class);
363
    registerGenericUDF(">=", GenericUDFOPEqualOrGreaterThan.class);
363
    registerGenericUDF("not", GenericUDFOPNot.class);
364
    registerGenericUDF("not", GenericUDFOPNot.class);
364
    registerGenericUDF("!", GenericUDFOPNot.class);
365
    registerGenericUDF("!", GenericUDFOPNot.class);

    
   
366
    registerGenericUDF("between", GenericUDFBetween.class);
365

    
   
367

   
366
    registerGenericUDF("ewah_bitmap_and", GenericUDFEWAHBitmapAnd.class);
368
    registerGenericUDF("ewah_bitmap_and", GenericUDFEWAHBitmapAnd.class);
367
    registerGenericUDF("ewah_bitmap_or", GenericUDFEWAHBitmapOr.class);
369
    registerGenericUDF("ewah_bitmap_or", GenericUDFEWAHBitmapOr.class);
368
    registerGenericUDF("ewah_bitmap_empty", GenericUDFEWAHBitmapEmpty.class);
370
    registerGenericUDF("ewah_bitmap_empty", GenericUDFEWAHBitmapEmpty.class);
369

    
   
371

   
[+20] [20] 853 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 e63516d 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...