Skip to content

parseDateTime64BestEffort is unusable #10925

@nicbaz

Description

@nicbaz

Describe the bug

We're trying to use parseDateTime64BestEffort to parse string datetimes such as 2020-05-14T03:37:03.253184Z, unfortunately it always raises an exception.

How to reproduce

  • Which ClickHouse server version to use
    20.3.8.53

  • Which interface to use, if matters
    Tested on both CLI and HTTP interfaces.

  • Queries to run that lead to unexpected result

SELECT parseDateTime64BestEffort('2020-05-14T03:37:03.253184Z'); // DB::Exception: Function parseDateTime64BestEffort expects 2 arguments for Decimal.
SELECT parseDateTime64BestEffort('2020-05-14T03:37:03.253184Z', 9); // DB::Exception: Number of arguments for function parseDateTime64BestEffort doesn't match: passed 2, should be 1. Second argument makes sense only for DateTime and Decimal.
SELECT parseDateTimeBestEffort('2020-05-14T03:37:03.253184Z'); // OK

Metadata

Metadata

Assignees

Labels

bugConfirmed user-visible misbehaviour in official releasecomp-datetimeDate/DateTime/TimeZone datatypes and date-time semantics.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions