Skip to content

Conversation

@pengpeng-lu
Copy link
Contributor

Skip generating rank index match candidate for SQL, but keep the value index match candidate.

@pengpeng-lu pengpeng-lu added the bug fix Change that fixes a bug label Nov 12, 2025
Copy link
Collaborator

@alecgrieser alecgrieser left a comment

Choose a reason for hiding this comment

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

LGTM. This pretty clearly will allow us to get around the issue with #3737. We may want to add some more testing/documentation, though we could do that as a follow up

matchCandidatesBuilder.addAll(matchCandidateRegistry.createMatchCandidates(metaData, index, false));
if (IndexTypes.RANK.equals(index.getType())) {
final IndexExpansionInfo info = IndexExpansionInfo.createInfo(metaData, index, false);
// For rank() we still want to create the match candidate for BY_VALUE scans.
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would probably be good to have a note here about why we are skipping rank index match candidate generation here (namely that it's not quite ready for SQL but that we want to continue to generate it RecordQuery queries).

One of the reasons it's not ready is that it can't handle multiple grouping columns (see #3737), and it would be good to have a test covering that.

@alecgrieser alecgrieser merged commit 13c624a into FoundationDB:main Nov 13, 2025
8 checks passed
@alecgrieser alecgrieser changed the title skip generating rank index match candidate for SQL Skip rank index match candidate generation for SQL queries Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix Change that fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants