Skip to content

Conversation

@scarlin-cloudera
Copy link
Contributor

…ercion

When the query has a where clause that has an integer column checking against
being "not in" a decimal column, the decimal column is being changed to null,
causing incorrect results.

This is a sample query of a failure:
select count from my_tbl where int_col not in (355.8);

Since the int_col can never be 355.8, one would expect all the rows to be
returned, but it is changing the 355.8 into a null value causing no rows
to be returned.

The fix is that when the value is attempted to be interpreted and it fails,
the original type should be used rather than null.

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

…ercion

When the query has a where clause that has an integer column checking against
being "not in" a decimal column, the decimal column is being changed to null,
causing incorrect results.

This is a sample query of a failure:
select count from my_tbl where int_col not in (355.8);

Since the int_col can never be 355.8, one would expect all the rows to be
returned, but it is changing the 355.8 into a null value causing no rows
to be returned.

The fix is that when the value is attempted to be interpreted and it fails,
the original type should be used rather than null.
@github-actions
Copy link

github-actions bot commented Jun 7, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.

@github-actions github-actions bot added the stale label Jun 7, 2021
@github-actions github-actions bot closed this Jun 15, 2021
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