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.

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