Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
1.11.0
-
None
-
None
Description
SQL
select * from ta where ta.a <> '';
If the type of ta.a is CHAR(1), when I call SqlToRelConverter, will add a CAST function to cast the empty string to CHAR(1), like this:
CAST(''):CHAR(1) CHARACTER SET "ISO-8859-1" COLLATE "ISO-8859-1$en_US$primary" NOT NULL
But, when I use the ReduceExpressionsRule rule in planner, it will remove the cast and convert the empty string '' to ' '(string with a space)。Obviously, '' is not equal to ' '。
Is this a bug?