mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 19:12:03 +00:00
fix : test error
This commit is contained in:
parent
c7a85d565c
commit
701c687e79
@ -129,7 +129,6 @@ void DatabaseOrdinary::loadStoredObjects(
|
||||
const auto & name = name_with_path_and_query.first;
|
||||
const auto & path = name_with_path_and_query.second.path;
|
||||
const auto & ast = name_with_path_and_query.second.ast;
|
||||
FunctionNameNormalizer().visit(ast.get());
|
||||
const auto & create_query = ast->as<const ASTCreateQuery &>();
|
||||
|
||||
if (!create_query.is_dictionary)
|
||||
@ -169,6 +168,7 @@ void DatabaseOrdinary::loadTablesMetadata(ContextPtr local_context, ParsedTables
|
||||
auto ast = parseQueryFromMetadata(log, getContext(), full_path.string(), /*throw_on_error*/ true, /*remove_empty*/ false);
|
||||
if (ast)
|
||||
{
|
||||
FunctionNameNormalizer().visit(ast.get());
|
||||
auto * create_query = ast->as<ASTCreateQuery>();
|
||||
create_query->setDatabase(database_name);
|
||||
|
||||
|
@ -20,12 +20,13 @@ def replace_substring_to_substr(node):
|
||||
@pytest.mark.parametrize("engine", ['Ordinary', 'Atomic'])
|
||||
def test_attach_substr(started_cluster, engine):
|
||||
# Initialize
|
||||
node.query("DROP TABLE IF EXISTS default.file")
|
||||
node.query("CREATE TABLE default.file(`s` String, `n` UInt8) ENGINE = MergeTree PARTITION BY substring(s, 1, 2) ORDER BY n ")
|
||||
|
||||
# Detach table file
|
||||
node.query("DETACH TABLE file")
|
||||
|
||||
# Replace subtring to substr
|
||||
# Replace substring to substr
|
||||
replace_substring_to_substr(node)
|
||||
|
||||
# Attach table file
|
||||
@ -34,9 +35,10 @@ def test_attach_substr(started_cluster, engine):
|
||||
@pytest.mark.parametrize("engine", ['Ordinary', 'Atomic'])
|
||||
def test_attach_substr_restart(started_cluster, engine):
|
||||
# Initialize
|
||||
node.query("DROP TABLE IF EXISTS default.file")
|
||||
node.query("CREATE TABLE default.file(`s` String, `n` UInt8) ENGINE = MergeTree PARTITION BY substring(s, 1, 2) ORDER BY n ")
|
||||
|
||||
# Replace subtring to substr
|
||||
# Replace substring to substr
|
||||
replace_substring_to_substr(node)
|
||||
|
||||
# Restart clickhouse
|
||||
|
Loading…
Reference in New Issue
Block a user