Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bugfix/cor 74 incorrect order arangosearch constrained sort#22188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
k0ushal wants to merge2 commits intodevel
base:devel
Choose a base branch
Loading
frombugfix/COR-74-incorrect-order-arangosearch-constrained-sort

Conversation

@k0ushal
Copy link
Contributor

@k0ushalk0ushal commentedDec 15, 2025
edited by cursorbot
Loading

Scope & Purpose

(Please describe the changes in this PR for reviewers, motivation, rationale -mandatory)

  • 💩 Bugfix
  • 🍕 New feature
  • 🔥 Performance improvement
  • 🔨 Refactoring/simplification

Checklist

  • Tests
    • Regression tests
    • C++Unit tests
    • integration tests
    • resilience tests
  • 📖 CHANGELOG entry made
  • 📚 documentation written (release notes, API changes, ...)
  • Backports
    • Backport for 3.12.0:(Please link PR)
    • Backport for 3.11:(Please link PR)
    • Backport for 3.10:(Please link PR)

Related Information

(Please reference tickets / specification / other PRs etc)


Note

Fixes incorrect ordering for constrained ArangoSearch SORT by properly splitting/traversing nested postfix attributes and building correct postfix in optimizer heap sort mapping.

  • AQL/IResearch execution:
    • IResearchViewExecutorBase.tpp: UpdategetStoredValue to split dot-separatedpostfix and traverse nested object attributes step-by-step (supportsdoc.a.b...), with minor includes added.
  • Optimizer (constrained sort):
    • OptimizerRulesIResearchView.cpp: Fix construction ofHeapSortElement.postfix when attributes are partially covered by primary sort/stored values by iterating fromfieldSize overa.afData.postfix and usinga.attr[i].name to compose the remaining path.

Written byCursor Bugbot for commit9163f4a. This will update automatically on new commits. Configurehere.

@k0ushalk0ushal self-assigned thisDec 15, 2025
Copy link

@cursorcursorbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on December 28

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit theCursor dashboard to activate Pro and start your 14-day free trial.

}
sortBucket.postfix += a.afData.field->at(i).name;
sortBucket.postfix += a.attr[i].name;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Bug: Incorrect postfix string separator condition causes malformed output

The conditionif (i != a.afData.postfix + 1) for adding the dot separator is incorrect. Sincei starts atfieldSize and iterates up, the check for skipping the dot on the first iteration needs to compare againstfieldSize, nota.afData.postfix + 1. With the current condition, whenfieldSize equals 2 anda.afData.postfix equals 2, the first iteration (i=2) incorrectly adds a leading dot before the first attribute, producing malformed postfix strings like.l3l4 instead ofl3.l4.

Fix in Cursor Fix in Web

// primarySort: { field: "l1.l2", asc: true }
// W.r.t to the sort field ("l1.l2"), the query attribute in the sort clause
// has a postfix of "l3.l4"
auto splitPostfixAttrs = [](const std::string& input) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Not sure how "hot" his code is but:
theattr temporary andpush_back are not needed.
postfixAttrs.emplace_back(part.begin(), part.end()); should do the same with no temp objects.

Also, my experience with the ranges lib is limited but I would assume the you can just pass theinput directly to it, without the extrastring_view.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@johann-listunovjohann-listunovjohann-listunov left review comments

@cursorcursor[bot]cursor[bot] left review comments

@goedderzgoedderzAwaiting requested review from goedderz

At least 1 approving review is required to merge this pull request.

Assignees

@k0ushalk0ushal

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@k0ushal@johann-listunov

[8]ページ先頭

©2009-2025 Movatter.jp