Skip to content

Commit 9542b4a

Browse files
committed
Disable decimal pushdown (#18466)
Conflicts: .github/config/muted_ya.txt
1 parent cd8bd1f commit 9542b4a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/config/muted_ya.txt

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

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ bool IsGoodTypeForArithmeticPushdown(const TTypeAnnotationNode& type, bool allow
111111

112112
bool IsGoodTypeForComparsionPushdown(const TTypeAnnotationNode& type, bool allowOlapApply) {
113113
const auto features = NUdf::GetDataTypeInfo(RemoveOptionality(type).Cast<TDataExprType>()->GetSlot()).Features;
114+
if (features & NUdf::EDataTypeFeatures::DecimalType) {
115+
return false;
116+
}
114117
return (NUdf::EDataTypeFeatures::CanCompare & features)
115118
&& (((NUdf::EDataTypeFeatures::NumericType | NUdf::EDataTypeFeatures::StringType) & features) ||
116119
(allowOlapApply && ((NUdf::EDataTypeFeatures::ExtDateType |
@@ -232,7 +235,7 @@ bool IsGoodTypesForPushdownCompare(const TTypeAnnotationNode& typeOne, const TTy
232235
const auto& rawOne = RemoveOptionality(typeOne);
233236
const auto& rawTwo = RemoveOptionality(typeTwo);
234237
if (IsSameAnnotation(rawOne, rawTwo))
235-
return true;
238+
return IsGoodTypeForComparsionPushdown(rawOne, options.AllowOlapApply);
236239

237240
const auto kindOne = rawOne.GetKind();
238241
const auto kindTwo = rawTwo.GetKind();

ydb/core/kqp/ut/olap/decimal_ut.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Y_UNIT_TEST_SUITE(KqpDecimalColumnShard) {
173173
"[[[\"3.14\"];1;[4]];[[\"8.16\"];2;[3]];[[\"8.492\"];3;[2]];[[\"12.46\"];4;[1]]]");
174174

175175
tester.CheckQuery("SELECT * FROM `/Root/Table1` WHERE dec >= cast(\"8.492\" as decimal(22,9)) order by id",
176-
"[[[\"8.16\"];2;[3]];[[\"8.492\"];3;[2]];[[\"12.46\"];4;[1]]]");
176+
"[[[\"8.492\"];3;[2]];[[\"12.46\"];4;[1]]]");
177177
};
178178

179179
check(tester22);

0 commit comments

Comments
 (0)