Github user cloud-fan commented on the pull request:

    https://github.com/apache/spark/pull/4904#issuecomment-77337425
  
    Hi @chenghao-intel , your test is failed on my code, and I study into it, 
here is my thoughts.
    First, I think the `LogicalPlan#resolveChildren` logic is not right for 
`Sort`.
    For example, `select a.b from t order by b.a` on data `{"a": {"b": 1}, "b": 
{"a": 1}}`, currently we will try to resolve "a.b" on top of "b.a" instead of 
colunm "a", which is wrong.
    Second, in `ResolveSortReferences`, we may expand the projection list if 
the field used by `order by` is not present. However, for something like 
"a.b.c", what should we add to projection? Just the bottom relation "a" or the 
whole "a.b.c"?
    @marmbrus What do you think?
    I'll dig into it tomorrow.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to