[ 
https://issues.apache.org/jira/browse/SPARK-26402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

DB Tsai updated SPARK-26402:
----------------------------
    Description: 
{{GetStructField}} with different optional names should be semantically equal. 
We will use this as building block to compare the nested fields used in the 
plans to be optimized by catalyst optimizer.

This PR also fixes a bug below that accessing nested fields with different 
cases in case insensitive mode will result result {{AnalysisException}}.

{code:java}
sql("create table t (s struct<i: Int>) using json")
sql("select s.I from t group by s.i")
{code}

which is currently failing
{code:java}
org.apache.spark.sql.AnalysisException: expression 'default.t.`s`' is neither 
present in the group by, nor is it an aggregate function
{code}
 

  was:
GetStructField with different optional names should be semantically equal. We 
will use this as building block to compare the nested fields used in the plans 
to be optimized by catalyst optimizer.

This PR also fixes a bug below that accessing nested fields with different 
cases in case insensitive mode will result {{AnalysisException}}.

 


> Accessing nested fields with different cases in case insensitive mode
> ---------------------------------------------------------------------
>
>                 Key: SPARK-26402
>                 URL: https://issues.apache.org/jira/browse/SPARK-26402
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: DB Tsai
>            Assignee: DB Tsai
>            Priority: Major
>
> {{GetStructField}} with different optional names should be semantically 
> equal. We will use this as building block to compare the nested fields used 
> in the plans to be optimized by catalyst optimizer.
> This PR also fixes a bug below that accessing nested fields with different 
> cases in case insensitive mode will result result {{AnalysisException}}.
> {code:java}
> sql("create table t (s struct<i: Int>) using json")
> sql("select s.I from t group by s.i")
> {code}
> which is currently failing
> {code:java}
> org.apache.spark.sql.AnalysisException: expression 'default.t.`s`' is neither 
> present in the group by, nor is it an aggregate function
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to