-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Index using aliases does not work in new versions #98822
Copy link
Copy link
Closed
Labels
analyzerIssues and pull-requests related to new analyzerIssues and pull-requests related to new analyzerbugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official release
Description
Company or project name
No response
Describe what's wrong
In version 24.2.3.70, the index using the alias works correctly, but in higher versions, judging by the demo example, it is no longer taken into account.
Additionally, a test was run with tracing enabled SET send_logs_level = 'trace' on the local machine - this also showed no index usage.
https://fiddle.clickhouse.com/2ff3e680-a838-486c-b66e-74dc022ee259
Does it reproduce on the most recent release?
Yes
How to reproduce
https://fiddle.clickhouse.com/2ff3e680-a838-486c-b66e-74dc022ee259
Expected behavior
query result
Expression ((Projection + Before ORDER BY))
Limit (preliminary LIMIT (without OFFSET))
Expression
ReadFromMergeTree (default.test_indexs)
Indexes:
MinMax
Condition: true
Parts: 8/8
Granules: 50003/50003
Partition
Condition: true
Parts: 8/8
Granules: 50003/50003
PrimaryKey
Condition: true
Parts: 8/8
Granules: 50003/50003
Skip
Name: idx_alias_int_minmax
Description: minmax GRANULARITY 1
Parts: 8/8
Granules: 37507/50003
Error message and/or stacktrace
query result
Expression ((Project names + Projection))
Limit (preliminary LIMIT (without OFFSET))
Expression
ReadFromMergeTree (default.test_indexs)
Indexes:
MinMax
Condition: true
Parts: 8/8
Granules: 50002/50002
Partition
Condition: true
Parts: 8/8
Granules: 50002/50002
PrimaryKey
Condition: true
Parts: 8/8
Granules: 50002/50002
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
analyzerIssues and pull-requests related to new analyzerIssues and pull-requests related to new analyzerbugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official release