private void initValue() {
    Object val = dynamicValue.getValue();

    if (val == null) {
      isNullValue = true;
    } else {
      PrimitiveObjectInspector poi = dynamicValue.getObjectInspector();
      byte[] bytesVal;
      switch (poi.getPrimitiveCategory()) {
      case BOOLEAN:
      case BYTE:
      case SHORT:
      case INT:
      case LONG:
        longValue = PrimitiveObjectInspectorUtils.getLong(val, poi);
        break;
      case FLOAT:
      case DOUBLE:
        doubleValue = PrimitiveObjectInspectorUtils.getDouble(val, poi);
        break;
      case STRING:
      case CHAR:
      case VARCHAR:
        bytesVal = PrimitiveObjectInspectorUtils.getString(val, poi).getBytes();
        setBytesValue(bytesVal);
        break;
      case BINARY:
        bytesVal = PrimitiveObjectInspectorUtils.getBinary(val, poi).copyBytes();
        setBytesValue(bytesVal);
        break;
      case DECIMAL:
        decimalValue = PrimitiveObjectInspectorUtils.getHiveDecimal(val, poi);
        break;
      case DATE:
        longValue = DateWritableV2.dateToDays(PrimitiveObjectInspectorUtils.getDate(val, poi));
      case TIMESTAMP:
        timestampValue = PrimitiveObjectInspectorUtils.getTimestamp(val, poi).toSqlTimestamp();
        break;
      case INTERVAL_YEAR_MONTH:
        longValue = PrimitiveObjectInspectorUtils.getHiveIntervalYearMonth(val, poi).getTotalMonths();
        break;
      case INTERVAL_DAY_TIME:
        intervalDayTimeValue = PrimitiveObjectInspectorUtils.getHiveIntervalDayTime(val, poi);
        break;
      default:
        throw new IllegalStateException("Unsupported type " + poi.getPrimitiveCategory());
      }
    }

    initialized = true;
  }
Constant is represented as a vector with repeating values.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/DynamicValueVectorExpression.java