zhoufek commented on pull request #16235:
URL: https://github.com/apache/beam/pull/16235#issuecomment-995856066


   > I'm not clear on why we need this, can't we use the Beam schema builder, 
and have it's field order be the same as the SBE schema's field order?
   
   One thing I know is going to be added is semantic type mapping. SBE XML 
schemas allow for a "semanticType" attribute on a field, and outside of a 
direct field mapping, as done in this PR, that's the best way to detect certain 
logical types (e.g. UTCTimestamp). Otherwise, we have little way to distinguish 
types with unique semantic meanings. More on that is 
[here](https://www.fixtrading.org/standards/sbe-online/#field-aspects). That 
could just be another set of overloaded methods, but at a point, it seems like 
the builder pattern done here will be cleaner, especially if anything new comes 
up.
   
   I'm also planning to generate the `PayloadSerializer` at build time, and 
this method will clearly keep that in line with how the schema is generated 
(stubs, IR, or XML). Since there are some benefits and limitations between 
stubs and IR/XML, that seems like it will minimize unexpected behavior.


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