Skip to content

Answer change data and request mistakes with specific errors - #196

Merged
littlegrasscao merged 2 commits into
mainfrom
fix/error-validation-messages
Nov 16, 2026
Merged

littlegrasscao merged 2 commits into
mainfrom
fix/error-validation-messages

Conversation

@littlegrasscao

@littlegrasscao littlegrasscao commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Depends on #195.

Change Data Feed failures and request mistakes that the client tests exercise are answered the way Delta Sharing answers them.

Case Answer
A change feed range that reaches a version that did not record change data 403 PERMISSION_DENIED "Unable to access change data feed for <share>.<schema>.<table>. CDF is not enabled on the original delta table for version <n>. Please contact your data provider."
The same, found after the response has begun The stream ends with an endStreamAction carrying <ERRORCODE>: <message> and httpStatusErrorCode for a client that asked for one, and with a line that is not JSON, naming the error, otherwise
endingTimestamp after the latest commit 400 INVALID_PARAMETER_VALUE "The provided timestamp(<ts>) is after the latest table version available to this table (<latest>). Please use a timestamp less than or equal to <latest>"
More than one of version, timestamp, startingVersion in a query body "Please only provide one of: version,timestamp,startingVersion." (checked before any is parsed)
Negative startingVersion; startingVersion after endingVersion "startingVersion cannot be negative"; "startingVersion(S) must be smaller than or equal to endingVersion(E)."
A timestamp that is not ISO-8601 "Invalid timestamp: <reason>."

Change

  • ChangeDataNotRecordedException is thrown by the reader; ProtocolTables names the table as the share does.
  • NdjsonResponse ends a stream that fails after it began with the error instead of aborting it; EndStreamAction gains httpStatusErrorCode.
  • DeltaTableQueryReader checks endingTimestamp against the latest commit.
  • A Change Data Feed boundary is a version or a timestamp, not both: a request that gives both startingVersion and startingTimestamp, or both endingVersion and endingTimestamp, is rejected with 400 INVALID_PARAMETER_VALUE "Multiple <starting|ending> arguments provided for CDF read. Please provide one of either <starting|ending>Timestamp or <starting|ending>Version.", before the table is read.

Test plan

  • mvn -pl opensharing-server-core,opensharing-server clean test (Java 17) passes; cloud-gated integration classes need credentials, and their expectations were updated for CI.

This pull request and its description were written by Isaac.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

🔍 OpenCodeReview found 2 issue(s) in this PR.

  • ✅ Successfully posted inline: 1 comment(s)
  • ⏭️ Skipped (overlap with history): 1 comment(s)

@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from 0c9e105 to 47dfa91 Compare November 13, 2026 04:34
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from 47dfa91 to a9dd4c4 Compare November 13, 2026 04:53
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from a9dd4c4 to 87f1c48 Compare November 13, 2026 05:08
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from 87f1c48 to f18253a Compare November 13, 2026 05:20
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from f18253a to 231fc1b Compare November 13, 2026 05:41
@littlegrasscao littlegrasscao changed the title Answer version, range and change-data mistakes with specific errors Validate version and range parameters and answer change-data failures as the Delta Sharing server does Nov 13, 2026
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from 231fc1b to 0190e71 Compare November 13, 2026 05:51
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from 0190e71 to 5927e2f Compare November 13, 2026 05:58
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from 5927e2f to 925cb39 Compare November 13, 2026 07:18
@littlegrasscao littlegrasscao changed the title Validate version and range parameters and answer change-data failures as the Delta Sharing server does Answer change data and request mistakes with specific errors Nov 13, 2026
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from 925cb39 to 6ac8b02 Compare November 13, 2026 07:50
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from 6ac8b02 to 28f4cff Compare November 13, 2026 17:10
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from 28f4cff to cab4f56 Compare November 13, 2026 17:38
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from cab4f56 to 2c17239 Compare November 13, 2026 21:46
Base automatically changed from fix/incomplete-delta-log-catalog-error to main November 13, 2026 21:54
Sun Cao and others added 2 commits November 13, 2026 13:54
- A Change Data Feed range that reaches a version that did not record change
  data is answered 403 PERMISSION_DENIED, naming the table as the share does.
  When the response has already begun, the error ends it: in the
  endStreamAction with its status when the client asked for one, and
  otherwise in a line that is not JSON, so the client fails on it.
- An endingTimestamp after the latest commit is rejected with the latest
  commit time to ask for instead.
- version, timestamp and startingVersion are mutually exclusive, checked
  before any of them is parsed.
- A Change Data Feed boundary is a version or a timestamp, not both: giving
  both a starting or both an ending one is rejected before the table is read.
- A negative startingVersion, a range that ends before it starts, and a
  timestamp that is not ISO-8601 are rejected with specific messages.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Sun Cao <sun.cao+data@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: Sun Cao <sun.cao+data@databricks.com>
@littlegrasscao
littlegrasscao force-pushed the fix/error-validation-messages branch from e91f5b7 to 39f6947 Compare November 13, 2026 21:54
@littlegrasscao
littlegrasscao merged commit c7e11d1 into main Nov 16, 2026
5 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