Forgot to include a link to the code. The mapping from primitive type to coders can be found here: https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/RowCoder.java#L44
On Tue, Jul 30, 2019 at 11:24 AM Brian Hulette <[email protected]> wrote: > Currently the coders used for integer types in RowCoder (and thus > SchemaCoder) are inconsistent. For int32 and int64, we use VarIntCoder and > VarLongCoder which encode those types with variable width, but for byte and > int16 we use ByteCoder and BigEndianShortCoder, which are fixed width. > > Is it a conscious choice to use variable width coders just for the larger > width integers (where they could have the most benefit), or should we > consider normalizing these coders to always be fixed width? >
