@pnowojski Thanks for providing amazing ways to prove `case when` return types. 
Simply change type to VARCHAR can not solve the comparison problem. For sql, 
`SELECT * FROM country WHERE country_name = 'GERMANY  '`, VARCHAR still can't 
handle blanks correctly.
The main reason I hesitate to change literal to VARCHAR is Calcite treat it as 
CHAR. In Calcite, character constant, for example 'Hello, world!', '', 
_N'Bonjour', _ISO-8859-1'It''s superman!' COLLATE SHIFT_JIS$ja_JP$2. These are 
always CHAR, never VARCHAR. I am not sure we can do it.
And Calcite provides a simple way to override 
shouldConvertRaggedUnionTypesToVarying to solve the problem.

[ Full content available at: https://github.com/apache/flink/pull/6519 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to