Skip to content

Backport native DESCRIBE DATABASE/SCHEMA parsing - #48

Merged
osipovartem merged 1 commit into
oracle/qualify-table-comment-null-20261107from
backport/describe-object-20261113
Nov 13, 2026
Merged

osipovartem merged 1 commit into
oracle/qualify-table-comment-null-20261107from
backport/describe-object-20261113

Conversation

@osipovartem

Copy link
Copy Markdown

Summary

Backport the namespace portion of Apache sqlparser #2767 to the parser revision actually used by Rustice.

  • Add a native DescribeObject AST for DESC/DESCRIBE DATABASE and SCHEMA, preserving aliases, quoted identifier boundaries, Display, serde and visitors.
  • Preserve this fork's existing DESCRIBE VIEW AST (ExplainTable::has_view_keyword) and existing TABLE/STAGE/FILE FORMAT/SEQUENCE/WAREHOUSE paths.
  • Dispatch namespace statements before EXPLAIN query modifiers: reject forms such as DESC ANALYZE DATABASE d instead of silently losing ANALYZE.
  • Namespace names are not table relations in visitors.
  • Apply small behavior-preserving current-toolchain lint corrections needed for strict all-target/all-feature Clippy.

This PR deliberately targets oracle/qualify-table-comment-null-20261107, the current Rustice parser base, rather than the diverged default branch. Original author and cherry-pick provenance are retained. Runtime support belongs in Rustice; this parser PR alone does not enable execution.

Validation

  • Complete offline all-features suite: 1,590 passed, 7 ignored, zero failures (including 47 doctests).
  • Strict cargo clippy --all-targets --all-features -- -D warnings: passed.
  • Serde-only common-test compilation without the optional serde_json feature: passed; one pre-existing irrefutable-pattern warning remains in this non-all-features configuration.
  • cargo fmt --all -- --check and git diff --check: passed.
  • Regression tests reproduced the legacy VIEW AST break and swallowed query modifiers before the fixes.
  • Independent read-only agent review: approved, no remaining blockers; reviewed diff SHA-256 e3d94375ef7fd87b084aed2302d399ac2f0f8625646a4c8ef29c9bb1db3331e9.

Uses a shared existing target directory; no full DataFusion rebuild or new Snowflake query was needed for parser qualification.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit e727809)
@osipovartem
osipovartem merged commit 7b4ba1c into oracle/qualify-table-comment-null-20261107 Nov 13, 2026
19 checks passed
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