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