You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Kent Yao (Jira)" <ji...@apache.org> on 2023/07/06 02:28:00 UTC

[jira] [Resolved] (SPARK-44313) Generated column expression validation fails if there is a char/varchar column anywhere in the schema

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

Kent Yao resolved SPARK-44313.
------------------------------
    Fix Version/s: 3.5.0
                   3.4.2
       Resolution: Fixed

Issue resolved by pull request 41868
[https://github.com/apache/spark/pull/41868]

> Generated column expression validation fails if there is a char/varchar column anywhere in the schema
> -----------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-44313
>                 URL: https://issues.apache.org/jira/browse/SPARK-44313
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.4.0, 3.4.1
>            Reporter: Allison Portis
>            Assignee: Allison Portis
>            Priority: Major
>             Fix For: 3.5.0, 3.4.2
>
>
> When validating generated column expressions, this call https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/GeneratedColumn.scala#L123 to checkAnalysis fails when there are char or varchar columns anywhere in the schema.
>  
> For example, this query will fail
> {code:java}
> CREATE TABLE default.example (
>     name VARCHAR(64),
>     tstamp TIMESTAMP,
>     tstamp_date DATE GENERATED ALWAYS AS (CAST(tstamp as DATE))
> ){code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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