mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
ISSUES-4006 support decimal 256 for mysql block input stream
This commit is contained in:
parent
6ed3f7fb86
commit
fea763bb75
@ -74,6 +74,8 @@ void ExternalResultDescription::init(const Block & sample_block_)
|
|||||||
types.emplace_back(ValueType::vtDecimal64, is_nullable);
|
types.emplace_back(ValueType::vtDecimal64, is_nullable);
|
||||||
else if (typeid_cast<const DataTypeDecimal<Decimal128> *>(type))
|
else if (typeid_cast<const DataTypeDecimal<Decimal128> *>(type))
|
||||||
types.emplace_back(ValueType::vtDecimal128, is_nullable);
|
types.emplace_back(ValueType::vtDecimal128, is_nullable);
|
||||||
|
else if (typeid_cast<const DataTypeDecimal<Decimal256> *>(type))
|
||||||
|
types.emplace_back(ValueType::vtDecimal256, is_nullable);
|
||||||
else
|
else
|
||||||
throw Exception{"Unsupported type " + type->getName(), ErrorCodes::UNKNOWN_TYPE};
|
throw Exception{"Unsupported type " + type->getName(), ErrorCodes::UNKNOWN_TYPE};
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,8 @@ struct ExternalResultDescription
|
|||||||
vtDateTime64,
|
vtDateTime64,
|
||||||
vtDecimal32,
|
vtDecimal32,
|
||||||
vtDecimal64,
|
vtDecimal64,
|
||||||
vtDecimal128
|
vtDecimal128,
|
||||||
|
vtDecimal256
|
||||||
};
|
};
|
||||||
|
|
||||||
Block sample_block;
|
Block sample_block;
|
||||||
|
@ -90,7 +90,8 @@ namespace
|
|||||||
case ValueType::vtDateTime64:[[fallthrough]];
|
case ValueType::vtDateTime64:[[fallthrough]];
|
||||||
case ValueType::vtDecimal32: [[fallthrough]];
|
case ValueType::vtDecimal32: [[fallthrough]];
|
||||||
case ValueType::vtDecimal64: [[fallthrough]];
|
case ValueType::vtDecimal64: [[fallthrough]];
|
||||||
case ValueType::vtDecimal128:
|
case ValueType::vtDecimal128:[[fallthrough]];
|
||||||
|
case ValueType::vtDecimal256:
|
||||||
{
|
{
|
||||||
ReadBuffer buffer(const_cast<char *>(value.data()), value.size(), 0);
|
ReadBuffer buffer(const_cast<char *>(value.data()), value.size(), 0);
|
||||||
data_type.deserializeAsWholeText(column, buffer, FormatSettings{});
|
data_type.deserializeAsWholeText(column, buffer, FormatSettings{});
|
||||||
|
Loading…
Reference in New Issue
Block a user