github-actions[bot] commented on code in PR #65856:
URL: https://github.com/apache/doris/pull/65856#discussion_r3635500062


##########
be/src/core/data_type_serde/data_type_struct_serde.cpp:
##########
@@ -157,7 +157,7 @@ Status 
DataTypeStructSerDe::deserialize_one_cell_from_json(IColumn& column, Slic
                     struct_column.get_column(j).pop_back(1);
                 }
                 return Status::InvalidArgument(
-                        "Actual struct field number is more than schema field 
number {}.",
+                        "Actual struct field number {} is more than schema 
field number {}.",

Review Comment:
   [P2] Report the overflowing field as a count
   
   `field_pos` counts fields that have already been deserialized, and this 
check runs before consuming the extra field. For named fields `a,b` and input 
`{"a":1,"b":2,"c":3}`, the delimiter before `c` reaches this branch with 
`field_pos == elem_size == 2`, so the new diagnostic says `Actual struct field 
number 2 is more than schema field number 2.` The actual count here is 
`field_pos + 1`. Please apply that adjustment to all three changed overflow 
branches (lines 160, 190, and 221), ideally with a direct too-many-fields SerDe 
test.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to