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

Allison Portis updated SPARK-41290:
-----------------------------------
    Description: 
Support GENERATED ALWAYS AS syntax for defining generated columns in create 
table and replace table.

For example,
{code:java}
CREATE TABLE default.example (
    time TIMESTAMP,
    date DATE GENERATED ALWAYS AS (CAST(time AS DATE))
)
{code}
 

This syntax is SQL standard and will enable defining generated columns in Spark 
SQL for data sources that support them.

 

  was:
Support GENERATED ALWAYS AS syntax for defining generated columns in create 
table and replace table.

For example,
{code:java}
CREATE TABLE default.example (
    time TIMESTAMP,
    date DATE GENERATED ALWAYS AS (CAST(time AS DATE))
)
{code}
 

 


> Support GENERATED ALWAYS AS syntax in create/replace table to create a 
> generated column
> ---------------------------------------------------------------------------------------
>
>                 Key: SPARK-41290
>                 URL: https://issues.apache.org/jira/browse/SPARK-41290
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Allison Portis
>            Priority: Major
>
> Support GENERATED ALWAYS AS syntax for defining generated columns in create 
> table and replace table.
> For example,
> {code:java}
> CREATE TABLE default.example (
>     time TIMESTAMP,
>     date DATE GENERATED ALWAYS AS (CAST(time AS DATE))
> )
> {code}
>  
> This syntax is SQL standard and will enable defining generated columns in 
> Spark SQL for data sources that support them.
>  



--
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