Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delta Sharing Server to support return response in delta log format #335

Merged
merged 15 commits into from
Jul 13, 2023

Conversation

linzhou-db
Copy link
Collaborator

@linzhou-db linzhou-db commented Jun 27, 2023

Delta Sharing Server to support return response in delta log format, 2 main changes:

  1. Added a set of Delta* actions in model.scala, used when the requested format is delta.
  2. Delta sharing server able to parse delta-sharing-capabilities header in request and handle the requested format.

This is part 1 for issue #341

original prototype in #298.

@linzhou-db linzhou-db self-assigned this Jun 27, 2023

/**
* DeltaAddFile used in delta sharing protocol, copied from AddFile in delta.
* Adding 4 fields: id/version/timestamp/expirationTimestamp.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do these 4 field corresponds to?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are delta sharing related fields.
Added more comment.

/**
* DeltaAddFile used in delta sharing protocol, copied from AddFile in delta.
* Adding 4 fields: id/version/timestamp/expirationTimestamp.
* Ignoring 1 field: tags.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we are missing more fields (not just tags). Could we document them as well?
deletionVector, baseRowId, defaultRowCommitVersion

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: are these fields all require minReaderVersion > 2?
If so we would skip them in the oss server change for now, since this change focuses on responseFormat=delta, we could add another PR to support DV, etc.

@@ -560,6 +568,10 @@ object DeltaSharingService {
endingTimestamp.map(DeltaDataSource.CDF_END_TIMESTAMP_KEY -> _)).toMap
}

private[server] def getResponseFormat(headerCapabilities: Map[String, String]): String = {
headerCapabilities.get(DELTA_SHARING_RESPONSE_FORMAT).getOrElse("parquet")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current change, these keywords "parquet" and "delta" are hard coded everywhere.
Can we define them as constants in a central place and refer to them from everywhere (including tests) ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

@linzhou-db linzhou-db merged commit ef18d8d into delta-io:main Jul 13, 2023
4 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.

None yet

3 participants