flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] hequn8128 commented on issue #6519: [FLINK-9559] [table] The type of a union of CHAR columns of different lengths should be VARCHAR
Date Tue, 28 Aug 2018 14:22:46 GMT
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-416603955
 
 
   @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.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message