rangadi commented on code in PR #38922:
URL: https://github.com/apache/spark/pull/38922#discussion_r1051292604


##########
connector/protobuf/src/main/scala/org/apache/spark/sql/protobuf/utils/ProtobufOptions.scala:
##########
@@ -38,6 +38,14 @@ private[sql] class ProtobufOptions(
 
   val parseMode: ParseMode =
     parameters.get("mode").map(ParseMode.fromString).getOrElse(FailFastMode)
+
+  // Setting the `recursive.fields.max.depth` to 0 allows the field to be 
recurse once,

Review Comment:
   '0' disables recursion right? Why once? This might be difference in 
terminology. Thats why giving a quick example is better. Could you add this 
example?:
   
    Consider a simple simple recursive proto 'message Person { string name = 1; 
Person bff = 2}
   
   > What would be spark schema when recursion 0, 1, and 2? I think : 
   
     - 0: struct<name: string, bff: null>
     - 1: struct<name string, bff: <name: string, bff: null>>
     - 2: struct<name string, bff: <name: string, bff: struct<name: string, 
bff: null>
     
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to