@Override
  protected void initializeOp(Configuration hconf) throws HiveException {
    super.initializeOp(hconf);

    VectorExpression.doTransientInit(partitionExpressions, hconf);
    VectorExpression.doTransientInit(orderExpressions, hconf);

    if (LOG.isDebugEnabled()) {
      // Determine the name of our map or reduce task for debug tracing.
      BaseWork work = Utilities.getMapWork(hconf);
      if (work == null) {
        work = Utilities.getReduceWork(hconf);
      }
      taskName = work.getName();
    }

    final int partitionKeyCount = vectorDesc.getPartitionExprNodeDescs().length;
    currentPartitionIsNull = new boolean[partitionKeyCount];
    currentPartitionLongs = new long[partitionKeyCount];
    currentPartitionDoubles = new double[partitionKeyCount];
    currentPartitionByteArrays = new byte[partitionKeyCount][];
    currentPartitionByteLengths = new int[partitionKeyCount];
    currentPartitionDecimals = new HiveDecimalWritable[partitionKeyCount];
    currentPartitionTimestamps = new Timestamp[partitionKeyCount];
    currentPartitionIntervalDayTimes = new HiveIntervalDayTime[partitionKeyCount];

    /*
     * Setup the overflow batch.
     */
    overflowBatch = setupOverflowBatch(vContext.firstOutputColumnIndex(),
        vOutContext.getScratchColumnTypeNames(), outputProjectionColumnMap, outputTypeInfos);

    evaluators = VectorPTFDesc.getEvaluators(vectorDesc, vectorPTFInfo);
    for (VectorPTFEvaluatorBase evaluator : evaluators) {
      evaluator.setNullsLast(HiveConf.getBoolVar(hconf, HiveConf.ConfVars.HIVE_DEFAULT_NULLS_LAST));
    }

    streamingEvaluatorNums = VectorPTFDesc.getStreamingEvaluatorNums(evaluators);

    allEvaluatorsAreStreaming = (streamingEvaluatorNums.length == evaluatorCount);

    groupBatches = new VectorPTFGroupBatches(
        hconf, vectorDesc.getVectorizedPTFMaxMemoryBufferingBatchCount());

    initBufferedColumns();
    initExpressionColumns();
    int [] keyWithoutOrderColumnMap = determineKeyColumnsWithoutOrderColumns(keyInputColumnMap, orderColumnMap);
    groupBatches.init(
        evaluators,
        outputProjectionColumnMap,
        bufferedColumnMap,
        bufferedTypeInfos,
        orderColumnMap,
        keyWithoutOrderColumnMap,
        overflowBatch);

    isFirstPartition = true;

    batchCounter = 0;
  }
Setup the vectorized row batch description of the output of the native vectorized PTF
operator.  Use the output projection we previously built from a mixture of input
columns and new scratch columns.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFOperator.java