yihua commented on code in PR #11192:
URL: https://github.com/apache/hudi/pull/11192#discussion_r1597287731


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkConfUtils.scala:
##########
@@ -48,4 +50,10 @@ object HoodieSparkConfUtils {
       .map(HollowCommitHandling.valueOf)
       
.getOrElse(HollowCommitHandling.valueOf(INCREMENTAL_READ_HANDLE_HOLLOW_COMMIT.defaultValue))
   }
+
+  def getSparkReaderConfig(): HoodieConfig = {

Review Comment:
   Is this still needed?



##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala:
##########
@@ -853,7 +852,7 @@ object HoodieBaseRelation extends SparkAdapterSupport {
       val hoodieConfig = new HoodieConfig()
       hoodieConfig.setValue(USE_NATIVE_HFILE_READER,
         options.getOrElse(USE_NATIVE_HFILE_READER.key(), 
USE_NATIVE_HFILE_READER.defaultValue().toString))
-      val reader = 
HoodieFileReaderFactory.getReaderFactory(HoodieRecordType.AVRO)
+      val reader = (new 
HoodieSparkIOFactory).getReaderFactory(HoodieRecordType.AVRO)

Review Comment:
   Similar here.
   
   If the IO factory class name is already set in the storage config, could we 
use the reflection, i.e., `HoodieIOFactory.getIOFactory(conf)`, to load the 
`HoodieSparkIOFactory`, which achieves the same behavior?



-- 
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

Reply via email to