mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
remove unused code
This commit is contained in:
parent
d9ab0cfb9f
commit
0812f79421
@ -337,56 +337,6 @@ void ExpressionAnalyzer::makeSetsForIndexImpl(const ASTPtr & node, const Block &
|
||||
}
|
||||
}
|
||||
|
||||
bool ExpressionAnalyzer::isThereArrayJoin(const ASTPtr & ast)
|
||||
{
|
||||
if (typeid_cast<ASTIdentifier *>(ast.get()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (ASTFunction * node = typeid_cast<ASTFunction *>(ast.get()))
|
||||
{
|
||||
if (node->name == "arrayJoin")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (functionIsInOrGlobalInOperator(node->name))
|
||||
{
|
||||
return isThereArrayJoin(node->arguments->children.at(0));
|
||||
}
|
||||
if (node->name == "indexHint")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (AggregateFunctionFactory::instance().isAggregateFunctionName(node->name))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (auto & child : node->arguments->children)
|
||||
{
|
||||
if (isThereArrayJoin(child))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else if (typeid_cast<ASTLiteral *>(ast.get()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (auto & child : ast->children)
|
||||
{
|
||||
if (isThereArrayJoin(child))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ExpressionAnalyzer::getRootActions(const ASTPtr & ast, bool no_subqueries, ExpressionActionsPtr & actions, bool only_consts)
|
||||
{
|
||||
@ -1124,9 +1074,4 @@ void ExpressionAnalyzer::collectUsedColumns()
|
||||
}
|
||||
|
||||
|
||||
Names ExpressionAnalyzer::getRequiredSourceColumns() const
|
||||
{
|
||||
return source_columns.getNames();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ public:
|
||||
/** Get a set of columns that are enough to read from the table to evaluate the expression.
|
||||
* Columns added from another table by JOIN are not counted.
|
||||
*/
|
||||
Names getRequiredSourceColumns() const;
|
||||
Names getRequiredSourceColumns() const { return source_columns.getNames(); }
|
||||
|
||||
/** These methods allow you to build a chain of transformations over a block, that receives values in the desired sections of the query.
|
||||
*
|
||||
@ -244,8 +244,6 @@ private:
|
||||
|
||||
void addJoinAction(ExpressionActionsPtr & actions, bool only_types) const;
|
||||
|
||||
bool isThereArrayJoin(const ASTPtr & ast);
|
||||
|
||||
/// If ast is ASTSelectQuery with JOIN, add actions for JOIN key columns.
|
||||
void getActionsFromJoinKeys(const ASTTableJoin & table_join, bool no_subqueries, ExpressionActionsPtr & actions);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user