You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2023/02/28 05:31:29 UTC

[GitHub] [spark] cloud-fan commented on pull request #40206: [SPARK-42611][SQL] Insert char/varchar length checks for inner fields during resolution

cloud-fan commented on PR #40206:
URL: https://github.com/apache/spark/pull/40206#issuecomment-1447605704

   This is a good catch! I think the fix can be simpler: we encode the raw type information in the root `StructField`, so we don't need to decode it recursively. We can restore the raw type at the very beginning:
   ```
   def resolveOutputColumns(
       ...,
       expected: Seq[Attribute],
       ...) {
       val actualExpectedCols = expected.map { attr =>
           attr.withDataType(restore(attr.metadata))
       }
   }
   ``` 


-- 
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-unsubscribe@spark.apache.org

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


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