Remove Arcadia

This commit is contained in:
Alexey Milovidov 2022-04-15 23:59:49 +02:00 committed by alesapin
parent 8a8b9c1e34
commit 0118d98e93
2 changed files with 18 additions and 27 deletions

View File

@ -252,6 +252,17 @@ static Block createBlockFromAST(const ASTPtr & node, const DataTypes & types, Co
return header.cloneWithColumns(std::move(columns)); return header.cloneWithColumns(std::move(columns));
} }
namespace
{
/** Create a block for set from expression.
* 'set_element_types' - types of what are on the left hand side of IN.
* 'right_arg' - list of values: 1, 2, 3 or list of tuples: (1, 2), (3, 4), (5, 6).
*
* We need special implementation for ASTFunction, because in case, when we interpret
* large tuple or array as function, `evaluateConstantExpression` works extremely slow.
*/
Block createBlockForSet( Block createBlockForSet(
const DataTypePtr & left_arg_type, const DataTypePtr & left_arg_type,
const ASTPtr & right_arg, const ASTPtr & right_arg,
@ -295,6 +306,10 @@ Block createBlockForSet(
return block; return block;
} }
/** Create a block for set from literal.
* 'set_element_types' - types of what are on the left hand side of IN.
* 'right_arg' - Literal - Tuple or Array.
*/
Block createBlockForSet( Block createBlockForSet(
const DataTypePtr & left_arg_type, const DataTypePtr & left_arg_type,
const std::shared_ptr<ASTFunction> & right_arg, const std::shared_ptr<ASTFunction> & right_arg,
@ -346,6 +361,9 @@ Block createBlockForSet(
return createBlockFromAST(elements_ast, set_element_types, context); return createBlockFromAST(elements_ast, set_element_types, context);
} }
}
SetPtr makeExplicitSet( SetPtr makeExplicitSet(
const ASTFunction * node, const ActionsDAG & actions, bool create_ordered_set, const ASTFunction * node, const ActionsDAG & actions, bool create_ordered_set,
ContextPtr context, const SizeLimits & size_limits, PreparedSets & prepared_sets) ContextPtr context, const SizeLimits & size_limits, PreparedSets & prepared_sets)

View File

@ -27,33 +27,6 @@ SetPtr makeExplicitSet(
const ASTFunction * node, const ActionsDAG & actions, bool create_ordered_set, const ASTFunction * node, const ActionsDAG & actions, bool create_ordered_set,
ContextPtr context, const SizeLimits & limits, PreparedSets & prepared_sets); ContextPtr context, const SizeLimits & limits, PreparedSets & prepared_sets);
/** Create a block for set from expression.
* 'set_element_types' - types of what are on the left hand side of IN.
* 'right_arg' - list of values: 1, 2, 3 or list of tuples: (1, 2), (3, 4), (5, 6).
*
* We need special implementation for ASTFunction, because in case, when we interpret
* large tuple or array as function, `evaluateConstantExpression` works extremely slow.
*
* Note: this and following functions are used in third-party applications in Arcadia, so
* they should be declared in header file.
*
*/
Block createBlockForSet(
const DataTypePtr & left_arg_type,
const std::shared_ptr<ASTFunction> & right_arg,
const DataTypes & set_element_types,
ContextPtr context);
/** Create a block for set from literal.
* 'set_element_types' - types of what are on the left hand side of IN.
* 'right_arg' - Literal - Tuple or Array.
*/
Block createBlockForSet(
const DataTypePtr & left_arg_type,
const ASTPtr & right_arg,
const DataTypes & set_element_types,
ContextPtr context);
/** For ActionsVisitor /** For ActionsVisitor
* A stack of ExpressionActions corresponding to nested lambda expressions. * A stack of ExpressionActions corresponding to nested lambda expressions.
* The new action should be added to the highest possible level. * The new action should be added to the highest possible level.