Review Board 1.7.22


Implement IsNull and IsNotNull DrillFunctions

Review Request #13029 - Created July 29, 2013 and updated

Ben Becker
master
Reviewers
drill-git
drill-git
Implements IsNull and IsNotNull DrillFunctions with simple tests.

Also fixes a few tangential bugs.  To view in Github, see https://github.com/vrtx/incubator-drill/commits/NullOp.

 
sandbox/prototype/common/src/main/java/org/apache/drill/common/expression/OutputTypeDeterminer.java
Revision 0bec184 New Change
[20] 19 lines
[+20]
20
import java.util.List;
20
import java.util.List;
21

    
   
21

   
22
import org.apache.drill.common.types.TypeProtos.DataMode;
22
import org.apache.drill.common.types.TypeProtos.DataMode;
23
import org.apache.drill.common.types.TypeProtos.MajorType;
23
import org.apache.drill.common.types.TypeProtos.MajorType;
24
import org.apache.drill.common.types.TypeProtos.MinorType;
24
import org.apache.drill.common.types.TypeProtos.MinorType;

    
   
25
import org.apache.drill.common.types.Types;
25

    
   
26

   
26
public interface OutputTypeDeterminer {
27
public interface OutputTypeDeterminer {
27

    
   
28

   
28
  public static OutputTypeDeterminer FIXED_BOOLEAN = new FixedType(MajorType.newBuilder().setMinorType(MinorType.BOOLEAN).setMode(DataMode.REQUIRED).build());
29
  public static OutputTypeDeterminer FIXED_BOOLEAN = new FixedType(Types.required(MinorType.BOOLEAN));
29
  
30
  
30
  public MajorType getOutputType(List<LogicalExpression> expressions);
31
  public MajorType getOutputType(List<LogicalExpression> expressions);
31
  
32
  
32
  
33
  
33
  public static class FixedType implements OutputTypeDeterminer{
34
  public static class FixedType implements OutputTypeDeterminer{
[+20] [20] 36 lines
sandbox/prototype/exec/java-exec/src/main/codegen/ValueVectors/templates/NullableValueVectors.java
Revision dfec62e New Change
 
sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/EvaluationVisitor.java
Revision 664940d New Change
 
sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNotNull.java
New File
 
sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNull.java
New File
 
sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/Float8Holder.java
Revision 78e7cb8 New Change
 
sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/NullableFloat8Holder.java
Revision f8fa224 New Change
 
sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/MockRecordReader.java
Revision 687b28b New Change
 
sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/vector/BitVector.java
Revision 0f5b7d0 New Change
 
sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestSimpleFunctions.java
New File
 
sandbox/prototype/exec/java-exec/src/test/resources/functions/testIsNotNull.json
New File
 
sandbox/prototype/exec/java-exec/src/test/resources/functions/testIsNull.json
New File
 
  1. sandbox/prototype/common/src/main/java/org/apache/drill/common/expression/OutputTypeDeterminer.java: Loading...
  2. sandbox/prototype/exec/java-exec/src/main/codegen/ValueVectors/templates/NullableValueVectors.java: Loading...
  3. sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/EvaluationVisitor.java: Loading...
  4. sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNotNull.java: Loading...
  5. sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/IsNull.java: Loading...
  6. sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/Float8Holder.java: Loading...
  7. sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/expr/holders/NullableFloat8Holder.java: Loading...
  8. sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/MockRecordReader.java: Loading...
  9. sandbox/prototype/exec/java-exec/src/main/java/org/apache/drill/exec/vector/BitVector.java: Loading...
  10. sandbox/prototype/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestSimpleFunctions.java: Loading...
  11. sandbox/prototype/exec/java-exec/src/test/resources/functions/testIsNotNull.json: Loading...
  12. sandbox/prototype/exec/java-exec/src/test/resources/functions/testIsNull.json: Loading...