You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Richard Chen (Jira)" <ji...@apache.org> on 2024/04/29 00:46:00 UTC

[jira] [Created] (SPARK-48033) Support Generated Column expressions that are `RuntimeReplaceable`

Richard Chen created SPARK-48033:
------------------------------------

             Summary: Support Generated Column expressions that are `RuntimeReplaceable`
                 Key: SPARK-48033
                 URL: https://issues.apache.org/jira/browse/SPARK-48033
             Project: Spark
          Issue Type: Sub-task
          Components: Spark Core
    Affects Versions: 4.0.0
            Reporter: Richard Chen


Currently, default columns that have a default of a `RuntimeReplaceable` expression fails.

This is because the `AlterTableCommand` constant folds before replacing expressions with the actual implementation. For example:
```
sql(s"CREATE TABLE t(v VARIANT DEFAULT parse_json('1')) USING PARQUET")
sql("INSERT INTO t VALUES(DEFAULT)")
```

fails because `parse_json` is `RuntimeReplaceable` and is evaluated before the analyzer inserts the correct expression into the plan



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