diff options
author | a-romanov <Anton.Romanov@ydb.tech> | 2023-08-23 22:00:18 +0300 |
---|---|---|
committer | a-romanov <Anton.Romanov@ydb.tech> | 2023-08-23 22:16:43 +0300 |
commit | 50d1783a3b18dcd6be6f0daa376411e2c7082063 (patch) | |
tree | b924e3160aa3898e61d9e5901a337707bb6056dc | |
parent | ff9687dd6ba1e81aa0e53a9a0967128ccd5a7fa5 (diff) | |
download | ydb-50d1783a3b18dcd6be6f0daa376411e2c7082063.tar.gz |
YQL-16379 Fix check complicated constraints.
-rw-r--r-- | ydb/library/yql/core/yql_expr_constraint.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/ydb/library/yql/core/yql_expr_constraint.cpp b/ydb/library/yql/core/yql_expr_constraint.cpp index 6f7da14347..923b5ca2d9 100644 --- a/ydb/library/yql/core/yql_expr_constraint.cpp +++ b/ydb/library/yql/core/yql_expr_constraint.cpp @@ -1812,13 +1812,9 @@ private: } const std::vector<const TConstraintSet*> both = { &lambda->GetConstraintSet(), &input->Tail().GetConstraintSet() }; - TApplyCommonConstraint<TSortedConstraintNode - , TPartOfSortedConstraintNode - , TChoppedConstraintNode + TApplyCommonConstraint<TPartOfSortedConstraintNode , TPartOfChoppedConstraintNode - , TUniqueConstraintNode , TPartOfUniqueConstraintNode - , TDistinctConstraintNode , TPartOfDistinctConstraintNode , TPassthroughConstraintNode , TEmptyConstraintNode @@ -3734,17 +3730,13 @@ private: } } - void CheckExpected(const TExprNode& input, TExprContext& ctx) { + void CheckExpected(const TExprNode& input, TExprContext&) { if constexpr (DisableCheck) return; if (const auto it = Types.ExpectedConstraints.find(input.UniqueId()); it != Types.ExpectedConstraints.cend()) { - for (const TConstraintNode* expectedConstr: it->second) { + for (const auto expectedConstr: it->second) { if (!Types.DisableConstraintCheck.contains(expectedConstr->GetName())) { - expectedConstr = expectedConstr->OnlySimpleColumns(ctx); - if (!expectedConstr) - continue; - if (auto newConstr = input.GetConstraint(expectedConstr->GetName())) { if (expectedConstr->GetName() == TMultiConstraintNode::Name()) { YQL_ENSURE(static_cast<const TMultiConstraintNode*>(newConstr)->FilteredIncludes(*expectedConstr, Types.DisableConstraintCheck), "Rewrite error, unequal " << *newConstr |