[
https://issues.apache.org/jira/browse/FLINK-25187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17458312#comment-17458312
]
Francesco Guardiani edited comment on FLINK-25187 at 12/13/21, 11:06 AM:
-------------------------------------------------------------------------
Are you sure we need padding for BINARY in the cast rules [~matriv]? Is not
padding affecting the correctness in any way? Perhaps we need padding only when
casting BINARY(p) to STRING, so the zero bytes are printed? And then perhaps we
need it when sinking the rows (like you did for string trimming)?
was (Author: slinkydeveloper):
Are you sure we need padding [~matriv]? Is not padding affecting the
correctness in any way? Perhaps we need padding only when casting BINARY(p) to
STRING, so the zero bytes are printed? And then perhaps we need it when sinking
the rows (like you did for string trimming)?
> 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)