[
https://issues.apache.org/jira/browse/FLINK-25187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17459873#comment-17459873
]
Timo Walther commented on FLINK-25187:
--------------------------------------
Let's do exactly the same as for CHAR/VARCHAR for consistency. We pad in the
sinks and either add an additional config option or reuse the same option for
CHAR/VARCHAR (is not good to have too many options imho). Again, this type is
not very frequently used. We just improve its correctness for completeness and
consistency.
> Apply padding for BINARY(<precision>)
> -------------------------------------
>
> Key: FLINK-25187
> URL: https://issues.apache.org/jira/browse/FLINK-25187
> Project: Flink
> Issue Type: Sub-task
> Reporter: Marios Trivyzas
> Priority: Major
>
> When the resulting byte array that is generated for a *CAST(XXX AS
> BINARY(<precision>)* has *length* < {*}precision{*}, then it should be padded
> with *0* to the right, to end up with a byte array of *precision* length,
> similarly to padding with spaces for {*}CHAR(<precision>){*}.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)