[
https://issues.apache.org/jira/browse/FLINK-21045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272757#comment-17272757
]
Jark Wu commented on FLINK-21045:
---------------------------------
I thought about this again, and maybe [~nicholasjiang] proposed a good point.
Because I found that CREATE CATALOG also saves the catalog instance in
session's memory, instead of persisting in some catalog. Modules and Catalogs
look like something similar.
>From a pure SQL user's perspective, I think maybe {{CREATE MODULE}} + {{USE
>MODULE}} is more easy to use rather than {{LOAD/UNLOAD}}, because this will be
>very similar to what the catalog used now.
For example, register catalog and set current catalog & database:
{code:sql}
CREATE CATALOG myhive
WITH (
'type' = 'hive',
...
);
USE CATALOG myhive;
USE DATABASE mydb;
-- unregister the myhive in CatalogManager
DROP CATALOG myhive;
{code}
And we can have module statements like following:
{code:sql}
-- register and load myhive into ModuleManager, append at the end
CREATE MODULE myhive
WITH (
'type' = 'hive',
...
);
-- reorder modules
USE MODULES myhive, core;
-- unload module, remove it from ModuleManager
DROP MODULE myhive;
{code}
Hi [~twalthr], I know the LOAD/UNLOAD syntax has been approved years ago.
However, we may still have change to think about it again. What do you think
about it?
> Support 'load module' and 'unload module' SQL syntax
> ----------------------------------------------------
>
> Key: FLINK-21045
> URL: https://issues.apache.org/jira/browse/FLINK-21045
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Affects Versions: 1.13.0
> Reporter: Nicholas Jiang
> Assignee: Jane Chan
> Priority: Major
> Fix For: 1.13.0
>
>
> At present, Flink SQL doesn't support the 'load module' and 'unload module'
> SQL syntax. It's necessary for uses in the situation that users load and
> unload user-defined module through table api or sql client.
> SQL syntax has been proposed in FLIP-68:
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-68%3A+Extend+Core+Table+System+with+Pluggable+Modules
--
This message was sent by Atlassian Jira
(v8.3.4#803005)