Skip to content

Share a table from a start version - #200

Closed
littlegrasscao wants to merge 1 commit into
fix/unsupported-table-propertiesfrom
fix/shared-table-start-version
Closed

littlegrasscao wants to merge 1 commit into
fix/unsupported-table-propertiesfrom
fix/shared-table-start-version

Conversation

@littlegrasscao

Copy link
Copy Markdown
Collaborator

Depends on #197.

A share can record the first version of a table that recipients may read. A table without one has no limit, as before.

Case Answer
A version, a timestamp resolving to a version, or the start of a change range before the table's start version 403 PERMISSION_DENIED "You can only query table data since version <n>."

Change

  • UpdateShareRequest.DataObject takes an optional startVersion when a table is added to a share. It is stored in a new start_version column of os_shared_data_objects (Flyway migration V2 for H2, MySQL and PostgreSQL) and reported on the share's objects.
  • ProtocolTables passes the table's start version to the readers, and DeltaSnapshots refuses any snapshot opened below it: metadata, snapshot queries, startingVersion queries and the Change Data Feed.

Test plan

  • mvn -pl opensharing-server-core,opensharing-server clean test (Java 17) passes, including the migration test and tests that read before and after a start version through the protocol and the readers.

This pull request and its description were written by Isaac.

A share can record the first version of a table that recipients may read,
set with startVersion on the data object that adds the table, and kept in
a new column of the shared objects. Reading an earlier version is refused
with 403 PERMISSION_DENIED "You can only query table data since version N."
whether the version is asked for directly, resolved from a timestamp, or
the start of a change range. A table without a start version has no
limit.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Sun Cao <sun.cao+data@databricks.com>
@github-actions

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 12 selected item(s).

@littlegrasscao

Copy link
Copy Markdown
Collaborator Author

Not needed: tables are always shared with full history.

@littlegrasscao
littlegrasscao deleted the fix/shared-table-start-version branch November 13, 2026 17:53
An error occurred while trying to automatically change base from fix/unsupported-table-properties to main November 16, 2026 17:59
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