Skip to content

Support Paimon database statements in DataFusion SQLContext #626

Description

@shyjsarah

Problem

SQLContext delegates database statements to DataFusion, whose database semantics do not match Paimon:

  • CREATE DATABASE creates a DataFusion catalog instead of a Paimon database.
  • SHOW DATABASES, DROP DATABASE, and USE <database> are not supported.
  • Paimon databases are exposed internally as DataFusion schemas, so users currently need schema terminology for database operations.

Proposed behavior

Handle the following statements directly through the current Paimon Catalog:

SHOW DATABASES;
CREATE DATABASE [IF NOT EXISTS] [catalog.]db;
DROP DATABASE [IF EXISTS] [catalog.]db [CASCADE];
USE [catalog.]db;

Keep CREATE SCHEMA and DROP SCHEMA working as compatibility aliases. Unsupported database statement options should fail explicitly rather than being ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions