You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/11/15 14:18:20 UTC

[GitHub] [flink] xuyangzhong commented on pull request #17771: [FLINK-24813][table-planner]Improve ImplicitTypeConversionITCase

xuyangzhong commented on pull request #17771:
URL: https://github.com/apache/flink/pull/17771#issuecomment-968955101


   Hi, thanks for you to review my code, @matriv  :) .I want to do some responses to your review.
   1. `LogicalTypeCasts ` seems useless in the case "SELECT 1 = '1' FROM xxx" because the case doesn't call the function CAST, so the CAST doesn't work, and can't detect this bad pattern. However, "SELECT 1 = '1' FROM xxx" is always "false", that is what I want to avoid and to throw an exception to remain users.
   
   2. Why I don't use `CastFunctionITCase`?
   Because the bad case above is not a CAST function actually and will **not** be converted into the SQL like "1 = cast ( 'a' as int)". The CAST you see is only for creating different types with a same value.
   
   3. Why I write a new function `resultSpecOnlyContainsSqlExpression`?
   Because I find a same SQL will have the different behavior between Table API and SQL API. And I only care about the correct result in SQL API. Actually in Table API, "int = varchar" is invalid, that is what I want in SQL.
   
   Very look forward to your response! Thanks again.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org