Fixed parseDateTime64BestEffort implementation#11038
Fixed parseDateTime64BestEffort implementation#11038vitlibar merged 1 commit intoClickHouse:masterfrom Enmk:parseDateTime64BestEffort_fix
Conversation
src/Functions/FunctionsConversion.h
Outdated
There was a problem hiding this comment.
endsWith() seems to be more suitable here.
There was a problem hiding this comment.
Yes, but I've just tossed that under an else-branch of if constexpr, so that piece is mostly as it was before.
IMO that exact piece (and the whole approach of how compile-time branching based on function return type is done) should be re-thought and re-designed, this piece is not the worst, but it is becoming a mess.
There was a problem hiding this comment.
A little offtopic. We have the function parseDateTime64BestEffort(), but we don't have function parseDateTime64(), right? I wonder how we came to that.
There was a problem hiding this comment.
Perfectly aligned with DateTime case: there is parseDateTimeBestEffort, but no parseDateTime function. IIRC, 'non-best-effort' parsing is done on casting/building DateTime/DateTime64 values from string explicitly.
src/IO/parseDateTimeBestEffort.cpp
Outdated
There was a problem hiding this comment.
Isn't simple return false enough here?
Fixed argument resolution issues. Added tests and made sure -orNull and -orZero variants alwo work correctly.
…rt_fix Fixed parseDateTime64BestEffort implementation (cherry picked from commit 5a0f356)
* Merge pull request #10910 from filimonov/kafka_drop_hang_fix Fix for the hang during deletion of engine=Kafka (cherry picked from commit 0fd0711) * Merge pull request #10986 from ClickHouse/try-fix-use-after-free-mergetree Try to fix use-after-free error in MergeTree (cherry picked from commit 073dc2e) * Merge pull request #11048 from filimonov/kafka_missed_data_during_drop Fixes the potential missed data during termination of Kafka engine table (cherry picked from commit b82c633) * Merge pull request #11109 from ClickHouse/less_verbose_logging Less verbose logging in mutation finalization task (cherry picked from commit 1906762) * Merge pull request #11074 from Jokser/memory-leak-in-register-disk-s3 Fix memory leak in registerDiskS3 (cherry picked from commit 4a237fa) * Merge pull request #11038 from Enmk/parseDateTime64BestEffort_fix Fixed parseDateTime64BestEffort implementation (cherry picked from commit 5a0f356) Co-authored-by: alexey-milovidov <[email protected]> Co-authored-by: alesapin <[email protected]> Co-authored-by: Vitaly Baranov <[email protected]>
…rt_fix Fixed parseDateTime64BestEffort implementation (cherry picked from commit 5a0f356)
* Merge pull request #11109 from ClickHouse/less_verbose_logging Less verbose logging in mutation finalization task (cherry picked from commit 1906762) * Merge pull request #11038 from Enmk/parseDateTime64BestEffort_fix Fixed parseDateTime64BestEffort implementation (cherry picked from commit 5a0f356) * Merge pull request #10741 from hczhcz/patch-0422 Fix OrNull and OrDefault (cherry picked from commit 699ef4f) Co-authored-by: alesapin <[email protected]> Co-authored-by: Vitaly Baranov <[email protected]> Co-authored-by: alexey-milovidov <[email protected]>
Fixed parseDateTime64BestEffort implementation (cherry picked from commit 5a0f356)
Fixed argument resolution issues.
Added tests and made sure orNull and orZero variants also work correctly.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed parseDateTime64BestEffort argument resolution bugs. #10925
closes: #10925