pjfanning commented on code in PR #40933:
URL: https://github.com/apache/spark/pull/40933#discussion_r1176914028


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala:
##########
@@ -186,6 +198,7 @@ private[sql] class JSONOptions(
         JsonReadFeature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER,
         allowBackslashEscapingAnyCharacter)
       .configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS, 
allowUnquotedControlChars)
+      .streamReadConstraints(new StreamReadConstraints(maxNestingDepth, 
maxNumLen, maxStringLen))

Review Comment:
   could you use StreamReadConstraints.builder and use the fluent style of 
setting the configs? - much more explicit and readable



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JSONOptions.scala:
##########
@@ -186,6 +198,7 @@ private[sql] class JSONOptions(
         JsonReadFeature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER,
         allowBackslashEscapingAnyCharacter)
       .configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS, 
allowUnquotedControlChars)
+      .streamReadConstraints(new StreamReadConstraints(maxNestingDepth, 
maxNumLen, maxStringLen))

Review Comment:
   could you use StreamReadConstraints.builder() and use the fluent style of 
setting the configs? - much more explicit and readable



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