stp-pv commented on issue #9032: URL: https://github.com/apache/hudi/issues/9032#issuecomment-1607785019
We are seeing the problem with insert as well. Here is the most simple fix for the problem we are observing: ```diff diff --git a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/cdc/HoodieCDCRDD.scala b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/cdc/HoodieCDCRDD.scala index b42e6f8800..a0531772db 100644 --- a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/cdc/HoodieCDCRDD.scala +++ b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/cdc/HoodieCDCRDD.scala @@ -561,7 +561,7 @@ class HoodieCDCRDD( originTableSchema.structTypeSchema.zipWithIndex.foreach { case (field, idx) => if (field.dataType.isInstanceOf[StringType]) { - map(field.name) = record.getString(idx) + map(field.name) = Option(record.getUTF8String(idx)).map(_.toString).orNull } else { map(field.name) = record.get(idx, field.dataType) } ``` -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org