mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
Updated tests
This commit is contained in:
parent
b128221cf0
commit
ba43fe784c
@ -374,6 +374,7 @@ function run_tests
|
||||
01801_s3_cluster
|
||||
|
||||
# Depends on LLVM JIT
|
||||
01072_nullable_jit
|
||||
01852_jit_if
|
||||
01865_jit_comparison_constant_result
|
||||
01871_merge_tree_compile_expressions
|
||||
|
@ -403,21 +403,15 @@ static CompileDAG getCompilableDAG(
|
||||
if (!all_children_visited)
|
||||
continue;
|
||||
|
||||
/// Here we process only functions that are not compiled constants
|
||||
|
||||
CompileDAG::Node compile_node;
|
||||
compile_node.function = node->function_base;
|
||||
compile_node.result_type = node->result_type;
|
||||
compile_node.type = CompileDAG::CompileType::FUNCTION;
|
||||
|
||||
// if (node->type == ActionsDAG::ActionType::FUNCTION)
|
||||
// {
|
||||
compile_node.type = CompileDAG::CompileType::FUNCTION;
|
||||
for (const auto * child : node->children)
|
||||
compile_node.arguments.push_back(visited_node_to_compile_dag_position[child]);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// compile_node.type = CompileDAG::CompileType::INPUT;
|
||||
// children.emplace_back(node);
|
||||
// }
|
||||
for (const auto * child : node->children)
|
||||
compile_node.arguments.push_back(visited_node_to_compile_dag_position[child]);
|
||||
|
||||
visited_node_to_compile_dag_position[node] = dag.getNodesCount();
|
||||
|
||||
@ -457,8 +451,7 @@ void ActionsDAG::compileFunctions(size_t min_count_to_compile_expression)
|
||||
std::stack<Frame> stack;
|
||||
std::unordered_set<const Node *> visited_nodes;
|
||||
|
||||
/** Algorithm is to iterate over each node in ActionsDAG, and update node compilable status.
|
||||
* Node is compilable if all its children are compilable and node is also compilable.
|
||||
/** Algorithm is to iterate over each node in ActionsDAG, and update node compilable_children_size.
|
||||
* After this procedure data for each node is initialized.
|
||||
*/
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
SET compile_expressions = 1;
|
||||
|
||||
DROP TABLE IF EXISTS foo;
|
||||
|
||||
CREATE TABLE foo (
|
||||
@ -12,7 +14,7 @@ CREATE TABLE foo (
|
||||
|
||||
INSERT INTO foo VALUES (1, 0.5, 0.2, 0.3, 0.8);
|
||||
|
||||
SELECT divide(sum(a) + sum(b), nullIf(sum(c) + sum(d), 0)) FROM foo SETTINGS compile_expressions = 1;
|
||||
SELECT divide(sum(a) + sum(b), nullIf(sum(c) + sum(d), 0)) FROM foo SETTINGS compile_expressions = 1;
|
||||
SELECT divide(sum(a) + sum(b), nullIf(sum(c) + sum(d), 0)) FROM foo;
|
||||
SELECT divide(sum(a) + sum(b), nullIf(sum(c) + sum(d), 0)) FROM foo;
|
||||
|
||||
DROP TABLE foo;
|
||||
|
@ -6,9 +6,9 @@ SET compile_expressions=true;
|
||||
|
||||
-- CREATE TABLE will use global profile with default min_count_to_compile_expression=3
|
||||
-- so retry 3 times
|
||||
CREATE TABLE data_01875_1 Engine=MergeTree ORDER BY number PARTITION BY bitShiftRight(number,8) AS SELECT * FROM numbers(16384);
|
||||
CREATE TABLE data_01875_2 Engine=MergeTree ORDER BY number PARTITION BY bitShiftRight(number,8) AS SELECT * FROM numbers(16384);
|
||||
CREATE TABLE data_01875_3 Engine=MergeTree ORDER BY number PARTITION BY bitShiftRight(number,8) AS SELECT * FROM numbers(16384);
|
||||
CREATE TABLE data_01875_1 Engine=MergeTree ORDER BY number PARTITION BY bitShiftRight(number, 8) + 1 AS SELECT * FROM numbers(16384);
|
||||
CREATE TABLE data_01875_2 Engine=MergeTree ORDER BY number PARTITION BY bitShiftRight(number, 8) + 1 AS SELECT * FROM numbers(16384);
|
||||
CREATE TABLE data_01875_3 Engine=MergeTree ORDER BY number PARTITION BY bitShiftRight(number, 8) + 1 AS SELECT * FROM numbers(16384);
|
||||
|
||||
SELECT number FROM data_01875_3 WHERE number = 999;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user