danny0405 commented on issue #1456: [CALCITE-3350] Keep same with origin type for RexLiteral when deserialized from json string URL: https://github.com/apache/calcite/pull/1456#issuecomment-533389886 > > Personally i'm curious about why the original `STRING` literal is `VARCHAR` type, should it still be `CHAR(n)` ? > > For the case in jira, I think because the type of `job` column in `emp` table is `VARCHAR(10)`, so it makes the type of "abd" in sql string `select ename from emp where job = "abd"` is `VARCHAR(10)` too. > Well, in this case, I'm not sure should it be changed to `CHAR` type. I think for the naked sql statement, `char(n)` is the right type to choose. We may need to figure out why the `char(n)` was coerced to `VARCHAR`, AFAIK, `CHAR(n) = VARCHAR` is a valid expression, and there needs not type coercion.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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
