-
Notifications
You must be signed in to change notification settings - Fork 597
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
feat: message_as_jsonb
to handle circle dep in protobuf
#19935
Conversation
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.
Pretty sure the PR is incomplete and untested so I converted it back to draft. You will notice the missing pieces when you start testing (in addition to the ci failure).
int32_value_field(#37): Struct { value: Int32 }, type_name: google.protobuf.Int32Value, field_descs: [value(#36): Int32], | ||
string_value_field(#39): Struct { value: Varchar }, type_name: google.protobuf.StringValue, field_descs: [value(#38): Varchar], | ||
map_struct_field(#44): Map(Varchar,Struct { id: Int32, name: Varchar }), type_name: all_types.AllTypes.MapStructFieldEntry, field_descs: [key(#40): Varchar, value(#43): Struct { | ||
any_field(#33): Jsonb, |
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.
Intentional bug fix
Co-authored-by: tabversion <[email protected]>
Co-authored-by: tabversion <[email protected]>
cherry pick to release 2.1 #19992 |
…19992) Co-authored-by: tabversion <[email protected]>
…19987) Signed-off-by: tabversion <[email protected]> Co-authored-by: Bohan Zhang <[email protected]> Co-authored-by: tabversion <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
resolve #19915
following #18380
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.
add a new field
messages_as_jsonb
dedicated toencode protobuf
, it lists fields should be seen as jsonb type and we can leverage this to handle recursive typesfor example,
If not set in
messages_as_jsonb
, the type in RW should beA struct<int_value int, string_value varchar>
.If
messages_as_jsonb='some_pkg.A'
, the type in RW should beA jsonb
.When finding a recursive def in proto, we will display the circular dep relation and prevent creating the source/table.
Users can refer the error message and adding the types to
messages_as_jsonb