Skip to content

ClickHouse dialect should not require interval qualifier #2390

Description

@dinmukhamedm

When the require_interval_qualifier dialect option was added (#1398), the main concern was PostgreSQL. Modern clickhouse supports all of:

unquoted intervals

SELECT INTERVAL 1 DAY;

   ┌─toIntervalDay(1)─┐
1. │                1 │
   └──────────────────┘

quoted intervals

SELECT INTERVAL '1 d';

   ┌─toIntervalDay(1)─┐
1. │                1 │
   └──────────────────┘

Mixed intervals

SELECT INTERVAL '1 2:3:4' DAY TO SECOND;

   ┌─(toIntervalDay(1), toIntervalHour(2), toIntervalMinute(3), toIntervalSecond(4))─┐
1. │ (1,2,3,4)                                                                       │
   └─────────────────────────────────────────────────────────────────────────────────┘

The fix should be as simple as flipping one boolean here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions