private void decodeDictionaryIds(
      int rowId,
      int num,
      ColumnVector column,
      TypeInfo columnType,
      LongColumnVector dictionaryIds) {
    System.arraycopy(dictionaryIds.isNull, rowId, column.isNull, rowId, num);
    if (column.noNulls) {
      column.noNulls = dictionaryIds.noNulls;
    }
    column.isRepeating = column.isRepeating && dictionaryIds.isRepeating;


    PrimitiveTypeInfo primitiveColumnType = (PrimitiveTypeInfo) columnType;

    switch (primitiveColumnType.getPrimitiveCategory()) {
    case INT:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((LongColumnVector) column).vector[i] =
                  dictionary.readInteger((int) dictionaryIds.vector[i]);
          if (!dictionary.isValid()) {
            setNullValue(column, i);
            ((LongColumnVector) column).vector[i] = 0;
          }
        }
      }
      break;
    case BYTE:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((LongColumnVector) column).vector[i] =
                  dictionary.readTinyInt((int) dictionaryIds.vector[i]);
          if (!dictionary.isValid()) {
            setNullValue(column, i);
            ((LongColumnVector) column).vector[i] = 0;
          }
        }
      }
      break;
    case SHORT:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((LongColumnVector) column).vector[i] =
                  dictionary.readSmallInt((int) dictionaryIds.vector[i]);
          if (!dictionary.isValid()) {
            setNullValue(column, i);
            ((LongColumnVector) column).vector[i] = 0;
          }
        }
      }
      break;
    case DATE:
      DateColumnVector dc = (DateColumnVector) column;
      dc.setUsingProlepticCalendar(true);
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          dc.vector[i] =
                  skipProlepticConversion ?
                          dictionary.readLong((int) dictionaryIds.vector[i]) :
                          CalendarUtils.convertDateToProleptic((int) dictionary.readLong((int) dictionaryIds.vector[i]));
          if (!dictionary.isValid()) {
            setNullValue(column, i);
            dc.vector[i] = 0;
          }
        }
      }
      break;
    case INTERVAL_YEAR_MONTH:
    case LONG:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((LongColumnVector) column).vector[i] =
                  dictionary.readLong((int) dictionaryIds.vector[i]);
          if (!dictionary.isValid()) {
            setNullValue(column, i);
            ((LongColumnVector) column).vector[i] = 0;
          }
        }
      }
      break;
    case BOOLEAN:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((LongColumnVector) column).vector[i] =
                  dictionary.readBoolean((int) dictionaryIds.vector[i]) ? 1 : 0;
        }
      }
      break;
    case DOUBLE:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((DoubleColumnVector) column).vector[i] =
                  dictionary.readDouble((int) dictionaryIds.vector[i]);
          if (!dictionary.isValid()) {
            setNullValue(column, i);
            ((DoubleColumnVector) column).vector[i] = 0;
          }
        }
      }
      break;
    case BINARY:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((BytesColumnVector) column)
                  .setVal(i, dictionary.readBytes((int) dictionaryIds.vector[i]));
        }
      }
      break;
    case STRING:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((BytesColumnVector) column)
                  .setVal(i, dictionary.readString((int) dictionaryIds.vector[i]));
        }
      }
      break;
    case VARCHAR:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((BytesColumnVector) column)
                  .setVal(i, dictionary.readVarchar((int) dictionaryIds.vector[i]));
        }
      }
      break;
    case CHAR:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((BytesColumnVector) column)
                  .setVal(i, dictionary.readChar((int) dictionaryIds.vector[i]));
        }
      }
      break;
    case FLOAT:
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          ((DoubleColumnVector) column).vector[i] =
                  dictionary.readFloat((int) dictionaryIds.vector[i]);
          if (!dictionary.isValid()) {
            setNullValue(column, i);
            ((DoubleColumnVector) column).vector[i] = 0;
          }
        }
      }
      break;
    case DECIMAL:
      DecimalLogicalTypeAnnotation decimalLogicalType = null;
      if (type.getLogicalTypeAnnotation() instanceof DecimalLogicalTypeAnnotation) {
        decimalLogicalType = (DecimalLogicalTypeAnnotation) type.getLogicalTypeAnnotation();
      }
      DecimalColumnVector decimalColumnVector = ((DecimalColumnVector) column);
      byte[] decimalData = null;

      fillDecimalPrecisionScale(decimalLogicalType, decimalColumnVector);

      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          decimalData = dictionary.readDecimal((int) dictionaryIds.vector[i]);
          if (dictionary.isValid()) {
            decimalColumnVector.vector[i].set(decimalData, decimalColumnVector.scale);
          } else {
            setNullValue(column, i);
          }
        }
      }
      break;
    case TIMESTAMP:
      TimestampColumnVector tsc = (TimestampColumnVector) column;
      tsc.setUsingProlepticCalendar(true);
      for (int i = rowId; i < rowId + num; ++i) {
        if (!column.isNull[i]) {
          tsc.set(i, dictionary.readTimestamp((int) dictionaryIds.vector[i]).toSqlTimestamp());
        }
      }
      break;
    case INTERVAL_DAY_TIME:
    default:
      throw new UnsupportedOperationException("Unsupported type: " + type);
    }
  }
Reads `num` values into column, decoding the values from `dictionaryIds` and `dictionary`.
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedPrimitiveColumnReader.java