mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
dbms: fixed error with views [#METR-18748].
This commit is contained in:
parent
32614f5206
commit
d21307c535
@ -28,7 +28,6 @@
|
||||
#include <DB/Interpreters/InterpreterSelectQuery.h>
|
||||
#include <DB/Interpreters/InterpreterSetQuery.h>
|
||||
#include <DB/Interpreters/ExpressionAnalyzer.h>
|
||||
#include <DB/Storages/StorageView.h>
|
||||
#include <DB/TableFunctions/ITableFunction.h>
|
||||
#include <DB/TableFunctions/TableFunctionFactory.h>
|
||||
|
||||
|
@ -80,6 +80,8 @@ BlockInputStreams StorageView::read(
|
||||
const size_t max_block_size,
|
||||
const unsigned threads)
|
||||
{
|
||||
processed_stage = QueryProcessingStage::FetchColumns;
|
||||
|
||||
ASTPtr inner_query_clone = getInnerQuery();
|
||||
ASTSelectQuery & inner_select = static_cast<ASTSelectQuery &>(*inner_query_clone);
|
||||
const ASTSelectQuery & outer_select = typeid_cast<const ASTSelectQuery &>(*query);
|
||||
|
@ -0,0 +1,5 @@
|
||||
Hello, world!
|
||||
Hello, world!
|
||||
Hello, world!
|
||||
Hello, world!
|
||||
Hello, world!
|
@ -0,0 +1,13 @@
|
||||
DROP TABLE IF EXISTS test.view1;
|
||||
DROP TABLE IF EXISTS test.view2;
|
||||
DROP TABLE IF EXISTS test.merge_view;
|
||||
|
||||
CREATE VIEW test.view1 AS SELECT number FROM system.numbers LIMIT 10;
|
||||
CREATE VIEW test.view2 AS SELECT number FROM system.numbers LIMIT 10;
|
||||
CREATE TABLE test.merge_view (number UInt64) ENGINE = Merge(test, '^view');
|
||||
|
||||
SELECT 'Hello, world!' FROM merge_view LIMIT 5;
|
||||
|
||||
DROP TABLE test.view1;
|
||||
DROP TABLE test.view2;
|
||||
DROP TABLE test.merge_view;
|
Loading…
Reference in New Issue
Block a user