wecharyu commented on code in PR #9889:
URL: https://github.com/apache/hudi/pull/9889#discussion_r1371281160


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala:
##########
@@ -220,7 +220,9 @@ abstract class HoodieBaseRelation(val sqlContext: 
SQLContext,
    *       partition path, meaning that string value of "2022/01/01" will be 
appended, and not its original
    *       representation
    */
-  protected val shouldExtractPartitionValuesFromPartitionPath: Boolean = {
+  protected val shouldExtractPartitionValuesFromPartitionPath: Boolean = 
needExtractPartitionValuesFromPartitionPath()
+
+  protected def needExtractPartitionValuesFromPartitionPath(): Boolean = {
     // Controls whether partition columns (which are the source for the 
partition path values) should

Review Comment:
   Because `shouldExtractPartitionValuesFromPartitionPath` is val, which can 
not be override as follows:
   ```scala
   override protected val shouldExtractPartitionValuesFromPartitionPath: 
Boolean = {
     if (hasSchemaOnRead) {
       super.shouldExtractPartitionValuesFromPartitionPath
     } else true
   }
   ```



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