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


##########
connector/protobuf/src/main/scala/org/apache/spark/sql/protobuf/utils/ProtobufOptions.scala:
##########
@@ -38,6 +38,12 @@ private[sql] class ProtobufOptions(
 
   val parseMode: ParseMode =
     parameters.get("mode").map(ParseMode.fromString).getOrElse(FailFastMode)
+
+  val circularReferenceType: String = 
parameters.getOrElse("circularReferenceType", "FIELD_NAME")

Review Comment:
   ```
   message A {
   B b = 1;
   }
   message B {
   A aa = 1;
   D d = 2;
   }
   
   message D {
   A aaa = 1;
   E a =2;
   }
   
   message E {
   int32 key = 1;
   }
   ```
   @rangadi just correcting the second example. in the case of field_name base 
recursive check. we would fail to detect the recursion for above because the 
thread would be ```A.B.A.aa.D.d.A.aaa.E``` set would have unique values [A, 
B.b, A.aa, A.aaa, E.a], but in the case of @baganokodo2022 proposal it would be 
```A.B.A.D.A.E``` would takeout field_name so early detection for recursion. 



-- 
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: reviews-unsubscr...@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to