Skip to content

feat(datafusion): Add DDL support with PRIMARY KEY constraint syntax#237

Open
JingsongLi wants to merge 1 commit intoapache:mainfrom
JingsongLi:ddl
Open

feat(datafusion): Add DDL support with PRIMARY KEY constraint syntax#237
JingsongLi wants to merge 1 commit intoapache:mainfrom
JingsongLi:ddl

Conversation

@JingsongLi
Copy link
Copy Markdown
Contributor

Purpose

  • Add PaimonDdlHandler for CREATE TABLE, ALTER TABLE (ADD/DROP/RENAME COLUMN, RENAME TABLE)
  • Add PaimonTableFactory for CREATE EXTERNAL TABLE via DataFusion TableProviderFactory
  • Extend PaimonCatalogProvider/SchemaProvider with CREATE/DROP SCHEMA and DROP TABLE
  • Add arrow_to_paimon_type and arrow_fields_to_paimon to paimon::arrow for Arrow-to-Paimon type conversion
  • Support PRIMARY KEY (col, ...) constraint syntax in CREATE TABLE DDL

Brief change log

Tests

API and Format

Documentation

- Add PaimonDdlHandler for CREATE TABLE, ALTER TABLE (ADD/DROP/RENAME COLUMN, RENAME TABLE)
- Add PaimonTableFactory for CREATE EXTERNAL TABLE via DataFusion TableProviderFactory
- Extend PaimonCatalogProvider/SchemaProvider with CREATE/DROP SCHEMA and DROP TABLE
- Add arrow_to_paimon_type and arrow_fields_to_paimon to paimon::arrow for Arrow-to-Paimon type conversion
- Support PRIMARY KEY (col, ...) constraint syntax in CREATE TABLE DDL
match &statements[0] {
Statement::CreateTable(create_table) => self.handle_create_table(create_table).await,
Statement::AlterTable {
name, operations, ..
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Statement::AlterTable has an if_exists flag, but it is ignored here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants