[SPARK-57516][DOCS] Update Data Source V2 docs for ViewCatalog and TableViewCatalog#56580
Open
szehon-ho wants to merge 1 commit into
Open
[SPARK-57516][DOCS] Update Data Source V2 docs for ViewCatalog and TableViewCatalog#56580szehon-ho wants to merge 1 commit into
szehon-ho wants to merge 1 commit into
Conversation
…bleViewCatalog ### What changes were proposed in this pull request? Update the Data Source V2 documentation (`docs/sql-data-sources-v2.md`) to reflect the current state of DSV2 view support: - Remove the stale "work in progress -- not yet integrated into query resolution" note on `ViewCatalog`, since view DDL (`CREATE`/`REPLACE`/`ALTER`/`DROP`/`SHOW VIEWS`) and reading from a view (`SELECT`) are now resolved and executed against the catalog. - Correct the `ViewCatalog` method table to match the actual API (`createView(ident, info)`, `replaceView`, `createOrReplaceView`, `viewExists`, `invalidateView`); remove the nonexistent `alterView(ident, changes...)`. - Describe `ViewInfo` as the carrier of a view's metadata. - Add a `TableViewCatalog` section for connectors that expose both tables and views in a single shared namespace, including `loadTableOrView` and `listTableAndViewSummaries`. - Note that the built-in session catalog is not a `ViewCatalog`; DSV2 view support applies to custom catalogs registered via `spark.sql.catalog.<name>`. ### Why are the changes needed? The documentation was out of date with the implementation. `ViewCatalog` is now wired into analysis, DDL execution, and query reads (since 4.2.0), and `TableViewCatalog` was added, but the docs still described the feature as incomplete and listed incorrect method signatures. ### Does this PR introduce _any_ user-facing change? No (documentation-only). ### How was this patch tested? Documentation-only change. Verified the method signatures against `ViewCatalog.java` and `TableViewCatalog.java`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Cursor (Claude Opus 4.8)
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.
What changes were proposed in this pull request?
Update the Data Source V2 documentation (
docs/sql-data-sources-v2.md) to reflect the current state of DSV2 view support:ViewCatalog, since view DDL (CREATE/REPLACE/ALTER/DROP/SHOW VIEWS) and reading from a view (SELECT) are now resolved and executed against the catalog.ViewCatalogmethod table to match the actual API (createView(ident, info),replaceView,createOrReplaceView,viewExists,invalidateView); remove the nonexistentalterView(ident, changes...).ViewInfoas the carrier of a view's metadata.TableViewCatalogsection for connectors that expose both tables and views in a single shared namespace, includingloadTableOrViewandlistTableAndViewSummaries.V2SessionCatalog) is not aViewCatalog; DSV2 view support applies to custom catalogs registered viaspark.sql.catalog.<name>.Why are the changes needed?
The documentation was out of date with the implementation.
ViewCatalogis now wired into analysis, DDL execution, and query reads (since 4.2.0), andTableViewCatalogwas added, but the docs still described the feature as incomplete and listed incorrect method signatures.Does this PR introduce any user-facing change?
No (documentation-only).
How was this patch tested?
Documentation-only change. Verified the documented method signatures against
ViewCatalog.javaandTableViewCatalog.java.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Cursor (Claude Opus 4.8)