Skip to content

ALTER TABLE DROP PARTITION should automatically truncate the given timestamp to the partition timestamp #2879

@puzpuzpuz

Description

@puzpuzpuz

Is your feature request related to a problem?

Reported by @javier

Currently in the alter table query one needs the timestamp to be at the same resolution level than your partitioning.

For example, if we have a table with daily partitioning but microsecond resolution in the timestamps. Now, if we try to drop a partition where ts = '2022-10-28T19:15:48.741819Z', we're getting an error saying no partitions matched WHERE clause. To fix that, we have to use timestamp_floor() function: where timestamp = timestamp_floor('d', '2022-10-28T19:15:48.741819Z');.

Describe the solution you'd like.

The database should calculate the partition the timestamp filtered timestamp belongs to, so that the timestamp_floor() function isn't needed.

Describe alternatives you've considered.

No response

Additional context.

No response

Metadata

Metadata

Assignees

Labels

New featureFeature requestsSQLIssues or changes relating to SQL execution

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions