Skip to content

HIVE-27070: Multiple is NULL check together fails in CalcitePlanner#6550

Open
soumyakanti3578 wants to merge 1 commit into
apache:masterfrom
soumyakanti3578:HIVE-27070
Open

HIVE-27070: Multiple is NULL check together fails in CalcitePlanner#6550
soumyakanti3578 wants to merge 1 commit into
apache:masterfrom
soumyakanti3578:HIVE-27070

Conversation

@soumyakanti3578

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Added a new interface NonNullableReturnTypeUDF to identify UDFs with a non-nullable return type.
When a NonNullableReturnTypeUDF is identified in HiveFunctionHelper.getReturnType, we can create the return type with nullability set to false.

Currently GenericUDFOPNull and GenericUDFOPNotNull implements the interface.

Why are the changes needed?

Calcite has a Strong policy where it validates and asserts that the output of a function like IS NULL has a non-nullable return type. This is done in RexSimplify.validateStrongPolicy

Jira: HIVE-27070

Does this PR introduce any user-facing change?

No

How was this patch tested?

mvn test -pl itests/qtest -Pitests -Dtest=TestMiniLlapLocalCliDriver -Dtest.output.overwrite=true -Dqfile="is_null_is_not_null_nested.q"

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants