mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
fix #16123
This commit is contained in:
parent
4e85d6a4c3
commit
3342da1d77
@ -125,7 +125,7 @@ struct CustomizeAggregateFunctionsSuffixData
|
||||
{
|
||||
auto properties = instance.tryGetProperties(func.name);
|
||||
if (properties && !properties->returns_default_when_only_null)
|
||||
func.name = func.name + customized_func_suffix;
|
||||
func.name = Poco::toLower(func.name) + customized_func_suffix;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -0,0 +1,8 @@
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
-1
|
||||
-1
|
||||
-1
|
||||
\N
|
@ -0,0 +1,91 @@
|
||||
SELECT MAX(aggr)
|
||||
FROM
|
||||
(
|
||||
SELECT MAX(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE NOT 1
|
||||
UNION ALL
|
||||
SELECT MAX(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE 1
|
||||
|
||||
);
|
||||
SELECT MaX(aggr)
|
||||
FROM
|
||||
(
|
||||
SELECT mAX(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE NOT 1
|
||||
UNION ALL
|
||||
SELECT MAx(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE 1
|
||||
);
|
||||
SELECT MaX(aggr)
|
||||
FROM
|
||||
(
|
||||
SELECT mAX(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE NOT 1
|
||||
UNION ALL
|
||||
SELECT max(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE 1
|
||||
);
|
||||
SELECT MaX(aggr)
|
||||
FROM
|
||||
(
|
||||
SELECT mAX(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE NOT 1
|
||||
UNION ALL
|
||||
SELECT max(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE not 1
|
||||
);
|
||||
SET aggregate_functions_null_for_empty=1;
|
||||
SELECT MAX(aggr)
|
||||
FROM
|
||||
(
|
||||
SELECT MAX(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE NOT 1
|
||||
UNION ALL
|
||||
SELECT MAX(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE 1
|
||||
|
||||
);
|
||||
SELECT MaX(aggr)
|
||||
FROM
|
||||
(
|
||||
SELECT mAX(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE NOT 1
|
||||
UNION ALL
|
||||
SELECT MAx(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE 1
|
||||
);
|
||||
SELECT MaX(aggr)
|
||||
FROM
|
||||
(
|
||||
SELECT mAX(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE NOT 1
|
||||
UNION ALL
|
||||
SELECT max(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE 1
|
||||
);
|
||||
SELECT MaX(aggr)
|
||||
FROM
|
||||
(
|
||||
SELECT mAX(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE NOT 1
|
||||
UNION ALL
|
||||
SELECT max(-1) AS aggr
|
||||
FROM system.one
|
||||
WHERE not 1
|
||||
);
|
Loading…
Reference in New Issue
Block a user