Github user cloud-fan commented on the pull request:

    https://github.com/apache/spark/pull/4068#issuecomment-70447398
  
    The problem is that: Currently the `GetField` class is an operation which 
picks the first field whose name equal to the required `fieldName` with case 
sensitive. As I said before, we will parse `a.b[0].c.d` to 
`GetField(GetField(GetItem(Unresolved("a.b"), 0), "c"), "d")`. For the `a.b`, 
we can check anything we want before build `GetField`, but for the 2 outer 
`GetFiled`, we can only do the check in `Analyzer`(or we can expose `resolver` 
to `GetField`, but it's not recommended).
    
    So we need a way to indicate whether a `GetField` need analyse or not.
    
    For SPARK-3698, we can do this by searching required field with case 
sensitive, if success, we are done. if not, we still have chance if the 
resolver is case insensitive, so we can do the check in `Analyzer` as @marmbrus 
did in https://github.com/apache/spark/pull/3724.
    
    For SPARK-5278 here, it's more complicated. it seems to me that the only 
way is adding a flag to `GetField`, or introduce `UnresolvedGetField`.
    
    What do you think? @marmbrus @liancheng


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to