You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/11/15 18:19:43 UTC

[GitHub] [hudi] jintaoguan commented on a change in pull request #3985: [HUDI-2754] Performance improvement for IncrementalRelation

jintaoguan commented on a change in pull request #3985:
URL: https://github.com/apache/hudi/pull/3985#discussion_r749574597



##########
File path: hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/IncrementalRelation.scala
##########
@@ -98,7 +97,12 @@ class IncrementalRelation(val sqlContext: SQLContext,
 
   override def schema: StructType = usedSchema
 
-  override def buildScan(): RDD[Row] = {
+  override def buildScan(requiredColumns: Array[String]): RDD[Row] = {
+    log.info(s"buildScan requiredColumns = ${requiredColumns.mkString(",")}")
+    sqlContext.sparkSession.sessionState.conf.setConfString("spark.sql.parquet.filterPushdown", "true")
+    sqlContext.sparkSession.sessionState.conf.setConfString("spark.sql.parquet.recordLevelFilter.enabled", "true")
+    sqlContext.sparkSession.sessionState.conf.setConfString("spark.sql.parquet.enableVectorizedReader", "false")

Review comment:
       It is because "spark.sql.parquet.enableVectorizedReader" and "spark.sql.parquet.recordLevelFilter.enabled" cannot be true at the same time according to the Parquet documentation. We have to disable verctorizedReader if we want to use recordLevelFilter. Hudi also uses the same config as above in `MergeOnReadIncrementalRelation`.




-- 
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-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org