Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12952#discussion_r62352447
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
    @@ -394,7 +405,7 @@ class Dataset[T] private[sql](
        * @group basic
        * @since 1.6.0
        */
    -  def schema: StructType = queryExecution.analyzed.schema
    +  def schema: StructType = resolvedTEncoder.schema
    --- End diff --
    
    I'm kind of worried about it. We can't guarantee encoder's schema is always 
same with plan's schema(in this PR we add a project to try to make them 
consistent, but it can't handle inner field). If they are different, users may 
select a un-exist column which exists in schema.
    
    cc @marmbrus 


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