mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 02:52:13 +00:00
Better
This commit is contained in:
parent
862da8f459
commit
3725cf4aa7
@ -329,11 +329,8 @@ using ExistsExpressionVisitor = InDepthNodeVisitor<OneTypeMatcher<ExistsExpressi
|
||||
struct ReplacePositionalArgumentsData
|
||||
{
|
||||
using TypeToVisit = ASTSelectQuery;
|
||||
ContextPtr context;
|
||||
|
||||
void visit(ASTSelectQuery & select_query, ASTPtr &) const
|
||||
{
|
||||
if (context->getSettingsRef().enable_positional_arguments)
|
||||
static void visit(ASTSelectQuery & select_query, ASTPtr &)
|
||||
{
|
||||
if (select_query.groupBy())
|
||||
{
|
||||
@ -354,7 +351,6 @@ struct ReplacePositionalArgumentsData
|
||||
replaceForPositionalArguments(expr, &select_query, ASTSelectQuery::Expression::LIMIT_BY);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
using ReplacePositionalArgumentsVisitor = InDepthNodeVisitor<OneTypeMatcher<ReplacePositionalArgumentsData>, false>;
|
||||
@ -1508,8 +1504,11 @@ void TreeRewriter::normalize(
|
||||
ExistsExpressionVisitor::Data exists;
|
||||
ExistsExpressionVisitor(exists).visit(query);
|
||||
|
||||
ReplacePositionalArgumentsVisitor::Data data_replace_positional_arguments{context_};
|
||||
if (context_->getSettingsRef().enable_positional_arguments)
|
||||
{
|
||||
ReplacePositionalArgumentsVisitor::Data data_replace_positional_arguments;
|
||||
ReplacePositionalArgumentsVisitor(data_replace_positional_arguments).visit(query);
|
||||
}
|
||||
|
||||
if (settings.transform_null_in)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user