-
Notifications
You must be signed in to change notification settings - Fork 81
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
GRPC support for MultiJoin, improved support for RangeJoin #5153
Conversation
proto/proto-backplane-grpc/src/main/proto/deephaven/proto/table.proto
Outdated
Show resolved
Hide resolved
|
||
message MultiJoinTablesRequest { | ||
Ticket result_id = 1; | ||
// It is considered an error if both `source_ids` and `multi_join_inputs` are provided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a comment, this will appear on the source_ids
field in each language, rather than be general for the body of the message. Consider moving to just before the message itself, or duplicate it to the multi_join_inputs
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...that said, this might be better expressed as a oneof
? Reading the logic in the java server impl, if multi_join_inputs
is provided, neither source_ids
nor columns_to_match
can be specified (i.e. "will be empty")?
I'm not above just making the runtime logic encode this instead of the message format, but there is something to be said for making the serialization api simply not support invalid states.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as @devinrsmith pointed out, it's really (source_ids + columns_to_match) ^ multi_join_inputs
that needs to be enforced. oneof
doesn't seem to work here without adding another nesting layer which I think would break backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean "break backward compatibility" - this is ostensibly a brand new message, yeah?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. RangeJoin is published, MultiJoin is new.
proto/proto-backplane-grpc/src/main/proto/deephaven/proto/table.proto
Outdated
Show resolved
Hide resolved
proto/proto-backplane-grpc/src/main/proto/deephaven/proto/table.proto
Outdated
Show resolved
Hide resolved
proto/proto-backplane-grpc/src/main/proto/deephaven/proto/table.proto
Outdated
Show resolved
Hide resolved
server/src/main/java/io/deephaven/server/table/ops/MultiJoinGrpcImpl.java
Show resolved
Hide resolved
server/src/main/java/io/deephaven/server/table/ops/RangeJoinGrpcImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/io/deephaven/server/table/ops/RangeJoinGrpcImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/io/deephaven/server/table/ops/RangeJoinGrpcImpl.java
Outdated
Show resolved
Hide resolved
// Specifies the range match parameters as a parseable string. Providing `range_match` in the GRPC call is the | ||
// alternative to detailed range match parameters provided in the `range_start_column`, `range_start_rule`, | ||
// `right_range_column`, `range_end_rule`, and `left_end_column` fields. | ||
string range_match = 11; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to expose this to io.deephaven.qst.table.RangeJoinTable
? (The answer may be no.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, this adds a shortcut / additional way to populate the RangeJoinMatch
but doesn't replace it.
repeated string columns_to_add = 4; | ||
} | ||
|
||
message MultiJoinTablesRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is now the time to plumb this through io.deephaven.qst
/ io.deephaven.api.TableOperations
? If not, please create a ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #5158
server/src/main/java/io/deephaven/server/table/ops/MultiJoinGrpcImpl.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved of proto structure, documentation.
This PR adds GRPC support for
MultiJoin
, allowing clients to efficiently join multiple tables. It also improves support forRangeJoin
by exposing astring
input for specifying the match criteria.Note that this implementation directly returns a
Table
as opposed to the server-side calls which returnMultiJoinTable
objects. The more complex interface can be exposed to GRPC along-side this implementation when we add some additional desired functionality toMultiJoinTable
.Closes #4281