Skip to content

[CALCITE-7354] Add assertion that the size of the Project's variablesSet should be less than or equal to 1#4865

Open
AestheticAkhmad wants to merge 1 commit intoapache:mainfrom
AestheticAkhmad:CALCITE-7354-Assert-variablesSet-less-or-equal-to-one
Open

[CALCITE-7354] Add assertion that the size of the Project's variablesSet should be less than or equal to 1#4865
AestheticAkhmad wants to merge 1 commit intoapache:mainfrom
AestheticAkhmad:CALCITE-7354-Assert-variablesSet-less-or-equal-to-one

Conversation

@AestheticAkhmad
Copy link
Copy Markdown

Jira Link

CALCITE-7354

Changes Proposed

Added checkArgument() assertion to ensure project.getVariablesSet().size() contains at most one correlation variable in RelFieldTrimmer.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 3, 2026

Project project,
ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields) {
checkArgument(project.getVariablesSet().size() <= 1,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perhaps including the actual size in the error message would make troubleshooting easier.

Project project,
ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields) {
checkArgument(project.getVariablesSet().size() <= 1,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel that making a judgment at the beginning is not a good choice.

@xiedeyantu
Copy link
Copy Markdown
Member

I am not entirely sure if this original requirement is correct; is it absolutely certain that variablesSet within the PROJECT will never exceed 1?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 90 days if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@calcite.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants