Package org.apache.hadoop.hive.ql.exec.vector

Examples of org.apache.hadoop.hive.ql.exec.vector.ColumnVector


    return null;
  }

  private void testDateAddColScalar(VectorExpression.Type colType1, boolean isPositive) {
    LongColumnVector date1 = newRandomLongColumnVector(10000, size);
    ColumnVector col1 = castTo(date1, colType1);
    long scalar2 = newRandom(1000);
    BytesColumnVector output = new BytesColumnVector(size);

    VectorizedRowBatch batch = new VectorizedRowBatch(2, size);
    batch.cols[0] = col1;
View Full Code Here


  }

  private void testDateAddColCol(VectorExpression.Type colType1, boolean isPositive) {
    LongColumnVector date1 = newRandomLongColumnVector(10000, size);
    LongColumnVector days2 = newRandomLongColumnVector(1000, size);
    ColumnVector col1 = castTo(date1, colType1);

    BytesColumnVector output = new BytesColumnVector(size);

    VectorizedRowBatch batch = new VectorizedRowBatch(3, size);
    batch.cols[0] = col1;
View Full Code Here

  public void testDateDiffScalarCol() {
    for (VectorExpression.Type scalarType1 : dateTimestampStringTypes) {
      for (VectorExpression.Type colType2 : dateTimestampStringTypes) {
        LongColumnVector date2 = newRandomLongColumnVector(10000, size);
        LongColumnVector output = new LongColumnVector(size);
        ColumnVector col2 = castTo(date2, colType2);
        VectorizedRowBatch batch = new VectorizedRowBatch(2, size);
        batch.cols[0] = col2;
        batch.cols[1] = output;
        long scalar1 = newRandom(1000);
View Full Code Here

    if (childExpressions != null) {
      super.evaluateChildren(batch);
    }

    ColumnVector inputColVector = batch.cols[colNum];
    int[] sel = batch.selected;
    boolean[] nullPos = inputColVector.isNull;
    int n = batch.size;
    if (n <= 0) {
      // Nothing to do
View Full Code Here

    if (childExpressions != null) {
      super.evaluateChildren(batch);
    }

    ColumnVector inputColVector1 = batch.cols[colNum1];
    LongColumnVector inputColVector2 = (LongColumnVector) batch.cols[colNum2];
    int[] sel = batch.selected;
    int n = batch.size;
    long[] vector2 = inputColVector2.vector;
View Full Code Here

    if (childExpressions != null) {
      super.evaluateChildren(batch);
    }

    LongColumnVector outV = (LongColumnVector) batch.cols[outputColumn];
    ColumnVector inputCol = batch.cols[this.colNum];
    /* every line below this is identical for evaluateLong & evaluateString */
    final int n = inputCol.isRepeating ? 1 : batch.size;
    int[] sel = batch.selected;

    if(batch.size == 0) {
View Full Code Here

    if (isConstant()) {
      return this.constObjVal;
    } else {

      // get column
      ColumnVector cv = b.cols[columnNum];

      // write value to object that can be inspected
      Object o;
      try {
        o = writers[argPosition].writeValue(cv, row);
View Full Code Here

      super.evaluateChildren(batch);
    }

    int[] sel = batch.selected;
    int n = batch.size;
    ColumnVector outputVector = batch.cols[outputColumn];
    if (n <= 0) {
      // Nothing to do
      return;
    }

    outputVector.init();

    outputVector.noNulls = false;
    outputVector.isRepeating = false;
    if (batch.selectedInUse) {
      for (int j = 0; j != n; j++) {
        int i = sel[j];
        outputVector.isNull[i] = true;
        for (int k = 0; k < inputColumns.length; k++) {
          ColumnVector cv = batch.cols[inputColumns[k]];
          if ( (cv.isRepeating) && (cv.noNulls || !cv.isNull[0])) {
            outputVector.isNull[i] = false;
            outputVector.setElement(i, 0, cv);
            break;
          } else if ((!cv.isRepeating) && (cv.noNulls || !cv.isNull[i])) {
            outputVector.isNull[i] = false;
            outputVector.setElement(i, i, cv);
            break;
          }
        }
      }
    } else {
      for (int i = 0; i != n; i++) {
        outputVector.isNull[i] = true;
        for (int k = 0; k < inputColumns.length; k++) {
          ColumnVector cv = batch.cols[inputColumns[k]];
          if ((cv.isRepeating) && (cv.noNulls || !cv.isNull[0])) {
            outputVector.isNull[i] = false;
            outputVector.setElement(i, 0, cv);
            break;
          } else if ((!cv.isRepeating) && (cv.noNulls || !cv.isNull[i])) {
View Full Code Here

    if (childExpressions != null) {
      super.evaluateChildren(batch);
    }

    ColumnVector inputColVector1 = batch.cols[colNum1];
    ColumnVector inputColVector2 = batch.cols[colNum2];
    int[] sel = batch.selected;
    int n = batch.size;

    LongColumnVector outV = (LongColumnVector) batch.cols[outputColumn];
    long[] outputVector = outV.vector;
View Full Code Here

    if (childExpressions != null) {
      super.evaluateChildren(batch);
    }

    LongColumnVector outV = (LongColumnVector) batch.cols[outputColumn];
    ColumnVector inputCol = batch.cols[this.colNum];
    /* every line below this is identical for evaluateLong & evaluateString */
    final int n = inputCol.isRepeating ? 1 : batch.size;
    int[] sel = batch.selected;

    if(batch.size == 0) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.exec.vector.ColumnVector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.