@SuppressWarnings("unchecked")
  public static <T> ParquetValueWriter<T> buildWriter(StructType dfSchema, MessageType type) {
    return (ParquetValueWriter<T>)
        AdaptHiveParquetWithSparkSchemaVisitor.visit(dfSchema, type, new WriteBuilder(type));
  }
Copy from iceberg {@link SparkParquetWriters} to support int96 type.
amoro-format-mixed/amoro-mixed-spark/v3.2/amoro-mixed-spark-3.2/src/main/java/org/apache/iceberg/spark/data/AdaptHiveSparkParquetWriters.java