TheNeuralBit commented on pull request #11609:
URL: https://github.com/apache/beam/pull/11609#issuecomment-624810068


   Ahh ok. I'm sorry for being so dense, I see what you're saying now. In 
`toBaseType` we validate that the array's length == the fixed length: 
   
https://github.com/apache/beam/blob/5e1571760b61b8ce247d5375b71c8df4d69d6409/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/logicaltypes/FixedBytes.java#L67-L70
   
   This is where the exception checked in your new tests is thrown.
   
   So we never actually get into `toInputType` where we could accept a shorter 
byte array and zero-pad. And there doesn't seem to be any other way to set a 
value by base type with a shorter byte array and pad it.
   
   This seems to be a holdover. Previously Row stored logical type values as 
their base type, so we probably called `toBaseType(toInputType(x))`.


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to