-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
[FLINK-30093][formats] Fix compile errors for google.protobuf.Timestamp type #21613
Conversation
Related: #21436 |
...rmats/flink-protobuf/src/test/java/org/apache/flink/formats/protobuf/TimestampToRowTest.java
Outdated
Show resolved
Hide resolved
f06c17e
to
d2ccf3f
Compare
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.
@laughingman7743 Thanks for your contribution, the code is in a very good shape. I just left a few comments. Please take a look at it when you have time.
...rotobuf/src/main/java/org/apache/flink/formats/protobuf/deserialize/ProtoToRowConverter.java
Outdated
Show resolved
Hide resolved
...rmats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/util/PbFormatUtils.java
Outdated
Show resolved
Hide resolved
...rmats/flink-protobuf/src/main/java/org/apache/flink/formats/protobuf/util/PbFormatUtils.java
Outdated
Show resolved
Hide resolved
flink-formats/flink-protobuf/src/test/proto/test_simple_noouter_nomulti.proto
Outdated
Show resolved
Hide resolved
flink-formats/flink-protobuf/src/test/proto/test_simple_outer_nomulti.proto
Show resolved
Hide resolved
flink-formats/flink-protobuf/src/test/proto/test_timestamp.proto
Outdated
Show resolved
Hide resolved
e86b868
to
32f5979
Compare
@maosuhan I have addressed the comments, PTAL when you have time 🙏 |
@flinkbot run azure |
32f5979
to
76f1923
Compare
76f1923
to
b40e9f2
Compare
@laughingman7743 Thanks for your quick quick fix. We are almost there. Would you add another unit test like TimestampMultiRowToProto.java to make sure flink row can be correctly converted to protobuf object? |
… data to proto timestamp data.
@laughingman7743 The code LGTM. Would you also add documentation in protobuf page describing how to use timestamp type or other internal provided type? Some users may not know the corresponding flink type of Timestamp is a row structure. |
…estamp type in the docs
@maosuhan I have added a description of data mapping of type google.protobuf.Timestamp to the documentation. https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=44568&view=logs&j=af184cdd-c6d8-5084-0b69-7e9c67b35f7a&t=160c9ae5-96fd-516e-1c91-deb81f59292a |
Currently all tests pass. (Maybe there is a flaky test in the e2e test). |
@laughingman7743 It looks all right now. @libenchao Do you have time to take another look at this? |
@maosuhan I will, but I've been a little busy lately. To manage your expectation, it won't be quick. |
@laughingman7743 Thanks for your contribution and @maosuhan thanks for your review. The PR looks good, I'm merging. |
* [FLINK-18202][protobuf] Introduce protobuf format This closes apache#14376 * [FLINK-29062][build] Fix protobuf plugin proxy issue on flink-protobuf module. * [FLINK-30093][protobuf] Fix compile errors for google.protobuf.Timestamp type Close apache#21613 * add schema as a format option * bump to 1.15-SNAPSHOT --------- Co-authored-by: maosuhan <[email protected]> Co-authored-by: jiabao.sun <[email protected]> Co-authored-by: laughingman7743 <[email protected]>
What is the purpose of the change
The current implementation does not take into consideration the case where another package is imported and used for a message, so it seems that the way getOuterProtoPrefix is determined needs to be improved.
This improvement allows the google.protobuf.Timestamp type to be handled.
Brief change log
Verifying this change
The added test case of google.protobuf.Timestamp type should succeed.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation