@Override
  public Text getPrimitiveWritableObject(final Object o) {
    if (o == null) {
      return null;
    }

    if (o instanceof BytesWritable) {
      return new Text(((BytesWritable) o).getBytes());
    }

    if (o instanceof Text) {
      return (Text) o;
    }

    if (o instanceof String) {
      return new Text((String) o);
    }

    if ((o instanceof TimestampWritableV2) || (o instanceof HiveDecimalWritable)
        || (o instanceof DoubleWritable) || (o instanceof FloatWritable)
        || (o instanceof LongWritable) || (o instanceof IntWritable)
        || (o instanceof BooleanWritable)) {
      return new Text(o.toString());
    }

    throw new UnsupportedOperationException("Cannot inspect " + o.getClass().getCanonicalName());
  }
The ParquetStringInspector inspects a BytesWritable, TimestampWritableV2, HiveDecimalWritable,
DoubleWritable, FloatWritable, LongWritable, IntWritable, and BooleanWritable to give a Text
or String.
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/primitive/ParquetStringInspector.java