[
https://issues.apache.org/jira/browse/SPARK-55155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yuyuan Tang updated SPARK-55155:
--------------------------------
Docs Text:
Users can use foldable expressions in `USE CATALOG` and `SET CATALOG` commands,
including:
SET CATALOG 'my_catalog' -- string literal
SET CATALOG "my_catalog" -- double-quoted string literal
SET CATALOG IDENTIFIER("my_catalog") -- identifier clause
SET CATALOG CAST('catalog_name' AS STRING) -- foldable expression
The SET CATALOG command remains case sensitive and does not support using a
session temporary variable directly without the IDENTIFIER clause.
was:
Users can use foldable expressions in `USE CATALOG` and `SET CATALOG` commands,
including
SET CATALOG 'my_catalog' -- string literal
SET CATALOG "my_catalog" -- double-quoted string literal
SET CATALOG IDENTIFIER("my_catalog") -- identifier clause
SET CATALOG CAST('catalog_name' AS STRING) -- foldable expression
The SET CATALOG command remains case sensitive and does not support using a
session temporary variable directly without the IDENTIFIER clause.
> 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
> Priority: Minor
> Fix For: 4.2.0, 4.1.2
>
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> 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]