HyukjinKwon commented on code in PR #36583:
URL: https://github.com/apache/spark/pull/36583#discussion_r876460895
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala:
##########
@@ -419,7 +419,10 @@ class JacksonParser(
val row = new GenericInternalRow(schema.length)
var badRecordException: Option[Throwable] = None
var skipRow = false
-
+ // Apply default values from the column metadata to the initial row, if
any.
+ for ((value: Any, i: Int) <- schema.existenceDefaultValues.zipWithIndex) {
Review Comment:
No biggie but maybe we could add an if-else to skip this assignment if there
are no default values (since arguably most cases won't have default values, and
this is performance sensitive code path)
--
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]