aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony-Romanov <150126326+Tony-Romanov@users.noreply.github.com>2024-01-29 09:25:45 +0100
committerGitHub <noreply@github.com>2024-01-29 09:25:45 +0100
commit14521dd357a680149f8000fa69ae0d8ffd5d41d4 (patch)
tree5691b548a2924949cea9380d68d6c3803bbd2193
parentf48a1ff716de9fb1fd32b011d6c79c18d91e9669 (diff)
downloadydb-14521dd357a680149f8000fa69ae0d8ffd5d41d4.tar.gz
Enable real arithmetic. (#1352)
-rw-r--r--ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp2
-rw-r--r--ydb/core/kqp/ut/olap/kqp_olap_ut.cpp7
2 files changed, 7 insertions, 2 deletions
diff --git a/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp b/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp
index 48c69d9c32..de70e17d40 100644
--- a/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp
+++ b/ydb/core/kqp/opt/physical/kqp_opt_phy_olap_filter.cpp
@@ -646,7 +646,7 @@ void SplitForPartialPushdown(const NPushdown::TPredicateNode& predicateTree, NPu
}
bool IsGoodTypeForPushdown(const TTypeAnnotationNode& type) {
- return NUdf::EDataTypeFeatures::IntegralType & NUdf::GetDataTypeInfo(RemoveOptionality(type).Cast<TDataExprType>()->GetSlot()).Features;
+ return NUdf::EDataTypeFeatures::NumericType & NUdf::GetDataTypeInfo(RemoveOptionality(type).Cast<TDataExprType>()->GetSlot()).Features;
}
bool IsGoodTypesForPushdownCompare(const TTypeAnnotationNode& typeOne, const TTypeAnnotationNode& typeTwo) {
diff --git a/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp b/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp
index 0241e11c90..0e37f75197 100644
--- a/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp
+++ b/ydb/core/kqp/ut/olap/kqp_olap_ut.cpp
@@ -1773,6 +1773,11 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
R"(`level` IS NOT NULL AND `message` IS NOT NULL)",
R"(`level` IS NULL XOR `message` IS NOT NULL)",
R"(`level` IS NULL XOR `message` IS NULL)",
+ R"(`level` + 2. < 5.f)",
+ R"(`level` - 2.f >= 1.)",
+ R"(`level` * 3. > 4.f)",
+ R"(`level` / 2.f <= 1.)",
+ R"(`level` % 3. != 1.f)",
#endif
};
@@ -1833,7 +1838,6 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
R"(`level` >= CAST("2" As Uint32))",
R"(`level` = NULL)",
R"(`level` > NULL)",
- R"(`level` * 3.14 > 4)",
#if SSA_RUNTIME_VERSION < 2U
R"(`uid` LIKE "%30000%")",
R"(`uid` LIKE "uid%")",
@@ -1841,6 +1845,7 @@ Y_UNIT_TEST_SUITE(KqpOlap) {
R"(`uid` LIKE "uid%001")",
#endif
#if SSA_RUNTIME_VERSION < 4U
+ R"(`level` * 3.14 > 4)",
R"(LENGTH(`uid`) > 0 OR `resource_id` = "10001")",
R"((LENGTH(`uid`) > 0 AND `resource_id` = "10001") OR `resource_id` = "10002")",
R"((LENGTH(`uid`) > 0 OR `resource_id` = "10002") AND (LENGTH(`uid`) < 15 OR `resource_id` = "10001"))",