You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/06/15 19:52:00 UTC

[jira] [Assigned] (SPARK-39484) V2 write for type struct fails to handle case sensitivity on field names during resolution of V2 write command

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

Apache Spark reassigned SPARK-39484:
------------------------------------

    Assignee: Apache Spark

> V2 write for type struct fails to handle case sensitivity on field names during resolution of V2 write command
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-39484
>                 URL: https://issues.apache.org/jira/browse/SPARK-39484
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.1.1, 3.2.1
>         Environment: {{{}master{}}}, {{3.1.1}}
>            Reporter: Edgar Rodriguez
>            Assignee: Apache Spark
>            Priority: Minor
>
> Summary:
> When a V2 write uses an input with a {{struct}} type which contains differences in the casing of field names, the {{caseSensitive}} config is not being honored, always doing a strict case sensitive comparison.
> Repro:
> {code:java}
> CREATE TABLE tmp.test_table_to (key int, object struct<shardId:int>) USING ICEBERG;
> CREATE TABLE tmp.test_table_from (key int, object struct<shardid:int>) USING HIVE;
> INSERT OVERWRITE tmp.test_table_to SELECT 1 as key, object FROM tmp.test_table_from;{code}
> The above results in Exception:
> {code:java}
> Error in query: unresolved operator 'OverwriteByExpression RelationV2[key#3, object#4] spark_catalog.tmp.test_table_to, true, false;
> 'OverwriteByExpression RelationV2[key#3, object#4] spark_catalog.tmp.test_table_to, true, false
> +- Project [1 AS key#0, object#2]
>    +- SubqueryAlias spark_catalog.tmp.test_table_from
>       +- HiveTableRelation [`tmp`.`test_table_from`, org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe, Data Cols: [key#1, object#2], Partition Cols: []]{code}
>  
> If the casing matches in the struct field names, the v2 write works as expected.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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