Skip to content

Flink SQL client throws CatalogException although catalog should exist #635

Description

@michaelkoepf

Search before asking

  • I searched in the issues and found nothing similar.

Fluss version

0.6.0 (latest release)

Please describe the bug 🐞

Minimal reproducible example.

  1. Spin up containers following the Flink quickstart guide
  2. Enter the SQL client docker compose exec jobmanager ./sql-client
  3. Create catalog
CREATE CATALOG fluss_catalog WITH (
    'type' = 'fluss',
    'bootstrap.servers' = 'coordinator-server:9123'
);
USE CATALOG fluss_catalog;
  1. Exit the SQL client.
  2. Enter the SQL client again.
USE CATALOG fluss_catalog;

throws

[ERROR] Could not execute SQL statement. Reason:
org.apache.flink.table.catalog.exceptions.CatalogException: A catalog with name [fluss_catalog] does not exist.

However, note that when creating tables in a catalog, the tables are correctly assigned.

  1. Spin up containers following the Flink quickstart guide
  2. Enter the SQL client docker compose exec jobmanager ./sql-client
  3. Create catalog
CREATE CATALOG fluss_catalog WITH (
    'type' = 'fluss',
    'bootstrap.servers' = 'coordinator-server:9123'
);
USE CATALOG fluss_catalog;
  1. Create a table in fluss_catalog
CREATE TABLE fluss_order (
    `order_key` BIGINT,
    `cust_key` INT NOT NULL,
    `total_price` DECIMAL(15, 2),
    `order_date` DATE,
    `order_priority` STRING,
    `clerk` STRING,
    `ptime` AS PROCTIME(),
    PRIMARY KEY (`order_key`) NOT ENFORCED
);
  1. Exit the SQL client.
  2. Enter the SQL client again.
USE CATALOG fluss_catalog;

throws

[ERROR] Could not execute SQL statement. Reason:
org.apache.flink.table.catalog.exceptions.CatalogException: A catalog with name [fluss_catalog] does not exist.
  1. "Recreate" catalog
CREATE CATALOG fluss_catalog WITH (
    'type' = 'fluss',
    'bootstrap.servers' = 'coordinator-server:9123'
);
USE CATALOG fluss_catalog;
  1. Although the client throws the CatalogException when we do not "recreate" the catalog, the table is there after "recreating" the catalog.
SHOW TABLES;
+-----------------+
|      table name |
+-----------------+
|     fluss_order |
+-----------------+

Solution

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions