commit cce85b53e18fb840aca917ef260ad09a2356dc8a Author: Jitendra Pandey Date: Fri Aug 16 11:05:27 2013 -0700 Revert "HIVE-4989 : Consolidate and simplify vectorization code and test generation (Tony Murphy via Ashutosh Chauhan)" This reverts commit e6f59f5d0711c52badc89868e4178a1b2ef54e53. diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/CodeGen.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/CodeGen.java index 4a4b0a9..a4c1999 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/CodeGen.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/CodeGen.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.hadoop.hive.ql.exec.vector.gen; +package org.apache.hadoop.hive.ql.exec.vector.expressions.templates; import java.io.BufferedReader; import java.io.BufferedWriter; @@ -267,10 +267,8 @@ }; - private final String expressionOutputDirectory; - private final String expressionTemplateDirectory; - private final String udafOutputDirectory; - private final String udafTemplateDirectory; + private final String templateDirectory; + private final String outputDirectory; private final TestCodeGen testCodeGen; static String joinPath(String...parts) { @@ -282,35 +280,16 @@ static String joinPath(String...parts) { } public CodeGen() { - File generationDirectory = new File(System.getProperty("user.dir")); - - expressionOutputDirectory = - new File( - joinPath( - generationDirectory.getAbsolutePath(),"..", "..", "java", "org", - "apache", "hadoop", "hive", "ql", "exec", "vector", - "expressions", "gen")).getAbsolutePath(); - - expressionTemplateDirectory = - joinPath(generationDirectory.getAbsolutePath(), "ExpressionTemplates"); - - udafOutputDirectory = - new File( - joinPath( - generationDirectory.getAbsolutePath(),"..", "..", "java", "org", - "apache", "hadoop", "hive", "ql", "exec", "vector", - "expressions", "aggregates", "gen")).getAbsolutePath(); - - udafTemplateDirectory = - joinPath(generationDirectory.getAbsolutePath(), "udafTemplates"); - - testCodeGen = new TestCodeGen( - new File( - joinPath( - generationDirectory.getAbsolutePath(), "..", "..","test", "org", - "apache", "hadoop", "hive", "ql", "exec", "vector", - "expressions", "gen")).getAbsolutePath(), - joinPath(generationDirectory.getAbsolutePath(), "TestTemplates")); + templateDirectory = System.getProperty("user.dir"); + File f = new File(templateDirectory); + outputDirectory = joinPath(f.getParent(), "gen"); + testCodeGen = new TestCodeGen(joinPath(f.getParent(), "test"), templateDirectory); + } + + public CodeGen(String templateDirectory, String outputDirectory, String testOutputDirectory) { + this.templateDirectory = templateDirectory; + this.outputDirectory = outputDirectory; + testCodeGen = new TestCodeGen(testOutputDirectory, templateDirectory); } /** @@ -318,7 +297,15 @@ public CodeGen() { * @throws Exception */ public static void main(String[] args) throws Exception { - CodeGen gen = new CodeGen(); + CodeGen gen; + if (args == null || args.length==0) { + gen = new CodeGen(); + } else if (args.length==3) { + gen = new CodeGen(args[0], args[1], args[2]); + }else{ + System.out.println("args: "); + return; + } gen.generate(); } @@ -374,8 +361,8 @@ private void generateVectorUDAFMinMax(String[] tdesc) throws Exception { String writableType = getOutputWritableType(valueType); String inspectorType = getOutputObjectInspector(valueType); - String outputFile = joinPath(this.udafOutputDirectory, className + ".java"); - String templateFile = joinPath(this.udafTemplateDirectory, tdesc[0] + ".txt"); + String outputFile = joinPath(this.outputDirectory, className + ".java"); + String templateFile = joinPath(this.templateDirectory, tdesc[0] + ".txt"); String templateString = readFile(templateFile); templateString = templateString.replaceAll("", className); @@ -396,8 +383,8 @@ private void generateVectorUDAFMinMaxString(String[] tdesc) throws Exception { String descName = tdesc[3]; String descValue = tdesc[4]; - String outputFile = joinPath(this.udafOutputDirectory, className + ".java"); - String templateFile = joinPath(this.udafTemplateDirectory, tdesc[0] + ".txt"); + String outputFile = joinPath(this.outputDirectory, className + ".java"); + String templateFile = joinPath(this.templateDirectory, tdesc[0] + ".txt"); String templateString = readFile(templateFile); templateString = templateString.replaceAll("", className); @@ -416,8 +403,8 @@ private void generateVectorUDAFSum(String[] tdesc) throws Exception { String writableType = getOutputWritableType(valueType); String inspectorType = getOutputObjectInspector(valueType); - String outputFile = joinPath(this.udafOutputDirectory, className + ".java"); - String templateFile = joinPath(this.udafTemplateDirectory, tdesc[0] + ".txt"); + String outputFile = joinPath(this.outputDirectory, className + ".java"); + String templateFile = joinPath(this.templateDirectory, tdesc[0] + ".txt"); String templateString = readFile(templateFile); templateString = templateString.replaceAll("", className); @@ -433,8 +420,8 @@ private void generateVectorUDAFAvg(String[] tdesc) throws IOException { String valueType = tdesc[2]; String columnType = getColumnVectorType(valueType); - String outputFile = joinPath(this.udafOutputDirectory, className + ".java"); - String templateFile = joinPath(this.udafTemplateDirectory, tdesc[0] + ".txt"); + String outputFile = joinPath(this.outputDirectory, className + ".java"); + String templateFile = joinPath(this.templateDirectory, tdesc[0] + ".txt"); String templateString = readFile(templateFile); templateString = templateString.replaceAll("", className); @@ -451,8 +438,8 @@ private void generateVectorUDAFVar(String[] tdesc) throws IOException { String descriptionValue = tdesc[5]; String columnType = getColumnVectorType(valueType); - String outputFile = joinPath(this.udafOutputDirectory, className + ".java"); - String templateFile = joinPath(this.udafTemplateDirectory, tdesc[0] + ".txt"); + String outputFile = joinPath(this.outputDirectory, className + ".java"); + String templateFile = joinPath(this.templateDirectory, tdesc[0] + ".txt"); String templateString = readFile(templateFile); templateString = templateString.replaceAll("", className); @@ -487,9 +474,9 @@ private void generateFilterStringColumnCompareColumn(String[] tdesc) throws IOEx private void generateFilterStringColumnCompareScalar(String[] tdesc, String className) throws IOException { String operatorSymbol = tdesc[2]; - String outputFile = joinPath(this.expressionOutputDirectory, className + ".java"); + String outputFile = joinPath(this.outputDirectory, className + ".java"); // Read the template into a string; - String templateFile = joinPath(this.expressionTemplateDirectory, tdesc[0] + ".txt"); + String templateFile = joinPath(this.templateDirectory, tdesc[0] + ".txt"); String templateString = readFile(templateFile); // Expand, and write result templateString = templateString.replaceAll("", className); @@ -514,8 +501,8 @@ private void generateColumnUnaryMinus(String[] tdesc) throws IOException { String outputColumnVectorType = inputColumnVectorType; String returnType = operandType; String className = getCamelCaseType(operandType) + "ColUnaryMinus"; - String outputFile = joinPath(this.expressionOutputDirectory, className + ".java"); - String templateFile = joinPath(this.expressionTemplateDirectory, tdesc[0] + ".txt"); + String outputFile = joinPath(this.outputDirectory, className + ".java"); + String templateFile = joinPath(this.templateDirectory, tdesc[0] + ".txt"); String templateString = readFile(templateFile); // Expand, and write result templateString = templateString.replaceAll("", className); @@ -575,10 +562,10 @@ private void generateColumnBinaryOperatorColumn(String[] tdesc, String returnTyp String inputColumnVectorType1 = this.getColumnVectorType(operandType1); String inputColumnVectorType2 = this.getColumnVectorType(operandType2); String operatorSymbol = tdesc[4]; - String outputFile = joinPath(this.expressionOutputDirectory, className + ".java"); + String outputFile = joinPath(this.outputDirectory, className + ".java"); //Read the template into a string; - String templateFile = joinPath(this.expressionTemplateDirectory, tdesc[0] + ".txt"); + String templateFile = joinPath(this.templateDirectory, tdesc[0] + ".txt"); String templateString = readFile(templateFile); templateString = templateString.replaceAll("", className); templateString = templateString.replaceAll("", inputColumnVectorType1); @@ -613,10 +600,10 @@ private void generateColumnBinaryOperatorScalar(String[] tdesc, String returnTyp String outputColumnVectorType = this.getColumnVectorType(returnType); String inputColumnVectorType = this.getColumnVectorType(operandType1); String operatorSymbol = tdesc[4]; - String outputFile = joinPath(this.expressionOutputDirectory, className + ".java"); + String outputFile = joinPath(this.outputDirectory, className + ".java"); //Read the template into a string; - String templateFile = joinPath(this.expressionTemplateDirectory, tdesc[0] + ".txt"); + String templateFile = joinPath(this.templateDirectory, tdesc[0] + ".txt"); String templateString = readFile(templateFile); templateString = templateString.replaceAll("", className); templateString = templateString.replaceAll("", inputColumnVectorType); @@ -651,10 +638,10 @@ private void generateScalarBinaryOperatorColumn(String[] tdesc, String returnTyp String outputColumnVectorType = this.getColumnVectorType(returnType); String inputColumnVectorType = this.getColumnVectorType(operandType2); String operatorSymbol = tdesc[4]; - String outputFile = joinPath(this.expressionOutputDirectory, className + ".java"); + String outputFile = joinPath(this.outputDirectory, className + ".java"); //Read the template into a string; - String templateFile = joinPath(this.expressionTemplateDirectory, tdesc[0] + ".txt"); + String templateFile = joinPath(this.templateDirectory, tdesc[0] + ".txt"); String templateString = readFile(templateFile); templateString = templateString.replaceAll("", className); templateString = templateString.replaceAll("", inputColumnVectorType); diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/TestCodeGen.java ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/TestCodeGen.java index 908b8e8..34c093c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/TestCodeGen.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/TestCodeGen.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.hadoop.hive.ql.exec.vector.gen; +package org.apache.hadoop.hive.ql.exec.vector.expressions.templates; import java.io.IOException; import java.util.HashMap; @@ -43,12 +43,12 @@ } private final String testOutputDir; - private final String testTemplateDirectory; + private final String templateDirectory; private final HashMap testsuites; - public TestCodeGen(String testOutputDir, String testTemplateDirectory) { + public TestCodeGen(String testOutputDir, String templateDirectory) { this.testOutputDir = testOutputDir; - this.testTemplateDirectory = testTemplateDirectory; + this.templateDirectory = templateDirectory; testsuites = new HashMap(); for(TestSuiteClassName className : TestSuiteClassName.values()) { @@ -65,7 +65,7 @@ public void addColumnScalarOperationTestCases(boolean op1IsCol, String vectorExp TestSuiteClassName.TestColumnScalarOperationVectorExpressionEvaluation; //Read the template into a string; - String templateFile = CodeGen.joinPath(this.testTemplateDirectory,template.toString()+".txt"); + String templateFile = CodeGen.joinPath(this.templateDirectory,template.toString()+".txt"); String templateString = removeTemplateComments(CodeGen.readFile(templateFile)); for(Boolean[] testMatrix :new Boolean[][]{ @@ -109,7 +109,7 @@ public void addColumnScalarFilterTestCases(boolean op1IsCol, String vectorExpCla TestSuiteClassName.TestColumnScalarFilterVectorExpressionEvaluation; //Read the template into a string; - String templateFile = CodeGen.joinPath(this.testTemplateDirectory,template.toString()+".txt"); + String templateFile = CodeGen.joinPath(this.templateDirectory,template.toString()+".txt"); String templateString = removeTemplateComments(CodeGen.readFile(templateFile)); for(Boolean[] testMatrix : new Boolean[][]{ @@ -132,11 +132,9 @@ public void addColumnScalarFilterTestCases(boolean op1IsCol, String vectorExpCla testCase = testCase.replaceAll("", operatorSymbol); if(op1IsCol){ - testCase = testCase.replaceAll("","inputColumnVector.vector[i]"); - testCase = testCase.replaceAll("","scalarValue"); + testCase = testCase.replaceAll("","0, scalarValue"); }else{ - testCase = testCase.replaceAll("","scalarValue"); - testCase = testCase.replaceAll("","inputColumnVector.vector[i]"); + testCase = testCase.replaceAll("","scalarValue, 0"); } testsuites.get(template).append(testCase); @@ -151,7 +149,7 @@ public void addColumnColumnOperationTestCases(String vectorExpClassName, TestSuiteClassName.TestColumnColumnOperationVectorExpressionEvaluation; //Read the template into a string; - String templateFile = CodeGen.joinPath(this.testTemplateDirectory,template.toString()+".txt"); + String templateFile = CodeGen.joinPath(this.templateDirectory,template.toString()+".txt"); String templateString = removeTemplateComments(CodeGen.readFile(templateFile)); for(Boolean[] testMatrix : new Boolean[][]{ @@ -193,7 +191,7 @@ public void addColumnColumnFilterTestCases(String vectorExpClassName, TestSuiteClassName.TestColumnColumnFilterVectorExpressionEvaluation; //Read the template into a string; - String templateFile = CodeGen.joinPath(this.testTemplateDirectory,template.toString()+".txt"); + String templateFile = CodeGen.joinPath(this.templateDirectory,template.toString()+".txt"); String templateString = removeTemplateComments(CodeGen.readFile(templateFile)); for(Boolean[] testMatrix : new Boolean[][]{ @@ -224,7 +222,7 @@ public void addColumnColumnFilterTestCases(String vectorExpClassName, public void generateTestSuites() throws IOException { - String templateFile = CodeGen.joinPath(this.testTemplateDirectory, "TestClass.txt"); + String templateFile = CodeGen.joinPath(this.templateDirectory, "TestClass.txt"); for(TestSuiteClassName testClass : testsuites.keySet()) { String templateString = CodeGen.readFile(templateFile); diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/TestColumnScalarFilterVectorExpressionEvaluation.txt ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/TestColumnScalarFilterVectorExpressionEvaluation.txt index af30490..5b53d6a 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/TestColumnScalarFilterVectorExpressionEvaluation.txt +++ ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/templates/TestColumnScalarFilterVectorExpressionEvaluation.txt @@ -32,27 +32,25 @@ } while(scalarValue == 0); vectorExpression = - new (0, scalarValue); + new (); vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { - if( ) { + if(inputColumnVector.vector[i] scalarValue) { assertEquals( "Vector index that passes filter " - + + "" - + + " is not in rowBatch selected index", + + inputColumnVector.vector[i] + "" + + scalarValue + " is not in rowBatch selected index", i, rowBatch.selected[selectedIndex]); selectedIndex++; diff --git ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/TestColumnColumnOperationVectorExpressionEvaluation.java ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/TestColumnColumnOperationVectorExpressionEvaluation.java index 65caba0..dd2cc09 100644 --- ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/TestColumnColumnOperationVectorExpressionEvaluation.java +++ ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/TestColumnColumnOperationVectorExpressionEvaluation.java @@ -76,7 +76,6 @@ public void testLongColAddLongColumnOutNullsRepeatsC1RepeatsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -125,7 +124,6 @@ public void testLongColAddLongColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -174,7 +172,6 @@ public void testLongColAddLongColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -223,7 +220,6 @@ public void testLongColAddLongColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -272,7 +268,6 @@ public void testLongColAddLongColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -321,7 +316,6 @@ public void testLongColAddLongColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -370,7 +364,6 @@ public void testLongColSubtractLongColumnOutNullsRepeatsC1RepeatsC2NullsRepeats( "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -419,7 +412,6 @@ public void testLongColSubtractLongColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -468,7 +460,6 @@ public void testLongColSubtractLongColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -517,7 +508,6 @@ public void testLongColSubtractLongColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -566,7 +556,6 @@ public void testLongColSubtractLongColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -615,7 +604,6 @@ public void testLongColSubtractLongColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -664,7 +652,6 @@ public void testLongColMultiplyLongColumnOutNullsRepeatsC1RepeatsC2NullsRepeats( "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -713,7 +700,6 @@ public void testLongColMultiplyLongColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -762,7 +748,6 @@ public void testLongColMultiplyLongColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -811,7 +796,6 @@ public void testLongColMultiplyLongColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -860,7 +844,6 @@ public void testLongColMultiplyLongColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -909,7 +892,6 @@ public void testLongColMultiplyLongColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -958,7 +940,6 @@ public void testLongColModuloLongColumnOutNullsRepeatsC1RepeatsC2NullsRepeats() "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1007,7 +988,6 @@ public void testLongColModuloLongColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1056,7 +1036,6 @@ public void testLongColModuloLongColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1105,7 +1084,6 @@ public void testLongColModuloLongColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1154,7 +1132,6 @@ public void testLongColModuloLongColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1203,7 +1180,6 @@ public void testLongColModuloLongColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1252,7 +1228,6 @@ public void testLongColAddDoubleColumnOutNullsRepeatsC1RepeatsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1301,7 +1276,6 @@ public void testLongColAddDoubleColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1350,7 +1324,6 @@ public void testLongColAddDoubleColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1399,7 +1372,6 @@ public void testLongColAddDoubleColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1448,7 +1420,6 @@ public void testLongColAddDoubleColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1497,7 +1468,6 @@ public void testLongColAddDoubleColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1546,7 +1516,6 @@ public void testLongColSubtractDoubleColumnOutNullsRepeatsC1RepeatsC2NullsRepeat "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1595,7 +1564,6 @@ public void testLongColSubtractDoubleColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1644,7 +1612,6 @@ public void testLongColSubtractDoubleColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1693,7 +1660,6 @@ public void testLongColSubtractDoubleColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1742,7 +1708,6 @@ public void testLongColSubtractDoubleColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1791,7 +1756,6 @@ public void testLongColSubtractDoubleColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1840,7 +1804,6 @@ public void testLongColMultiplyDoubleColumnOutNullsRepeatsC1RepeatsC2NullsRepeat "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1889,7 +1852,6 @@ public void testLongColMultiplyDoubleColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1938,7 +1900,6 @@ public void testLongColMultiplyDoubleColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -1987,7 +1948,6 @@ public void testLongColMultiplyDoubleColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2036,7 +1996,6 @@ public void testLongColMultiplyDoubleColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2085,7 +2044,6 @@ public void testLongColMultiplyDoubleColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2134,7 +2092,6 @@ public void testLongColDivideDoubleColumnOutNullsRepeatsC1RepeatsC2NullsRepeats( "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2183,7 +2140,6 @@ public void testLongColDivideDoubleColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2232,7 +2188,6 @@ public void testLongColDivideDoubleColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2281,7 +2236,6 @@ public void testLongColDivideDoubleColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2330,7 +2284,6 @@ public void testLongColDivideDoubleColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2379,7 +2332,6 @@ public void testLongColDivideDoubleColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2428,7 +2380,6 @@ public void testLongColModuloDoubleColumnOutNullsRepeatsC1RepeatsC2NullsRepeats( "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2477,7 +2428,6 @@ public void testLongColModuloDoubleColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2526,7 +2476,6 @@ public void testLongColModuloDoubleColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2575,7 +2524,6 @@ public void testLongColModuloDoubleColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2624,7 +2572,6 @@ public void testLongColModuloDoubleColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2673,7 +2620,6 @@ public void testLongColModuloDoubleColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2722,7 +2668,6 @@ public void testDoubleColAddLongColumnOutNullsRepeatsC1RepeatsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2771,7 +2716,6 @@ public void testDoubleColAddLongColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2820,7 +2764,6 @@ public void testDoubleColAddLongColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2869,7 +2812,6 @@ public void testDoubleColAddLongColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2918,7 +2860,6 @@ public void testDoubleColAddLongColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -2967,7 +2908,6 @@ public void testDoubleColAddLongColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3016,7 +2956,6 @@ public void testDoubleColSubtractLongColumnOutNullsRepeatsC1RepeatsC2NullsRepeat "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3065,7 +3004,6 @@ public void testDoubleColSubtractLongColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3114,7 +3052,6 @@ public void testDoubleColSubtractLongColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3163,7 +3100,6 @@ public void testDoubleColSubtractLongColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3212,7 +3148,6 @@ public void testDoubleColSubtractLongColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3261,7 +3196,6 @@ public void testDoubleColSubtractLongColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3310,7 +3244,6 @@ public void testDoubleColMultiplyLongColumnOutNullsRepeatsC1RepeatsC2NullsRepeat "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3359,7 +3292,6 @@ public void testDoubleColMultiplyLongColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3408,7 +3340,6 @@ public void testDoubleColMultiplyLongColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3457,7 +3388,6 @@ public void testDoubleColMultiplyLongColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3506,7 +3436,6 @@ public void testDoubleColMultiplyLongColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3555,7 +3484,6 @@ public void testDoubleColMultiplyLongColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3604,7 +3532,6 @@ public void testDoubleColDivideLongColumnOutNullsRepeatsC1RepeatsC2NullsRepeats( "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3653,7 +3580,6 @@ public void testDoubleColDivideLongColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3702,7 +3628,6 @@ public void testDoubleColDivideLongColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3751,7 +3676,6 @@ public void testDoubleColDivideLongColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3800,7 +3724,6 @@ public void testDoubleColDivideLongColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3849,7 +3772,6 @@ public void testDoubleColDivideLongColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3898,7 +3820,6 @@ public void testDoubleColModuloLongColumnOutNullsRepeatsC1RepeatsC2NullsRepeats( "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3947,7 +3868,6 @@ public void testDoubleColModuloLongColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -3996,7 +3916,6 @@ public void testDoubleColModuloLongColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4045,7 +3964,6 @@ public void testDoubleColModuloLongColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4094,7 +4012,6 @@ public void testDoubleColModuloLongColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4143,7 +4060,6 @@ public void testDoubleColModuloLongColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4192,7 +4108,6 @@ public void testDoubleColAddDoubleColumnOutNullsRepeatsC1RepeatsC2NullsRepeats() "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4241,7 +4156,6 @@ public void testDoubleColAddDoubleColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4290,7 +4204,6 @@ public void testDoubleColAddDoubleColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4339,7 +4252,6 @@ public void testDoubleColAddDoubleColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4388,7 +4300,6 @@ public void testDoubleColAddDoubleColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4437,7 +4348,6 @@ public void testDoubleColAddDoubleColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4486,7 +4396,6 @@ public void testDoubleColSubtractDoubleColumnOutNullsRepeatsC1RepeatsC2NullsRepe "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4535,7 +4444,6 @@ public void testDoubleColSubtractDoubleColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4584,7 +4492,6 @@ public void testDoubleColSubtractDoubleColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4633,7 +4540,6 @@ public void testDoubleColSubtractDoubleColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4682,7 +4588,6 @@ public void testDoubleColSubtractDoubleColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4731,7 +4636,6 @@ public void testDoubleColSubtractDoubleColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4780,7 +4684,6 @@ public void testDoubleColMultiplyDoubleColumnOutNullsRepeatsC1RepeatsC2NullsRepe "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4829,7 +4732,6 @@ public void testDoubleColMultiplyDoubleColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4878,7 +4780,6 @@ public void testDoubleColMultiplyDoubleColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4927,7 +4828,6 @@ public void testDoubleColMultiplyDoubleColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -4976,7 +4876,6 @@ public void testDoubleColMultiplyDoubleColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5025,7 +4924,6 @@ public void testDoubleColMultiplyDoubleColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5074,7 +4972,6 @@ public void testDoubleColDivideDoubleColumnOutNullsRepeatsC1RepeatsC2NullsRepeat "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5123,7 +5020,6 @@ public void testDoubleColDivideDoubleColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5172,7 +5068,6 @@ public void testDoubleColDivideDoubleColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5221,7 +5116,6 @@ public void testDoubleColDivideDoubleColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5270,7 +5164,6 @@ public void testDoubleColDivideDoubleColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5319,7 +5212,6 @@ public void testDoubleColDivideDoubleColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5368,7 +5260,6 @@ public void testDoubleColModuloDoubleColumnOutNullsRepeatsC1RepeatsC2NullsRepeat "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5417,7 +5308,6 @@ public void testDoubleColModuloDoubleColumnC1Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5466,7 +5356,6 @@ public void testDoubleColModuloDoubleColumnOutNullsC1NullsC2NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5515,7 +5404,6 @@ public void testDoubleColModuloDoubleColumnOutNullsRepeatsC1NullsRepeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5564,7 +5452,6 @@ public void testDoubleColModuloDoubleColumnC1RepeatsC2Nulls() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector @@ -5613,7 +5500,6 @@ public void testDoubleColModuloDoubleColumnOutRepeatsC2Repeats() { "Output column vector no nulls state does not match operand columns", inputColumnVector1.noNulls && inputColumnVector2.noNulls, outputColumnVector.noNulls); - //if repeating, only the first value matters if(!outputColumnVector.noNulls && !outputColumnVector.isRepeating) { for(int i = 0; i < BATCH_SIZE; i++) { //null vectors are safe to check, as they are always initialized to match the data vector diff --git ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/TestColumnScalarFilterVectorExpressionEvaluation.java ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/TestColumnScalarFilterVectorExpressionEvaluation.java index 103985e..6baa444 100644 --- ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/TestColumnScalarFilterVectorExpressionEvaluation.java +++ ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/gen/TestColumnScalarFilterVectorExpressionEvaluation.java @@ -60,17 +60,15 @@ public void testFilterLongColEqualDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -123,17 +121,15 @@ public void testFilterLongColEqualDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -186,17 +182,15 @@ public void testFilterLongColEqualDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -249,17 +243,15 @@ public void testFilterLongColEqualDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -312,17 +304,15 @@ public void testFilterDoubleColEqualDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -375,17 +365,15 @@ public void testFilterDoubleColEqualDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -438,17 +426,15 @@ public void testFilterDoubleColEqualDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -501,17 +487,15 @@ public void testFilterDoubleColEqualDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -564,17 +548,15 @@ public void testFilterLongColNotEqualDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -627,17 +609,15 @@ public void testFilterLongColNotEqualDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -690,17 +670,15 @@ public void testFilterLongColNotEqualDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -753,17 +731,15 @@ public void testFilterLongColNotEqualDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -816,17 +792,15 @@ public void testFilterDoubleColNotEqualDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -879,17 +853,15 @@ public void testFilterDoubleColNotEqualDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -942,17 +914,15 @@ public void testFilterDoubleColNotEqualDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -1005,17 +975,15 @@ public void testFilterDoubleColNotEqualDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -1068,17 +1036,15 @@ public void testFilterLongColLessDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -1131,17 +1097,15 @@ public void testFilterLongColLessDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -1194,17 +1158,15 @@ public void testFilterLongColLessDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -1257,17 +1219,15 @@ public void testFilterLongColLessDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -1320,17 +1280,15 @@ public void testFilterDoubleColLessDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -1383,17 +1341,15 @@ public void testFilterDoubleColLessDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -1446,17 +1402,15 @@ public void testFilterDoubleColLessDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -1509,17 +1463,15 @@ public void testFilterDoubleColLessDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -1572,17 +1524,15 @@ public void testFilterLongColLessEqualDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -1635,17 +1585,15 @@ public void testFilterLongColLessEqualDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -1698,17 +1646,15 @@ public void testFilterLongColLessEqualDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -1761,17 +1707,15 @@ public void testFilterLongColLessEqualDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -1824,17 +1768,15 @@ public void testFilterDoubleColLessEqualDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -1887,17 +1829,15 @@ public void testFilterDoubleColLessEqualDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -1950,17 +1890,15 @@ public void testFilterDoubleColLessEqualDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -2013,17 +1951,15 @@ public void testFilterDoubleColLessEqualDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -2076,17 +2012,15 @@ public void testFilterLongColGreaterDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -2139,17 +2073,15 @@ public void testFilterLongColGreaterDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -2202,17 +2134,15 @@ public void testFilterLongColGreaterDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -2265,17 +2195,15 @@ public void testFilterLongColGreaterDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -2328,17 +2256,15 @@ public void testFilterDoubleColGreaterDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -2391,17 +2317,15 @@ public void testFilterDoubleColGreaterDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -2454,17 +2378,15 @@ public void testFilterDoubleColGreaterDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -2517,17 +2439,15 @@ public void testFilterDoubleColGreaterDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -2580,17 +2500,15 @@ public void testFilterLongColGreaterEqualDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -2643,17 +2561,15 @@ public void testFilterLongColGreaterEqualDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -2706,17 +2622,15 @@ public void testFilterLongColGreaterEqualDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -2769,17 +2683,15 @@ public void testFilterLongColGreaterEqualDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -2832,17 +2744,15 @@ public void testFilterDoubleColGreaterEqualDoubleScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -2895,17 +2805,15 @@ public void testFilterDoubleColGreaterEqualDoubleScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -2958,17 +2866,15 @@ public void testFilterDoubleColGreaterEqualDoubleScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -3021,17 +2927,15 @@ public void testFilterDoubleColGreaterEqualDoubleScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -3084,17 +2988,15 @@ public void testFilterLongColEqualLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -3147,17 +3049,15 @@ public void testFilterLongColEqualLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -3210,17 +3110,15 @@ public void testFilterLongColEqualLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -3273,17 +3171,15 @@ public void testFilterLongColEqualLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -3336,17 +3232,15 @@ public void testFilterDoubleColEqualLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -3399,17 +3293,15 @@ public void testFilterDoubleColEqualLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -3462,17 +3354,15 @@ public void testFilterDoubleColEqualLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -3525,17 +3415,15 @@ public void testFilterDoubleColEqualLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] == scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] == scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] == scalarValue) { assertEquals( @@ -3588,17 +3476,15 @@ public void testFilterLongColNotEqualLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -3651,17 +3537,15 @@ public void testFilterLongColNotEqualLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -3714,17 +3598,15 @@ public void testFilterLongColNotEqualLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -3777,17 +3659,15 @@ public void testFilterLongColNotEqualLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -3840,17 +3720,15 @@ public void testFilterDoubleColNotEqualLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -3903,17 +3781,15 @@ public void testFilterDoubleColNotEqualLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -3966,17 +3842,15 @@ public void testFilterDoubleColNotEqualLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -4029,17 +3903,15 @@ public void testFilterDoubleColNotEqualLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] != scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] != scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] != scalarValue) { assertEquals( @@ -4092,17 +3964,15 @@ public void testFilterLongColLessLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -4155,17 +4025,15 @@ public void testFilterLongColLessLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -4218,17 +4086,15 @@ public void testFilterLongColLessLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -4281,17 +4147,15 @@ public void testFilterLongColLessLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -4344,17 +4208,15 @@ public void testFilterDoubleColLessLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -4407,17 +4269,15 @@ public void testFilterDoubleColLessLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -4470,17 +4330,15 @@ public void testFilterDoubleColLessLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -4533,17 +4391,15 @@ public void testFilterDoubleColLessLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] < scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] < scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] < scalarValue) { assertEquals( @@ -4596,17 +4452,15 @@ public void testFilterLongColLessEqualLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -4659,17 +4513,15 @@ public void testFilterLongColLessEqualLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -4722,17 +4574,15 @@ public void testFilterLongColLessEqualLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -4785,17 +4635,15 @@ public void testFilterLongColLessEqualLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -4848,17 +4696,15 @@ public void testFilterDoubleColLessEqualLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -4911,17 +4757,15 @@ public void testFilterDoubleColLessEqualLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -4974,17 +4818,15 @@ public void testFilterDoubleColLessEqualLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -5037,17 +4879,15 @@ public void testFilterDoubleColLessEqualLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] <= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] <= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] <= scalarValue) { assertEquals( @@ -5100,17 +4940,15 @@ public void testFilterLongColGreaterLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -5163,17 +5001,15 @@ public void testFilterLongColGreaterLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -5226,17 +5062,15 @@ public void testFilterLongColGreaterLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -5289,17 +5123,15 @@ public void testFilterLongColGreaterLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -5352,17 +5184,15 @@ public void testFilterDoubleColGreaterLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -5415,17 +5245,15 @@ public void testFilterDoubleColGreaterLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -5478,17 +5306,15 @@ public void testFilterDoubleColGreaterLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -5541,17 +5367,15 @@ public void testFilterDoubleColGreaterLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] > scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] > scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] > scalarValue) { assertEquals( @@ -5604,17 +5428,15 @@ public void testFilterLongColGreaterEqualLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -5667,17 +5489,15 @@ public void testFilterLongColGreaterEqualLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -5730,17 +5550,15 @@ public void testFilterLongColGreaterEqualLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -5793,17 +5611,15 @@ public void testFilterLongColGreaterEqualLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -5856,17 +5672,15 @@ public void testFilterDoubleColGreaterEqualLongScalarColNullsRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -5919,17 +5733,15 @@ public void testFilterDoubleColGreaterEqualLongScalarColNulls() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -5982,17 +5794,15 @@ public void testFilterDoubleColGreaterEqualLongScalar() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -6045,17 +5855,15 @@ public void testFilterDoubleColGreaterEqualLongScalarColRepeats() { vectorExpression.evaluate(rowBatch); - int selectedIndex = 0; - int i=0; //check for isRepeating optimization if(inputColumnVector.isRepeating) { //null vector is safe to check, as it is always initialized to match the data vector selectedIndex = - !inputColumnVector.isNull[i] && inputColumnVector.vector[i] >= scalarValue + !inputColumnVector.isNull[0] && inputColumnVector.vector[0] >= scalarValue ? BATCH_SIZE : 0; } else { - for(i = 0; i < BATCH_SIZE; i++) { + for(int i = 0; i < BATCH_SIZE; i++) { if(!inputColumnVector.isNull[i]) { if(inputColumnVector.vector[i] >= scalarValue) { assertEquals( @@ -6086,6054 +5894,6 @@ public void testFilterDoubleColGreaterEqualLongScalarColRepeats() { } } - @Test - public void testFilterLongScalarEqualDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarEqualDoubleColumn vectorExpression = - new FilterLongScalarEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarEqualDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarEqualDoubleColumn vectorExpression = - new FilterLongScalarEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarEqualDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarEqualDoubleColumn vectorExpression = - new FilterLongScalarEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarEqualDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarEqualDoubleColumn vectorExpression = - new FilterLongScalarEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarEqualDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarEqualDoubleColumn vectorExpression = - new FilterDoubleScalarEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarEqualDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarEqualDoubleColumn vectorExpression = - new FilterDoubleScalarEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarEqualDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarEqualDoubleColumn vectorExpression = - new FilterDoubleScalarEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarEqualDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarEqualDoubleColumn vectorExpression = - new FilterDoubleScalarEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarNotEqualDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarNotEqualDoubleColumn vectorExpression = - new FilterLongScalarNotEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarNotEqualDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarNotEqualDoubleColumn vectorExpression = - new FilterLongScalarNotEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarNotEqualDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarNotEqualDoubleColumn vectorExpression = - new FilterLongScalarNotEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarNotEqualDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarNotEqualDoubleColumn vectorExpression = - new FilterLongScalarNotEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarNotEqualDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarNotEqualDoubleColumn vectorExpression = - new FilterDoubleScalarNotEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarNotEqualDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarNotEqualDoubleColumn vectorExpression = - new FilterDoubleScalarNotEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarNotEqualDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarNotEqualDoubleColumn vectorExpression = - new FilterDoubleScalarNotEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarNotEqualDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarNotEqualDoubleColumn vectorExpression = - new FilterDoubleScalarNotEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessDoubleColumn vectorExpression = - new FilterLongScalarLessDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessDoubleColumn vectorExpression = - new FilterLongScalarLessDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessDoubleColumn vectorExpression = - new FilterLongScalarLessDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessDoubleColumn vectorExpression = - new FilterLongScalarLessDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessDoubleColumn vectorExpression = - new FilterDoubleScalarLessDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessDoubleColumn vectorExpression = - new FilterDoubleScalarLessDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessDoubleColumn vectorExpression = - new FilterDoubleScalarLessDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessDoubleColumn vectorExpression = - new FilterDoubleScalarLessDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessEqualDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessEqualDoubleColumn vectorExpression = - new FilterLongScalarLessEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessEqualDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessEqualDoubleColumn vectorExpression = - new FilterLongScalarLessEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessEqualDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessEqualDoubleColumn vectorExpression = - new FilterLongScalarLessEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessEqualDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessEqualDoubleColumn vectorExpression = - new FilterLongScalarLessEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessEqualDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessEqualDoubleColumn vectorExpression = - new FilterDoubleScalarLessEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessEqualDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessEqualDoubleColumn vectorExpression = - new FilterDoubleScalarLessEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessEqualDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessEqualDoubleColumn vectorExpression = - new FilterDoubleScalarLessEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessEqualDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessEqualDoubleColumn vectorExpression = - new FilterDoubleScalarLessEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterDoubleColumn vectorExpression = - new FilterLongScalarGreaterDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterDoubleColumn vectorExpression = - new FilterLongScalarGreaterDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterDoubleColumn vectorExpression = - new FilterLongScalarGreaterDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterDoubleColumn vectorExpression = - new FilterLongScalarGreaterDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterDoubleColumn vectorExpression = - new FilterDoubleScalarGreaterDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterDoubleColumn vectorExpression = - new FilterDoubleScalarGreaterDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterDoubleColumn vectorExpression = - new FilterDoubleScalarGreaterDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterDoubleColumn vectorExpression = - new FilterDoubleScalarGreaterDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterEqualDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterEqualDoubleColumn vectorExpression = - new FilterLongScalarGreaterEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterEqualDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterEqualDoubleColumn vectorExpression = - new FilterLongScalarGreaterEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterEqualDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterEqualDoubleColumn vectorExpression = - new FilterLongScalarGreaterEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterEqualDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterEqualDoubleColumn vectorExpression = - new FilterLongScalarGreaterEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterEqualDoubleColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterEqualDoubleColumn vectorExpression = - new FilterDoubleScalarGreaterEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterEqualDoubleColumnColNulls() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterEqualDoubleColumn vectorExpression = - new FilterDoubleScalarGreaterEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterEqualDoubleColumn() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterEqualDoubleColumn vectorExpression = - new FilterDoubleScalarGreaterEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterEqualDoubleColumnColRepeats() { - - Random rand = new Random(SEED); - - DoubleColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateDoubleColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterEqualDoubleColumn vectorExpression = - new FilterDoubleScalarGreaterEqualDoubleColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarEqualLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarEqualLongColumn vectorExpression = - new FilterLongScalarEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarEqualLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarEqualLongColumn vectorExpression = - new FilterLongScalarEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarEqualLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarEqualLongColumn vectorExpression = - new FilterLongScalarEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarEqualLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarEqualLongColumn vectorExpression = - new FilterLongScalarEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarEqualLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarEqualLongColumn vectorExpression = - new FilterDoubleScalarEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarEqualLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarEqualLongColumn vectorExpression = - new FilterDoubleScalarEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarEqualLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarEqualLongColumn vectorExpression = - new FilterDoubleScalarEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarEqualLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarEqualLongColumn vectorExpression = - new FilterDoubleScalarEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue == inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue == inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "==" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarNotEqualLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarNotEqualLongColumn vectorExpression = - new FilterLongScalarNotEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarNotEqualLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarNotEqualLongColumn vectorExpression = - new FilterLongScalarNotEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarNotEqualLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarNotEqualLongColumn vectorExpression = - new FilterLongScalarNotEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarNotEqualLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarNotEqualLongColumn vectorExpression = - new FilterLongScalarNotEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarNotEqualLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarNotEqualLongColumn vectorExpression = - new FilterDoubleScalarNotEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarNotEqualLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarNotEqualLongColumn vectorExpression = - new FilterDoubleScalarNotEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarNotEqualLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarNotEqualLongColumn vectorExpression = - new FilterDoubleScalarNotEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarNotEqualLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarNotEqualLongColumn vectorExpression = - new FilterDoubleScalarNotEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue != inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue != inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "!=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessLongColumn vectorExpression = - new FilterLongScalarLessLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessLongColumn vectorExpression = - new FilterLongScalarLessLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessLongColumn vectorExpression = - new FilterLongScalarLessLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessLongColumn vectorExpression = - new FilterLongScalarLessLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessLongColumn vectorExpression = - new FilterDoubleScalarLessLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessLongColumn vectorExpression = - new FilterDoubleScalarLessLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessLongColumn vectorExpression = - new FilterDoubleScalarLessLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessLongColumn vectorExpression = - new FilterDoubleScalarLessLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue < inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue < inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessEqualLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessEqualLongColumn vectorExpression = - new FilterLongScalarLessEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessEqualLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessEqualLongColumn vectorExpression = - new FilterLongScalarLessEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessEqualLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessEqualLongColumn vectorExpression = - new FilterLongScalarLessEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarLessEqualLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarLessEqualLongColumn vectorExpression = - new FilterLongScalarLessEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessEqualLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessEqualLongColumn vectorExpression = - new FilterDoubleScalarLessEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessEqualLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessEqualLongColumn vectorExpression = - new FilterDoubleScalarLessEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessEqualLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessEqualLongColumn vectorExpression = - new FilterDoubleScalarLessEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarLessEqualLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarLessEqualLongColumn vectorExpression = - new FilterDoubleScalarLessEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue <= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue <= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + "<=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterLongColumn vectorExpression = - new FilterLongScalarGreaterLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterLongColumn vectorExpression = - new FilterLongScalarGreaterLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterLongColumn vectorExpression = - new FilterLongScalarGreaterLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterLongColumn vectorExpression = - new FilterLongScalarGreaterLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterLongColumn vectorExpression = - new FilterDoubleScalarGreaterLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterLongColumn vectorExpression = - new FilterDoubleScalarGreaterLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterLongColumn vectorExpression = - new FilterDoubleScalarGreaterLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterLongColumn vectorExpression = - new FilterDoubleScalarGreaterLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue > inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue > inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterEqualLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterEqualLongColumn vectorExpression = - new FilterLongScalarGreaterEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterEqualLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterEqualLongColumn vectorExpression = - new FilterLongScalarGreaterEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterEqualLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterEqualLongColumn vectorExpression = - new FilterLongScalarGreaterEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterLongScalarGreaterEqualLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - long scalarValue = 0; - do { - scalarValue = rand.nextLong(); - } while(scalarValue == 0); - - FilterLongScalarGreaterEqualLongColumn vectorExpression = - new FilterLongScalarGreaterEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterEqualLongColumnColNullsRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterEqualLongColumn vectorExpression = - new FilterDoubleScalarGreaterEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterEqualLongColumnColNulls() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(true, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterEqualLongColumn vectorExpression = - new FilterDoubleScalarGreaterEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterEqualLongColumn() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - false, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterEqualLongColumn vectorExpression = - new FilterDoubleScalarGreaterEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - - @Test - public void testFilterDoubleScalarGreaterEqualLongColumnColRepeats() { - - Random rand = new Random(SEED); - - LongColumnVector inputColumnVector = - VectorizedRowGroupGenUtil.generateLongColumnVector(false, - true, BATCH_SIZE, rand); - - VectorizedRowBatch rowBatch = new VectorizedRowBatch(1, BATCH_SIZE); - rowBatch.cols[0] = inputColumnVector; - - double scalarValue = 0; - do { - scalarValue = rand.nextDouble(); - } while(scalarValue == 0); - - FilterDoubleScalarGreaterEqualLongColumn vectorExpression = - new FilterDoubleScalarGreaterEqualLongColumn(0, scalarValue); - - vectorExpression.evaluate(rowBatch); - - - int selectedIndex = 0; - int i=0; - //check for isRepeating optimization - if(inputColumnVector.isRepeating) { - //null vector is safe to check, as it is always initialized to match the data vector - selectedIndex = - !inputColumnVector.isNull[i] && scalarValue >= inputColumnVector.vector[i] - ? BATCH_SIZE : 0; - } else { - for(i = 0; i < BATCH_SIZE; i++) { - if(!inputColumnVector.isNull[i]) { - if(scalarValue >= inputColumnVector.vector[i]) { - assertEquals( - "Vector index that passes filter " - + scalarValue + ">=" - + inputColumnVector.vector[i] + " is not in rowBatch selected index", - i, - rowBatch.selected[selectedIndex]); - selectedIndex++; - } - } - } - } - - assertEquals("Row batch size not set to number of selected rows: " + selectedIndex, - selectedIndex, rowBatch.size); - - if(selectedIndex > 0 && selectedIndex < BATCH_SIZE) { - assertEquals( - "selectedInUse should be set when > 0 and < entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - true, rowBatch.selectedInUse); - } else if(selectedIndex == BATCH_SIZE) { - assertEquals( - "selectedInUse should not be set when entire batch(" + BATCH_SIZE + ") is selected: " - + selectedIndex, - false, rowBatch.selectedInUse); - } - } - }