ClickHouse/src/Parsers/isDiskFunction.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
311 B
C++
Raw Normal View History

2023-02-22 11:14:59 +00:00
#include <Parsers/isDiskFunction.h>
#include <Parsers/ASTFunction.h>
namespace DB
{
bool isDiskFunction(ASTPtr ast)
{
if (!ast)
return false;
const auto * function = ast->as<ASTFunction>();
return function && function->name == "disk" && function->arguments->as<ASTExpressionList>();
}
}