Skip to content

[CALCITE-5589] ElasticsearchFilterRule cannot filter aggregate query - #5450

Merged
xuzifu666 merged 1 commit into
apache:mainfrom
xuzifu666:calcite-5589
Nov 29, 2026
Merged

xuzifu666 merged 1 commit into
apache:mainfrom
xuzifu666:calcite-5589

Conversation

@xuzifu666

Copy link
Copy Markdown
Member

@xuzifu666

Copy link
Copy Markdown
Member Author

Following the reviewers' recommendations, could you please take a look and review this when you have some time? Thanks! @mihaibudiu

@mihaibudiu mihaibudiu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed this a while ago but apparently forgot to submit the review


private ElasticsearchRules() {}

/**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why move this function?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The method is now needed by two rules (ElasticsearchFilterRule.matches() in this fix and the existing ElasticsearchAggregateRule.convert()), and it was private, so it moved to the enclosing ElasticsearchRules class as a package-private static to be shared.

.returns("CAT=2; MAX_VAL1=7.0\nCAT=1; MAX_VAL1=1.0\n");
}

/** Test case for

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

which part of the test checks that the pushdown was successful?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You are right and I had added more tests to cover it.

@sonarqubecloud

Copy link
Copy Markdown

@xuzifu666
xuzifu666 merged commit a87ec68 into apache:main Nov 29, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants