Allison Portis created SPARK-44313:
--------------------------------------

             Summary: 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.1, 3.4.0
            Reporter: Allison Portis


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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to