[
https://issues.apache.org/jira/browse/SPARK-44313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kent Yao reassigned SPARK-44313:
--------------------------------
Assignee: Allison Portis
> 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
>
> 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]