Skip to content

Commit ad9862d

Browse files
committed
Disable aggregation pushdown for Decimal type (#18595)
Conflicts: .github/config/muted_ya.txt
1 parent 9542b4a commit ad9862d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/config/muted_ya.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ ydb/core/keyvalue/ut_trace TKeyValueTracingTest.ReadSmall
1818
ydb/core/keyvalue/ut_trace TKeyValueTracingTest.WriteHuge
1919
ydb/core/keyvalue/ut_trace TKeyValueTracingTest.WriteSmall
2020
ydb/core/kqp/ut/cost KqpCost.OlapWriteRow
21-
ydb/core/kqp/ut/olap KqpDecimalColumnShard.TestAggregation
2221
ydb/core/kqp/ut/olap KqpOlapAggregations.BlockGenericWithDistinct
2322
ydb/core/kqp/ut/olap KqpOlapSysView.StatsSysViewBytesColumnActualization
2423
ydb/core/kqp/ut/olap KqpOlapSysView.StatsSysViewBytesDictActualization

ydb/core/kqp/opt/physical/kqp_opt_phy_olap_agg.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ bool CanBePushedDown(const TExprBase& trait, TExprContext& ctx)
6767
}
6868
auto aggApply = trait.Cast<TCoAggApply>();
6969
auto aggName = aggApply.Name();
70+
const auto& aggType = aggApply.Extractor().Ptr()->GetTypeAnn();
71+
if (const auto& nakedType = RemoveOptionality(*aggType); nakedType.GetKind() == ETypeAnnotationKind::Data) {
72+
if (GetDataTypeInfo(nakedType.Cast<TDataExprType>()->GetSlot()).Features & NUdf::EDataTypeFeatures::DecimalType)
73+
return false;
74+
}
7075
if (SupportedAggFuncs.find(aggName.StringValue()) != SupportedAggFuncs.end()) {
7176
return true;
7277
}

0 commit comments

Comments
 (0)