public void transferToBaseWork(BaseWork baseWork) {

      final int virtualColumnCount =
          (availableVirtualColumnList == null ? 0 : availableVirtualColumnList.size());
      VirtualColumn[] neededVirtualColumns;
      if (neededVirtualColumnList != null && neededVirtualColumnList.size() > 0) {
        neededVirtualColumns = neededVirtualColumnList.toArray(new VirtualColumn[0]);
      } else {
        neededVirtualColumns = new VirtualColumn[0];
      }

      String[] allColumnNameArray = allColumnNames.toArray(new String[0]);
      TypeInfo[] allTypeInfoArray = allTypeInfos.toArray(new TypeInfo[0]);
      int[] dataColumnNumsArray;
      if (dataColumnNums != null) {
        dataColumnNumsArray = ArrayUtils.toPrimitive(dataColumnNums.toArray(new Integer[0]));
      } else {
        dataColumnNumsArray = null;
      }

      DataTypePhysicalVariation[] allDataTypePhysicalVariationArray;
      if (allDataTypePhysicalVariations == null) {
        allDataTypePhysicalVariationArray = new DataTypePhysicalVariation[allTypeInfoArray.length];
        Arrays.fill(allDataTypePhysicalVariationArray, DataTypePhysicalVariation.NONE);
      } else {
        allDataTypePhysicalVariationArray =
            allDataTypePhysicalVariations.toArray(new DataTypePhysicalVariation[0]);
      }

      VectorizedRowBatchCtx vectorizedRowBatchCtx =
          new VectorizedRowBatchCtx(
            allColumnNameArray,
            allTypeInfoArray,
            allDataTypePhysicalVariationArray,
            dataColumnNumsArray,
            partitionColumnCount,
            virtualColumnCount,
            neededVirtualColumns,
            scratchTypeNameArray,
            scratchdataTypePhysicalVariations);
      baseWork.setVectorizedRowBatchCtx(vectorizedRowBatchCtx);

      if (baseWork instanceof MapWork) {
        MapWork mapWork = (MapWork) baseWork;
        mapWork.setUseVectorizedInputFileFormat(useVectorizedInputFileFormat);
        mapWork.setInputFormatSupportSet(inputFormatSupportSet);
        mapWork.setSupportSetInUse(supportSetInUse);
        mapWork.setSupportRemovedReasons(supportRemovedReasons);
      }

      if (baseWork instanceof ReduceWork) {
        ReduceWork reduceWork = (ReduceWork) baseWork;
        reduceWork.setVectorReduceColumnSortOrder(reduceColumnSortOrder);
        reduceWork.setVectorReduceColumnNullOrder(reduceColumnNullOrder);
      }

      baseWork.setAllNative(allNative);
      baseWork.setUsesVectorUDFAdaptor(usesVectorUDFAdaptor);

      baseWork.setIsTestForcedVectorizationEnable(isTestForcedVectorizationEnable);
      baseWork.setIsTestVectorizationSuppressExplainExecutionMode(
          isTestVectorizationSuppressExplainExecutionMode);
    }
Decimal types can be specified with different precision and scales e.g. decimal(10,5),
as opposed to other data types which can be represented by constant strings.
The regex matches only the {@link serdeConstants#DECIMAL_TYPE_NAME} prefix of the type.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java