Skip to content

[SPARK-57516][DOCS] Update Data Source V2 docs for ViewCatalog and TableViewCatalog#56580

Open
szehon-ho wants to merge 1 commit into
apache:masterfrom
szehon-ho:docs-dsv2-viewcatalog
Open

[SPARK-57516][DOCS] Update Data Source V2 docs for ViewCatalog and TableViewCatalog#56580
szehon-ho wants to merge 1 commit into
apache:masterfrom
szehon-ho:docs-dsv2-viewcatalog

Conversation

@szehon-ho

Copy link
Copy Markdown
Member

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 (V2SessionCatalog) 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 documented 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)

…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)
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.

1 participant