etseidl opened a new issue, #9946:
URL: https://github.com/apache/arrow-rs/issues/9946

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   Boolean struct fields in the Thrift compact protocol are encoded solely as 
either `FieldTypeFalse` or `FieldTypeTrue`, with no encoded data. When parsing 
a Thrift field header, the current parser will save an `Option<bool>` in the 
`FieldIdentifier` struct, which is then used to fill in the value for the 
struct field. This leads to some complicated branching in `read_field_begin`, 
which is on the hot path.
   
   **Describe the solution you'd like**
   Remove the `bool_val` field from the `FieldIdentifier` and instead use the 
`field_type` to determine whether `true` or `false` was encoded.
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features 
you've considered.
   -->
   
   **Additional context**
   The current behavior is a carryover from the behavior of the old generated 
parser.
   


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

Reply via email to