Skip to content

Commit fd160e5

Browse files
fix cast for tuple
1 parent ef9b37e commit fd160e5

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/Analyzer/ConstantNode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ bool ConstantNode::requiresCastCall(Field::Types::Which type, const DataTypePtr
106106
bool ConstantNode::requiresCastCall(const DataTypePtr & field_type, const DataTypePtr & data_type)
107107
{
108108
WhichDataType which_field_type(field_type);
109-
if (which_field_type.isNullable() || which_field_type.isArray())
109+
if (which_field_type.isNullable() || which_field_type.isArray() || which_field_type.isTuple())
110110
return true;
111111

112112
return field_type->getTypeId() != data_type->getTypeId();
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2 (-9,0)
2+
2 (-8,1)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set enable_analyzer=1;
2+
3+
SELECT count(), plus((-9, 0), (number, number)) AS k FROM remote('127.0.0.{3,2}', numbers(2)) GROUP BY k;

0 commit comments

Comments
 (0)