Skip to content

system.parts inconsistent quoting #4735

@filimonov

Description

@filimonov

18.16 address quoting problems in system.parts. See #3109 and #3652.

After that change all the single values partition names are unquoted always (also for Strings / DateTimes etc), and it is inconsistent, so for example - you can't just create alters from system.parts in a simple manner because String / Date / DateTime - based partitions are also unquoted.

Check that:

SELECT 'ALTER TABLE '  || table || ' DETACH PARTITION ' || partition from system.parts group by table, partition ORDER BY table, partition;

 ALTER TABLE toyyyymm_partitioning DETACH PARTITION 201802      -- ok
 ALTER TABLE empty_partitioning    DETACH PARTITION tuple()     -- ok 
 ALTER TABLE tuple_partitioing     DETACH PARTITION (3,3,'333') -- ok 
 ALTER TABLE float_part            DETACH PARTITION 0.001       -- ok
 ALTER TABLE int_part              DETACH PARTITION 0           -- ok
 ALTER TABLE date_partitioning     DETACH PARTITION 2018-05-16           -- wrong, quotes needed
 ALTER TABLE string_partitioning   DETACH PARTITION string_partition_id  -- wrong, quotes needed
 ALTER TABLE datetime_partitioning DETACH PARTITION 2019-03-20 14:12:59  -- wrong, quotes needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed user-visible misbehaviour in official release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions