mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
commit
b1fe128109
@ -188,6 +188,13 @@ void DataTypeTuple::deserializeText(IColumn & column, ReadBuffer & istr, const F
|
||||
}
|
||||
});
|
||||
|
||||
// Special format for one element tuple (1,)
|
||||
if (1 == elems.size())
|
||||
{
|
||||
skipWhitespaceIfAny(istr);
|
||||
// Allow both (1) and (1,)
|
||||
checkChar(',', istr);
|
||||
}
|
||||
skipWhitespaceIfAny(istr);
|
||||
assertChar(')', istr);
|
||||
}
|
||||
|
@ -2,4 +2,12 @@ SELECT toTypeName((1,)), (1,);
|
||||
|
||||
SET enable_debug_queries = 1;
|
||||
|
||||
ANALYZE SELECT (1,)
|
||||
ANALYZE SELECT (1,);
|
||||
|
||||
DROP TABLE IF EXISTS tuple_values;
|
||||
|
||||
CREATE TABLE tuple_values (t Tuple(int)) ENGINE = Memory;
|
||||
|
||||
INSERT INTO tuple_values VALUES ((1)), ((2,));
|
||||
|
||||
DROP TABLE tuple_values;
|
||||
|
Loading…
Reference in New Issue
Block a user