You are viewing a plain text version of this content. The canonical link for it is here.
Posted to devnull@infra.apache.org by "hequn8128 (GitHub)" <gi...@apache.org> on 2018/08/23 15:28:31 UTC
[GitHub] [flink] hequn8128 commented on issue #6519: [FLINK-9559]
[table] The type of a union of CHAR columns of different lengths should be
VARCHAR
@pnowojski Hi, thanks for your review.
Yes, support VARCHAR(N) can solve the problem. As a workaround, we can cast the literals to varchar to solve the problem, like: `case 1 when 1 then cast('a' as varchar) when 2 then cast('bcd' as varchar) end`.
The behavior in strict SQL standard mode(SQL:2003) returns a CHAR(N) type with blank-padded.
However, I test Oracle/SqlServer/Mysql and they all return the value without blank-padded. Also, it seems that there is no way to turn blank-padded on.
This change will break implementations in Flink. Do you think we should make it configurable?
Thanks, Hequn
[ Full content available at: https://github.com/apache/flink/pull/6519 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org