Skip to content

[CALCITE-7589] JOIN ... USING might fail with disabled type coercion#4995

Open
snuyanzin wants to merge 2 commits into
apache:mainfrom
snuyanzin:calcite7589
Open

[CALCITE-7589] JOIN ... USING might fail with disabled type coercion#4995
snuyanzin wants to merge 2 commits into
apache:mainfrom
snuyanzin:calcite7589

Conversation

@snuyanzin
Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7589

Changes Proposed

The PR fixes JOIN ... USING for the case of disabled coercion

RelDataType resultType =
validator().getTypeCoercion().commonTypeForBinaryComparison(
comparedTypes.get(0), comparedTypes.get(1));
RelDataType resultType = validator.config().typeCoercionEnabled()
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 we can use like

RelDataType resultType = validator != null && validator.config().typeCoercionEnabled()
    ? ...
    : ...;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, checker framework is also unhappy about this
I replaced it with validator() method which has embedded null check,
should be fine now

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 6, 2026

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