Revert "Make Schema inference works for CREATE AS SELECT"

This commit is contained in:
pufit 2023-04-13 13:35:32 -04:00 committed by GitHub
parent a8c892f925
commit d717372c6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 10 deletions

View File

@ -1614,8 +1614,6 @@ BlockIO InterpreterCreateQuery::fillTableIfNeeded(const ASTCreateQuery & create)
else
insert->select = create.select->clone();
getContext()->getQueryContext()->setInsertionTable(insert->table_id);
return InterpreterInsertQuery(insert, getContext(),
getContext()->getSettingsRef().insert_allow_materialized_columns).execute();
}

View File

@ -407,6 +407,7 @@ BlockIO InterpreterInsertQuery::execute()
auto new_context = Context::createCopy(context);
new_context->setSettings(new_settings);
new_context->setInsertionTable(getContext()->getInsertionTable());
auto select_query_options = SelectQueryOptions(QueryProcessingStage::Complete, 1);

View File

@ -1,7 +0,0 @@
DROP TABLE IF EXISTS t;
CREATE TABLE t(n UInt32, s String) engine=Log AS SELECT * from generateRandom() limit 10;
select count() from t;
DROP TABLE t;