You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
prefer_column_name_to_alias = 1 does not work for virtual columns #35652
CREATETABLEtest (
id UInt64
)
ENGINE = MergeTree()
SAMPLE BY intHash32(id)
ORDER BY intHash32(id)
This works:
SELECT
any(id),
any(id) AS id
FROM test
SETTINGS prefer_column_name_to_alias =1
But this does not:
SELECT
any(_sample_factor),
any(_sample_factor) AS _sample_factor
FROM test
SETTINGS prefer_column_name_to_alias =1
SELECT
any(_partition_id),
any(_partition_id) AS _partition_id
FROM test
SETTINGS prefer_column_name_to_alias =1
The error:
Received exception from server (version 22.3.2):
Code: 184. DB::Exception: Received from localhost:9000. DB::Exception: Aggregate function any(_partition_id) is found inside another aggregate function in query: While processing any(_partition_id) AS _partition_id. (ILLEGAL_AGGREGATION)
Activity
Algunenano commentedon Jan 18, 2024
Works fine with the analyzer
Close: #35652