HyukjinKwon commented on code in PR #36583:
URL: https://github.com/apache/spark/pull/36583#discussion_r876501196
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala:
##########
@@ -419,7 +419,13 @@ 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.
+ if (schema.hasExistenceDefaultValues) {
+ for ((value: Any, i: Int) <- schema.existenceDefaultValues.zipWithIndex)
{
Review Comment:
Oh yeah. `zipWithIndex` is actually pretty slow too IIRC.
--
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]