use of org.apache.hadoop.hive.ql.exec.vector.IntervalDayTimeColumnVector in project hive by apache.
the class VectorHashKeyWrapperBatch method assignRowColumn.
public void assignRowColumn(VectorizedRowBatch batch, int batchIndex, int keyIndex, VectorHashKeyWrapperBase kw) throws HiveException {
ColumnVector colVector = batch.cols[keyIndex];
if (kw.isNull(keyIndex)) {
colVector.noNulls = false;
colVector.isNull[batchIndex] = true;
return;
}
colVector.isNull[batchIndex] = false;
ColumnVector.Type columnVectorType = columnVectorTypes[keyIndex];
int columnTypeSpecificIndex = columnTypeSpecificIndices[keyIndex];
switch(columnVectorType) {
case LONG:
case DECIMAL_64:
((LongColumnVector) colVector).vector[batchIndex] = kw.getLongValue(columnTypeSpecificIndex);
break;
case DOUBLE:
((DoubleColumnVector) colVector).vector[batchIndex] = kw.getDoubleValue(columnTypeSpecificIndex);
break;
case BYTES:
((BytesColumnVector) colVector).setVal(batchIndex, kw.getBytes(columnTypeSpecificIndex), kw.getByteStart(columnTypeSpecificIndex), kw.getByteLength(columnTypeSpecificIndex));
break;
case DECIMAL:
((DecimalColumnVector) colVector).set(batchIndex, kw.getDecimal(columnTypeSpecificIndex));
break;
case TIMESTAMP:
((TimestampColumnVector) colVector).set(batchIndex, kw.getTimestamp(columnTypeSpecificIndex));
break;
case INTERVAL_DAY_TIME:
((IntervalDayTimeColumnVector) colVector).set(batchIndex, kw.getIntervalDayTime(columnTypeSpecificIndex));
break;
default:
throw new HiveException("Unexpected column vector type " + columnVectorType);
}
}
Aggregations