hequn8128 commented on issue #6519: [FLINK-9559] [table] The type of a union of 
CHAR columns of different lengths should be VARCHAR
URL: https://github.com/apache/flink/pull/6519#issuecomment-415957994
 
 
   @pnowojski Hi,I'm wrong at the root cause of the two examples I listed 
above. Thanks for pointing it out and giving a detailed explanation. It should 
be a comparison problem for CHAR/VARCHAR. We probably should implement support 
for `CHAR` as you said,  making trailing spaces insignificant in comparisons. 
   I think this pr tries to solve the output problem. Once we solve the 
comparison problem, we still have to solve the output problem. Output `case 
when` results to a nonbinary strings field in storages. Some storages treat 
CHAR/VARCHAR with trailing spaces equally('a' equals to 'a '), like mysql, so 
no problems here. Others don't, for example, kafka or elasticsearch. So, I 
think we should not add trailing spaces in result of `case when`, just like 
most DBMSs do.
   What do you think?
   Thanks again. Hequn

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to