Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ydb/library/yql/ast/yql_constraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,8 @@ TSortedConstraintNode::DoGetSimplifiedForType(const TTypeAnnotationNode& type, T
++it;

if (ssize_t(GetElementsCount(subType)) == std::distance(from, it)) {
*from++ = std::make_pair(TPartOfConstraintBase::TSetType{std::move(prefix)}, from->second);
*from = std::make_pair(TPartOfConstraintBase::TSetType{std::move(prefix)}, from->second);
++from;
it = content.erase(from, it);
changed = setChanged = true;
}
Expand Down
4 changes: 2 additions & 2 deletions ydb/library/yql/core/common_opt/yql_co_simple1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3087,8 +3087,8 @@ std::unordered_set<ui32> GetUselessSortedJoinInputs(const TCoEquiJoin& equiJoin)
if (!joinTree->Head().IsAtom("Cross")) {
std::unordered_map<std::string_view, TPartOfConstraintBase::TSetType> tableJoinKeys;
for (const auto keys : {joinTree->Child(3), joinTree->Child(4)})
for (ui32 i = 0U; i < keys->ChildrenSize(); ++i)
tableJoinKeys[keys->Child(i)->Content()].insert_unique(TPartOfConstraintBase::TPathType(1U, keys->Child(++i)->Content()));
for (ui32 i = 0U; i < keys->ChildrenSize(); i += 2)
tableJoinKeys[keys->Child(i)->Content()].insert_unique(TPartOfConstraintBase::TPathType(1U, keys->Child(i + 1)->Content()));

for (const auto& [label, joinKeys]: tableJoinKeys) {
if (const auto it = sorteds.find(label); sorteds.cend() != it) {
Expand Down