fix UB (attempt 2)

This commit is contained in:
chertus 2019-11-12 03:18:13 +03:00
parent 4411edeadd
commit 92fda25029
2 changed files with 4 additions and 2 deletions

View File

@ -65,7 +65,8 @@ struct ArrayCumSumImpl
typename ColVecResult::MutablePtr res_nested;
if constexpr (IsDecimalNumber<Element>)
{
const typename ColVecType::Container & data = column->getData();
const typename ColVecType::Container & data =
checkAndGetColumn<ColVecType>(&column_const->getDataColumn())->getData();
res_nested = ColVecResult::create(0, data.getScale());
}
else

View File

@ -62,7 +62,8 @@ struct ArraySumImpl
typename ColVecResult::MutablePtr res_column;
if constexpr (IsDecimalNumber<Element>)
{
const typename ColVecType::Container & data = column->getData();
const typename ColVecType::Container & data =
checkAndGetColumn<ColVecType>(&column_const->getDataColumn())->getData();
res_column = ColVecResult::create(offsets.size(), data.getScale());
}
else