This is an automated email from the ASF dual-hosted git repository.

vinoyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 9625d16937 [HUDI-3849] AvroDeserializer supports 
AVRO_REBASE_MODE_IN_READ configuration (#5287)
9625d16937 is described below

commit 9625d16937954a54420384b41f964e48cba8cc2f
Author: cxzl25 <[email protected]>
AuthorDate: Sat May 7 15:39:14 2022 +0800

    [HUDI-3849] AvroDeserializer supports AVRO_REBASE_MODE_IN_READ 
configuration (#5287)
---
 .../org/apache/spark/sql/avro/HoodieSpark3_2AvroDeserializer.scala   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/avro/HoodieSpark3_2AvroDeserializer.scala
 
b/hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/avro/HoodieSpark3_2AvroDeserializer.scala
index 0275e2f635..d839c73032 100644
--- 
a/hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/avro/HoodieSpark3_2AvroDeserializer.scala
+++ 
b/hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/avro/HoodieSpark3_2AvroDeserializer.scala
@@ -18,13 +18,14 @@
 package org.apache.spark.sql.avro
 
 import org.apache.avro.Schema
-import org.apache.hudi.HoodieSparkUtils
+import org.apache.spark.sql.internal.SQLConf
 import org.apache.spark.sql.types.DataType
 
 class HoodieSpark3_2AvroDeserializer(rootAvroType: Schema, rootCatalystType: 
DataType)
   extends HoodieAvroDeserializer {
 
-  private val avroDeserializer = new AvroDeserializer(rootAvroType, 
rootCatalystType, "EXCEPTION")
+  private val avroDeserializer = new AvroDeserializer(rootAvroType, 
rootCatalystType,
+    SQLConf.get.getConf(SQLConf.AVRO_REBASE_MODE_IN_READ))
 
   def deserialize(data: Any): Option[Any] = avroDeserializer.deserialize(data)
 }

Reply via email to