feat(datafusion): support REST Catalog CREATE VIEW#497
Merged
JingsongLi merged 2 commits intoJul 11, 2026
Conversation
leaves12138
requested changes
Jul 10, 2026
leaves12138
left a comment
There was a problem hiding this comment.
Thanks for adding persistent REST view creation. The main flow and the existing targeted tests look good, but I found two correctness issues that should be addressed before merge. I reproduced both with focused regression cases locally.
leaves12138
approved these changes
Jul 11, 2026
leaves12138
left a comment
There was a problem hiding this comment.
Re-reviewed the latest changes. Both previous issues are fixed correctly: COPY GRANTS is explicitly rejected with regression coverage, and CREATE VIEW now maps a missing parent database to DatabaseNotExist. The focused DataFusion and REST Catalog tests, formatting check, and diff check all pass locally. LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add end-to-end persistent
CREATE VIEWsupport for Paimon REST Catalogs throughSQLContext. The defining query is planned in the view's owning namespace, its schema is inferred by DataFusion, and the Java-compatible view request is persisted through the catalog API.Changes
CreateViewRequest,ViewSchema::new,Catalog::create_view, andViewAlreadyExistIF NOT EXISTS, and HTTP 501 fallbackCREATE VIEW [IF NOT EXISTS] name [(columns)] AS queryinSQLContextTesting
cargo test -p paimon --test rest_object_models_test --test rest_api_test --test rest_catalog_testcargo test -p paimon-datafusion --lib sql_context::tests -- --test-threads=1cargo test -p paimon-datafusion --lib persistent_rest_catalog_view_ -- --test-threads=1cargo clippy -p paimon -p paimon-datafusion --lib --tests -- -D warningscargo fmt --all -- --checkmkdocs build --strictNotes
CREATE VIEWis implemented by REST Catalog; other catalog implementations keep the defaultUnsupportedbehavior.CREATE OR REPLACE VIEW, materialized/secure views, comments/options, persistentALTER VIEW/DROP VIEW, and persistent function DDL remain out of scope.