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:27:00 UTC
[jira] [Assigned] (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 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org