Yuyuan Tang created SPARK-55155:
-----------------------------------
Summary: Support foldable expression for SET CATALOG
Key: SPARK-55155
URL: https://issues.apache.org/jira/browse/SPARK-55155
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 4.2.0, 4.1.2
Reporter: Yuyuan Tang
Fix For: 4.2.0, 4.1.2
Currently, we support using an A string literal, a simple identifier, and the
IDENTIFIER clause for `SET CATALOG`.
{code:sql}
SET CATALOG cat_name;
SET CATALOG "cat_name";
SET CATALOG IDENTIFIER(:param); {code}
This ticket is to support foldable expression for `SET CATALOG`, e.g.,
{code:sql}
SET CATALOG CAST("cat_name"as String);
SET CATALOG CONCAT('cat_', 'name');{code}
Note:
# `SET CATALOG` is case-sensitive, meaning that `SET CATALOG CaT_NaMe` will
try to set the catalog to `CaT_NaMe` and will throw a NOT_FOUND error if it
does not exist.
# This ticket does not support session temporary variables in `SET CATALOG`.
Users can run `SET CATALOG IDENTIFIER(session_temp_var)` to use the session
temporary variable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]