mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Backport #69787 to 24.8: Fix 'Bad get' in maxMap state serialization
This commit is contained in:
parent
66bf2a0bf6
commit
024d898b0e
@ -298,12 +298,13 @@ public:
|
||||
Field value = values[col_idx];
|
||||
|
||||
/// Compatibility with previous versions.
|
||||
if (value.getType() == Field::Types::Decimal32)
|
||||
WhichDataType value_type(values_types[col_idx]);
|
||||
if (value_type.isDecimal32())
|
||||
{
|
||||
auto source = value.safeGet<DecimalField<Decimal32>>();
|
||||
value = DecimalField<Decimal128>(source.getValue(), source.getScale());
|
||||
}
|
||||
else if (value.getType() == Field::Types::Decimal64)
|
||||
else if (value_type.isDecimal64())
|
||||
{
|
||||
auto source = value.safeGet<DecimalField<Decimal64>>();
|
||||
value = DecimalField<Decimal128>(source.getValue(), source.getScale());
|
||||
|
@ -0,0 +1 @@
|
||||
{"x":"\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"}
|
@ -0,0 +1 @@
|
||||
select maxMapState([0], [toDateTime64(0, 0)]) as x format JSONEachRow;
|
Loading…
Reference in New Issue
Block a user