mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Revert #24095. User-level settings will affect queries from view.
This commit is contained in:
parent
3184902c68
commit
fc12310ee8
@ -86,12 +86,7 @@ void StorageView::read(
|
||||
current_inner_query = query_info.view_query->clone();
|
||||
}
|
||||
|
||||
auto modified_context = Context::createCopy(context);
|
||||
/// Use settings from global context,
|
||||
/// because difference between settings set on VIEW creation and query execution can break queries
|
||||
modified_context->setSettings(context->getGlobalContext()->getSettingsRef());
|
||||
|
||||
InterpreterSelectWithUnionQuery interpreter(current_inner_query, modified_context, {}, column_names);
|
||||
InterpreterSelectWithUnionQuery interpreter(current_inner_query, context, {}, column_names);
|
||||
interpreter.buildQueryPlan(query_plan);
|
||||
|
||||
/// It's expected that the columns read from storage are not constant.
|
||||
|
@ -1,8 +1,5 @@
|
||||
join_use_nulls = 1
|
||||
-
|
||||
1 11 0
|
||||
2 12 22
|
||||
3 0 23
|
||||
-
|
||||
1 11 0
|
||||
2 12 22
|
||||
@ -12,9 +9,40 @@ join_use_nulls = 1
|
||||
2 12 22
|
||||
3 \N 23
|
||||
-
|
||||
1 11 0
|
||||
1 11 \N
|
||||
2 12 22
|
||||
3 0 23
|
||||
3 \N 23
|
||||
join_use_nulls = 0
|
||||
-
|
||||
1 11 0
|
||||
2 12 22
|
||||
3 0 23
|
||||
-
|
||||
1 11 0
|
||||
2 12 22
|
||||
3 0 23
|
||||
-
|
||||
1 11 \N
|
||||
2 12 22
|
||||
3 \N 23
|
||||
-
|
||||
1 11 0
|
||||
2 12 22
|
||||
3 0 23
|
||||
join_use_nulls = 1
|
||||
-
|
||||
-
|
||||
1 11 0
|
||||
2 12 22
|
||||
3 0 23
|
||||
-
|
||||
1 11 \N
|
||||
2 12 22
|
||||
3 \N 23
|
||||
-
|
||||
1 11 \N
|
||||
2 12 22
|
||||
3 \N 23
|
||||
join_use_nulls = 0
|
||||
-
|
||||
1 11 0
|
||||
|
@ -33,6 +33,19 @@ SET join_use_nulls = 1;
|
||||
|
||||
SELECT 'join_use_nulls = 1';
|
||||
|
||||
SELECT '-';
|
||||
SELECT * FROM view_no_nulls; -- { serverError 349 }
|
||||
SELECT '-';
|
||||
SELECT * FROM view_no_nulls_set;
|
||||
SELECT '-';
|
||||
SELECT * FROM view_nulls_set;
|
||||
SELECT '-';
|
||||
SELECT * FROM view_nulls;
|
||||
|
||||
SET join_use_nulls = 0;
|
||||
|
||||
SELECT 'join_use_nulls = 0';
|
||||
|
||||
SELECT '-';
|
||||
SELECT * FROM view_no_nulls;
|
||||
SELECT '-';
|
||||
@ -42,6 +55,29 @@ SELECT * FROM view_nulls_set;
|
||||
SELECT '-';
|
||||
SELECT * FROM view_nulls;
|
||||
|
||||
DETACH TABLE view_no_nulls;
|
||||
DETACH TABLE view_no_nulls_set;
|
||||
DETACH TABLE view_nulls_set;
|
||||
DETACH TABLE view_nulls;
|
||||
|
||||
ATTACH TABLE view_no_nulls;
|
||||
ATTACH TABLE view_no_nulls_set;
|
||||
ATTACH TABLE view_nulls_set;
|
||||
ATTACH TABLE view_nulls;
|
||||
|
||||
SET join_use_nulls = 1;
|
||||
|
||||
SELECT 'join_use_nulls = 1';
|
||||
|
||||
SELECT '-';
|
||||
SELECT * FROM view_no_nulls; -- { serverError 349 }
|
||||
SELECT '-';
|
||||
SELECT * FROM view_no_nulls_set;
|
||||
SELECT '-';
|
||||
SELECT * FROM view_nulls_set;
|
||||
SELECT '-';
|
||||
SELECT * FROM view_nulls;
|
||||
|
||||
SET join_use_nulls = 0;
|
||||
|
||||
SELECT 'join_use_nulls = 0';
|
||||
|
Loading…
Reference in New Issue
Block a user