xiarixiaoyao commented on a change in pull request #4308:
URL: https://github.com/apache/hudi/pull/4308#discussion_r772808011



##########
File path: 
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/HoodieFileIndex.scala
##########
@@ -123,6 +121,25 @@ case class HoodieFileIndex(
     }
   }
 
+  /**
+   * This method traverses StructType recursively to build map of columnName 
-> StructField
+   * Note : If there is nesting of columns like ["a.b.c.d", "a.b.c.e"]  -> 
final map will have keys corresponding
+   * only to ["a.b.c.d", "a.b.c.e"] and not for subsets like ["a.b.c", "a.b"]
+   * @param structField
+   * @return map of ( columns names -> StructField )
+   */
+  private def generateNameFieldMap(structField : Either[StructField, 
StructType]) : Map[String, StructField] = {
+    structField match {

Review comment:
       Please delete the space before ‘:’
   
   private def generateNameFieldMap(structField : Either[StructField, 
StructType]) : Map[String, StructField] =>
   
   private def generateNameFieldMap(structField: Either[StructField, 
StructType]): Map[String, StructField]




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