org.apache.hadoop.hive.ant
Class GenVectorTestCode

java.lang.Object
  extended by org.apache.hadoop.hive.ant.GenVectorTestCode

public class GenVectorTestCode
extends Object

GenVectorTestCode. This class is mutable and maintains a hashmap of TestSuiteClassName to test cases. The tests cases are added over the course of vectorized expressions class generation, with test classes being outputted at the end. For each column vector (inputs and/or outputs) a matrix of pairwise covering Booleans is used to generate test cases across nulls and repeating dimensions. Based on the input column vector(s) nulls and repeating states the states of the output column vector (if there is one) is validated, along with the null vector. For filter operations the selection vector is validated against the generated data. Each template corresponds to a class representing a test suite.


Nested Class Summary
static class GenVectorTestCode.TestSuiteClassName
           
 
Constructor Summary
GenVectorTestCode(String testOutputDir, String testTemplateDirectory)
           
 
Method Summary
 void addColumnColumnFilterTestCases(String vectorExpClassName, String inputColumnVectorType1, String inputColumnVectorType2, String operatorSymbol)
           
 void addColumnColumnOperationTestCases(String vectorExpClassName, String inputColumnVectorType1, String inputColumnVectorType2, String outputColumnVectorType)
           
 void addColumnScalarFilterTestCases(boolean op1IsCol, String vectorExpClassName, String inputColumnVectorType, String scalarType, String operatorSymbol)
           
 void addColumnScalarOperationTestCases(boolean op1IsCol, String vectorExpClassName, String inputColumnVectorType, String outputColumnVectorType, String scalarType)
           
 void generateTestSuites()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenVectorTestCode

public GenVectorTestCode(String testOutputDir,
                         String testTemplateDirectory)
Method Detail

addColumnScalarOperationTestCases

public void addColumnScalarOperationTestCases(boolean op1IsCol,
                                              String vectorExpClassName,
                                              String inputColumnVectorType,
                                              String outputColumnVectorType,
                                              String scalarType)
                                       throws IOException
Throws:
IOException

addColumnScalarFilterTestCases

public void addColumnScalarFilterTestCases(boolean op1IsCol,
                                           String vectorExpClassName,
                                           String inputColumnVectorType,
                                           String scalarType,
                                           String operatorSymbol)
                                    throws IOException
Throws:
IOException

addColumnColumnOperationTestCases

public void addColumnColumnOperationTestCases(String vectorExpClassName,
                                              String inputColumnVectorType1,
                                              String inputColumnVectorType2,
                                              String outputColumnVectorType)
                                       throws IOException
Throws:
IOException

addColumnColumnFilterTestCases

public void addColumnColumnFilterTestCases(String vectorExpClassName,
                                           String inputColumnVectorType1,
                                           String inputColumnVectorType2,
                                           String operatorSymbol)
                                    throws IOException
Throws:
IOException

generateTestSuites

public void generateTestSuites()
                        throws IOException
Throws:
IOException


Copyright © 2014 The Apache Software Foundation. All rights reserved.