Skip to content

Try fix 'value is too short' when converting from String to Nullable(T)#18445

Merged
tavplubix merged 2 commits intomasterfrom
fix_to_nullable_conversion
Dec 24, 2020
Merged

Try fix 'value is too short' when converting from String to Nullable(T)#18445
tavplubix merged 2 commits intomasterfrom
fix_to_nullable_conversion

Conversation

@tavplubix
Copy link
Copy Markdown
Member

@tavplubix tavplubix commented Dec 23, 2020

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed value is too short error when executing toType(...) functions (toDate, toUInt32, etc) with argument of type Nullable(String). Now such functions return NULL on parsing errors instead of throwing exception. Fixes #7673

It makes behaviour of toType(nullable_col) consistent with CAST(nullable_col, 'Nullable(Type)')

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Dec 23, 2020
@tavplubix tavplubix marked this pull request as draft December 23, 2020 21:59
@tavplubix tavplubix marked this pull request as ready for review December 24, 2020 00:14
@alexey-milovidov alexey-milovidov self-assigned this Dec 24, 2020
@tavplubix tavplubix merged commit 5fbfc19 into master Dec 24, 2020
@tavplubix tavplubix deleted the fix_to_nullable_conversion branch December 24, 2020 10:38
robot-clickhouse pushed a commit that referenced this pull request Dec 24, 2020
robot-clickhouse pushed a commit that referenced this pull request Dec 24, 2020
robot-clickhouse pushed a commit that referenced this pull request Dec 24, 2020
robot-clickhouse pushed a commit that referenced this pull request Dec 24, 2020
tavplubix added a commit that referenced this pull request Dec 24, 2020
Try fix 'value is too short' when converting from String to Nullable(T)

(cherry picked from commit 5fbfc19)
tavplubix added a commit that referenced this pull request Dec 25, 2020
Backport #18445 to 20.12: Try fix 'value is too short' when converting from String to Nullable(T)
tavplubix added a commit that referenced this pull request Dec 25, 2020
Backport #18445 to 20.11: Try fix 'value is too short' when converting from String to Nullable(T)
tavplubix added a commit that referenced this pull request Dec 25, 2020
Backport #18445 to 20.9: Try fix 'value is too short' when converting from String to Nullable(T)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

toDate(nullif('', '')), toDateTime(nullif('', '')) throws Parsing error

3 participants