You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i'm facing following exception when executing insert with bool value when columns is of UInt8 type after upgrading to v1.5.2.
After debug i've noticed that false is converted to 'false'.
In Statement.php line 183:
[ClickHouseDB\Exception\QueryException (400)]
HttpCode:400 ; ;Code: 6, e.displayText() = DB::Exception: Cannot parse string 'false' as UInt8: syntax error at begin of string. Note: there are toUInt8OrZero and toUInt8OrNull functions, which returns zer
o/NULL instead of throwing exception.: while executing 'FUNCTION CAST(assumeNotNull(_dummy_0) :: 2, 'UInt8' :: 1) -> cast(assumeNotNull(_dummy_0), 'UInt8') UInt8 : 4' (version 21.2.5.5 (official build))
Hi, i'm facing following exception when executing insert with bool value when columns is of UInt8 type after upgrading to v1.5.2. After debug i've noticed that false is converted to 'false'.
In Statement.php line 183:
[ClickHouseDB\Exception\QueryException (400)] HttpCode:400 ; ;Code: 6, e.displayText() = DB::Exception: Cannot parse string 'false' as UInt8: syntax error at begin of string. Note: there are toUInt8OrZero and toUInt8OrNull functions, which returns zer o/NULL instead of throwing exception.: while executing 'FUNCTION CAST(assumeNotNull(_dummy_0) :: 2, 'UInt8' :: 1) -> cast(assumeNotNull(_dummy_0), 'UInt8') UInt8 : 4' (version 21.2.5.5 (official build))
I suspect this commit to be the reason of the problem c8c9006
Hi. The implicitness when working with Bool type has been removed. If your column is declared as Int8, you should pass an integer, not a boolean to it, hoping for implicit type casting. If you want to pass a boolean type from PHP, then you need to use the Bool type for your column, regardless of its internal implementation in the database. This removes the implicit and makes the code more maintainable.
I agree that this should not have been in the patch version, but the change itself is correct.
Hi, i'm facing following exception when executing insert with bool value when columns is of UInt8 type after upgrading to v1.5.2.
After debug i've noticed that false is converted to 'false'.
In Statement.php line 183:
[ClickHouseDB\Exception\QueryException (400)]
HttpCode:400 ; ;Code: 6, e.displayText() = DB::Exception: Cannot parse string 'false' as UInt8: syntax error at begin of string. Note: there are toUInt8OrZero and toUInt8OrNull functions, which returns zer
o/NULL instead of throwing exception.: while executing 'FUNCTION CAST(assumeNotNull(_dummy_0) :: 2, 'UInt8' :: 1) -> cast(assumeNotNull(_dummy_0), 'UInt8') UInt8 : 4' (version 21.2.5.5 (official build))
Same problem is with Bool type (Type bool is internally stored as UInt8.) https://clickhouse.com/docs/en/sql-reference/data-types/boolean.
I suspect this commit to be the reason of the problem c8c9006
The text was updated successfully, but these errors were encountered: