mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #22588 from foolchi/fix_dist_map_select
fix dist map type select
This commit is contained in:
commit
ed2d82603e
@ -491,14 +491,14 @@ void ASTFunction::formatImplWithoutAlias(const FormatSettings & settings, Format
|
||||
|
||||
if (!written && 0 == strcmp(name.c_str(), "map"))
|
||||
{
|
||||
settings.ostr << (settings.hilite ? hilite_operator : "") << '{' << (settings.hilite ? hilite_none : "");
|
||||
settings.ostr << (settings.hilite ? hilite_operator : "") << "map(" << (settings.hilite ? hilite_none : "");
|
||||
for (size_t i = 0; i < arguments->children.size(); ++i)
|
||||
{
|
||||
if (i != 0)
|
||||
settings.ostr << ", ";
|
||||
arguments->children[i]->formatImpl(settings, state, nested_dont_need_parens);
|
||||
}
|
||||
settings.ostr << (settings.hilite ? hilite_operator : "") << '}' << (settings.hilite ? hilite_none : "");
|
||||
settings.ostr << (settings.hilite ? hilite_operator : "") << ')' << (settings.hilite ? hilite_none : "");
|
||||
written = true;
|
||||
}
|
||||
}
|
||||
|
2
tests/queries/0_stateless/01787_map_remote.reference
Normal file
2
tests/queries/0_stateless/01787_map_remote.reference
Normal file
@ -0,0 +1,2 @@
|
||||
{'a':1,'b':2}
|
||||
{'a':1,'b':2}
|
1
tests/queries/0_stateless/01787_map_remote.sql
Normal file
1
tests/queries/0_stateless/01787_map_remote.sql
Normal file
@ -0,0 +1 @@
|
||||
SELECT map('a', 1, 'b', 2) FROM remote('127.0.0.{1,2}', system, one);
|
Loading…
Reference in New Issue
Block a user