-
Notifications
You must be signed in to change notification settings - Fork 186
WHERE boolField = 'true', doesn't autocast (changed behavior) #1061
Comments
Hi FreCap, Thanks for reporting this breaking issue. In the new engine released on 1.13, we don't support type auto casting.
Do you have any suggestion for how to fix this issue? Do you want generic type auto casting or just boolean? |
@FreCap I double checked ANSI SQL-99 but didn't find implicit casting support for this: https://crate.io/docs/sql-99/en/latest/chapters/09.html#boolean-operations. Although MySQL and PostgrelSQL does support your query (Postgre even supports string 'yes', '1' as TRUE), PostgreSQL doc says "The key words TRUE and FALSE are the preferred (SQL-compliant) method for writing Boolean constants in SQL queries". As penghuo's comments, we may need to mark this as breaking changes or evaluate if this is very common case to support. Thanks! |
Yeah, we'll do some evaluation. Meanwhile could you provide us your use case? For example, did you use any BI tool or others that generated this kind of query? Or you just typed it in this way manually? Thanks! |
Yes, I have integrations with BI tools (unfortunately cannot disclose further). |
Got it. That's also what I was thinking. Will evaluate this changes. Thanks! |
Version 1.13
In the previous version, this type of autocasting was supported
However in the current one it returns:
Should we allow auto-casting instead?
The text was updated successfully, but these errors were encountered: