the-other-tim-brown commented on code in PR #13882:
URL: https://github.com/apache/hudi/pull/13882#discussion_r2342353579


##########
hudi-client/hudi-spark-client/src/main/scala/org/apache/spark/sql/HoodieDataTypeUtils.scala:
##########
@@ -37,72 +29,4 @@ object HoodieDataTypeUtils {
    */
   def parseStructTypeFromJson(jsonSchema: String): StructType =
     StructType.fromString(jsonSchema)
-
-  def canUseRowWriter(schema: Schema, conf: Configuration): Boolean = {
-    if (conf.getBoolean(AvroWriteSupport.WRITE_OLD_LIST_STRUCTURE, true)) {
-      // if we can write lists with the old list structure, we can use row 
writer regardless of decimal precision
-      true
-    } else if (!HoodieAvroUtils.hasSmallPrecisionDecimalField(schema)) {
-      true
-    } else {
-      // small precision decimals require the legacy write mode but lists and 
maps require the new write mode when
-      // WRITE_OLD_LIST_STRUCTURE is false so we can only use row writer if 
one is present and the other is not
-      if (HoodieAvroUtils.hasListOrMapField(schema)) {
-        log.warn("Cannot use row writer due to presence of list or map with a 
small precision decimal field")
-        false
-      } else {
-        true
-      }
-    }
-  }

Review Comment:
   That is correct



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to