-
Notifications
You must be signed in to change notification settings - Fork 8.3k
CAST to IPv6 on empty strings changed between 21.x and 22.x #35156
Copy link
Copy link
Labels
backward compatibilitybugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official release
Description
Describe the issue
On empty strings, the behaviour of the function CAST('', 'IPv6') changed between the versions 21.x and 22.x
How to reproduce
On 21.8.14.5:
SELECT CAST('', 'IPv6');
Returns:
::
On 22.2.2.1:
SELECT CAST('', 'IPv6');
Triggers error:
Code: 441. DB::Exception: Invalid IPv6 value.: While processing CAST('', 'IPv6'). (CANNOT_PARSE_DOMAIN_VALUE_FROM_STRING) (version 22.2.2.1)
Additional context
This can prevent some users from upgrading to 22.x when the use of this function is spread across a number of table definitions and environments. The following workaround CAST(toFixedString('', 16), 'IPv6') works but the manual task of updating all the occurrences is challenging.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backward compatibilitybugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official release