mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Disable table function view in expression (#21465)
This commit is contained in:
parent
3708821689
commit
a89e3df40a
@ -15,8 +15,16 @@
|
||||
namespace DB
|
||||
{
|
||||
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int UNEXPECTED_EXPRESSION;
|
||||
}
|
||||
|
||||
void ASTFunction::appendColumnNameImpl(WriteBuffer & ostr) const
|
||||
{
|
||||
if (name == "view")
|
||||
throw Exception("Table function view cannot be used as an expression", ErrorCodes::UNEXPECTED_EXPRESSION);
|
||||
|
||||
writeString(name, ostr);
|
||||
|
||||
if (parameters)
|
||||
|
@ -1 +1,3 @@
|
||||
SELECT view(SELECT 1); -- { clientError 62 }
|
||||
|
||||
SELECT sumIf(dummy, dummy) FROM remote('127.0.0.{1,2}', numbers(2, 100), view(SELECT CAST(NULL, 'Nullable(UInt8)') AS dummy FROM system.one)); -- { serverError 183 }
|
||||
|
Loading…
Reference in New Issue
Block a user