mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Fixed tests
This commit is contained in:
parent
11965e59e2
commit
6c1436f78e
@ -165,7 +165,13 @@ private:
|
||||
|
||||
REGISTER_FUNCTION(Nested)
|
||||
{
|
||||
factory.registerFunction<FunctionNested>();
|
||||
factory.registerFunction<FunctionNested>({
|
||||
R"(
|
||||
Returns the array of tuples from multiple arrays.
|
||||
)",
|
||||
Documentation::Examples{{"nested", "SELECT nested(['keys', 'values'], ['key_1', 'key_2'], ['value_1','value_2'])"}},
|
||||
Documentation::Categories{"OtherFunctions"}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ SelectQueryDescription buildSelectQueryDescription(const ASTPtr & select_query,
|
||||
{
|
||||
ASTPtr inner_query = select_query;
|
||||
std::optional<StorageID> dependent_table_storage_id;
|
||||
bool allow_experimental_analyzer = context->getSettingsRef().allow_experimental_analyzer;
|
||||
|
||||
while (true)
|
||||
{
|
||||
@ -100,7 +101,7 @@ SelectQueryDescription buildSelectQueryDescription(const ASTPtr & select_query,
|
||||
if (auto db_and_table = getDatabaseAndTable(*inner_select_query, 0))
|
||||
{
|
||||
const auto * table_expression = getTableExpression(*inner_select_query, 0);
|
||||
if (table_expression->database_and_table_name->tryGetAlias().empty())
|
||||
if (allow_experimental_analyzer && table_expression->database_and_table_name->tryGetAlias().empty())
|
||||
table_expression->database_and_table_name->setAlias("__dependent_table");
|
||||
|
||||
String select_database_name = db_and_table->database;
|
||||
|
@ -1,3 +1,5 @@
|
||||
SET allow_experimental_analyzer = 1;
|
||||
|
||||
with pow(2,2) as four select pow(four, 2), 2 as two, pow(two, 2);
|
||||
select `pow(four, 2)`, `pow(two, 2)` from (with pow(2,2) as four select pow(four, 2), 2 as two, pow(two, 2));
|
||||
with (select pow(two,2)) as four select pow(four, 2), 2 as two, pow(two, 2);
|
||||
|
@ -1,10 +1,12 @@
|
||||
SET allow_experimental_analyzer = 1;
|
||||
|
||||
SELECT groupArray(2 + 3)(number) FROM numbers(10);
|
||||
SELECT groupArray('5'::UInt8)(number) FROM numbers(10);
|
||||
|
||||
SELECT groupArray(NULL)(number) FROM numbers(10); -- { serverError 36 }
|
||||
SELECT groupArray(NULL + NULL)(number) FROM numbers(10); -- { serverError 36 }
|
||||
SELECT groupArray([])(number) FROM numbers(10); -- { serverError 36 }
|
||||
SELECT groupArray(throwIf(1))(number) FROM numbers(10); -- { serverError 134 }
|
||||
SELECT groupArray(throwIf(1))(number) FROM numbers(10); -- { serverError 36 }
|
||||
|
||||
-- Not the best error message, can be improved.
|
||||
SELECT groupArray(number)(number) FROM numbers(10); -- { serverError 36 }
|
||||
|
@ -17,7 +17,7 @@ EXCEPTION_BEFORE_START_QUERY="WITH
|
||||
FROM system.numbers
|
||||
WHERE number IN (sub)
|
||||
)
|
||||
SETTINGS enable_global_with_statement = 0"
|
||||
SETTINGS enable_global_with_statement = 0, allow_experimental_analyzer = 1"
|
||||
|
||||
|
||||
# For this query the system.query_log needs to show ExceptionBeforeStart and elapsed seconds <= 1.0
|
||||
|
Loading…
Reference in New Issue
Block a user