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/04/03 07:43:20 UTC
[GitHub] [spark] cloud-fan commented on a diff in pull request #40630: [SPARK-42997][SQL] TableOutputResolver must use correct column paths in error messages for arrays and maps
cloud-fan commented on code in PR #40630:
URL: https://github.com/apache/spark/pull/40630#discussion_r1155591664
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TableOutputResolver.scala:
##########
@@ -179,8 +179,9 @@ object TableOutputResolver {
addError(s"Cannot write nullable elements to array of non-nulls: '${colPath.quoted}'")
None
} else {
- val param = NamedLambdaVariable("x", inputType.elementType, inputType.containsNull)
- val fakeAttr = AttributeReference("x", expectedType.elementType, expectedType.containsNull)()
+ val param = NamedLambdaVariable("element", inputType.elementType, inputType.containsNull)
Review Comment:
`element` is a virtual field name for arrays, to reference array elements.
--
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