Kimahriman commented on pull request #32448:
URL: https://github.com/apache/spark/pull/32448#issuecomment-843985070


   > > The code change itself looks good. It's better to clarify why there was 
a failure before. Sorting the nested fields shouldn't lead to a bug that 
`b:struct<ba:string:bb:string>` becomes `b:struct<aa:string,bb:string>`.
   > 
   > I'm not sure about it. @Kimahriman Do you have idea? If not, I may take 
some time debugging it.
   
   It had something to do with `sortStructFieldsInWithFields`. Changing the 
order of the fields in a `CreateNamedStruct` corrupted the parent or children 
expressions in the tree. If you change the `transformUp` to `transformDown`, 
you get the schemas correctly resolve but they actually have the wrong value in 
the field (i.e. the value of a.aa is actually in column b.ba). But I can't say 
I fully understand it


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

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



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

Reply via email to