hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java
/**
   * This method converts values for fields with certain Avro/Parquet data types that require special handling.
   *
   * Logical Date Type is converted to actual Date value instead of Epoch Integer which is how it is
   * represented/stored in parquet.
   *
   * @param fieldSchema avro field schema
   * @param fieldValue avro field value
   * @return field value either converted (for certain data types) or as it is.
   */
This method converts values for fields with certain Avro/Parquet data types that require special handling.
Logical Date Type is converted to actual Date value instead of Epoch Integer which is how it is
represented/stored in parquet.

@param fieldSchema avro field schema
@param fieldValue avro field value
@return field value either converted (for certain data types) or as it is.
This method converts values for fields with certain Avro / Parquet data types that require special handling . Logical Date Type is converted to actual Date value instead of Epoch Integer which is how it is represented / stored in parquet . @param fieldSchema avro field schema @param fieldValue avro field value @return field value either converted ( for certain data types ) or as it is .
private static Object convertValueForSpecificDataTypes(Schema fieldSchema, Object fieldValue) {
    if (fieldSchema == null) {
      return fieldValue;
    }
    if (isLogicalTypeDate(fieldSchema)) {
      return LocalDate.ofEpochDay(Long.parseLong(fieldValue.toString()));
    }
    return fieldValue;
  }
private static Object convertValueForSpecificDataTypes ( Schema fieldSchema , Object fieldValue ) { if ( fieldSchema == null ) { return fieldValue ; } if ( isLogicalTypeDate ( fieldSchema ) ) { return LocalDate . ofEpochDay ( Long . parseLong ( fieldValue . toString ( ) ) ) ; } return fieldValue ; }
This method converts values for fields with certain Avro/Parquet data types that require special handling.
This method converts values for fields with certain Avro / Parquet data types that require special handling .