ShreyeshArangath commented on code in PR #2077:
URL: https://github.com/apache/auron/pull/2077#discussion_r2921527109
##########
native-engine/datafusion-ext-plans/src/flink/serde/pb_deserializer.rs:
##########
@@ -284,12 +284,11 @@ fn transfer_output_schema_to_pb_schema(
let index_start = field_name.find(".");
if let Some(index) = index_start {
let msg_field_name = &field_name[..index];
- let msg_field_desc =
- message_descriptor
- .get_field_by_name(msg_field_name)
- .expect(&format!(
- "nested field {msg_field_name} not exits in
message_descriptor"
- ));
+ let msg_field_desc = message_descriptor
+ .get_field_by_name(msg_field_name)
+ .unwrap_or_else(|| {
+ panic!("nested field {msg_field_name} not exists in
message_descriptor")
Review Comment:
This applies to the other instances too
```suggestion
panic!("nested field {msg_field_name} does not exist
in message_descriptor")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]