[
https://issues.apache.org/jira/browse/FLINK-30317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17644628#comment-17644628
]
Jingsong Lee commented on FLINK-30317:
--------------------------------------
Thanks [~Gerrrr] for reporting.
We should check and create default database in FileSystemCatalog and
HiveCatalog.
> Create table in FTS catalog with s3 warehouse throws DatabaseNotExistException
> ------------------------------------------------------------------------------
>
> Key: FLINK-30317
> URL: https://issues.apache.org/jira/browse/FLINK-30317
> Project: Flink
> Issue Type: Bug
> Components: Table Store
> Reporter: Alex Sorokoumov
> Priority: Major
>
> {noformat}
> Flink SQL> CREATE CATALOG my_catalog WITH (
> > 'type'='table-store',
> > 'warehouse'='s3://bucket/my-tablestore'
> > );
> [INFO] Execute statement succeed.
> Flink SQL> USE CATALOG my_catalog;
> [INFO] Execute statement succeed.
> Flink SQL> CREATE TABLE word_count (
> > word STRING PRIMARY KEY NOT ENFORCED,
> > cnt BIGINT
> > );
> [ERROR] Could not execute SQL statement. Reason:
> org.apache.flink.table.catalog.exceptions.DatabaseNotExistException: Database
> default does not exist in Catalog my_catalog. {noformat}
> Creating the table in the default catalog works though:
> {noformat}
> Flink SQL> use catalog default_catalog;
> [INFO] Execute statement succeed.
> Flink SQL> CREATE TABLE word_count (
> > word STRING PRIMARY KEY NOT ENFORCED,
> > cnt BIGINT
> > ) WITH (
> > 'connector'='table-store',
> > 'path'='s3://bucket/my-tablestore',
> > 'auto-create'='true'
> > );
> [INFO] Execute statement succeed.
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)