Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assertions for old Hive versions in TestHiveViews for from_utc_timestamp #8860

Merged
merged 1 commit into from
Aug 12, 2021

Conversation

losipiuk
Copy link
Member

No description provided.

@losipiuk
Copy link
Member Author

@hashhar @findepi - can we do better? :/

Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

Looks like the best we can do. It's better to document such things as tests rather than leave them unknown.

What is the Hive behaviour though - I can't understand how it's arriving at those specific values?

LGTM % nits.


private boolean isNewFromUtcTimestampSemantics()
{
// it appears from_utc_timestamp semantics in Hive changes some time on the way. The guess is that it happened
Copy link
Member

Choose a reason for hiding this comment

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

nit: Should we update the comment to be statement instead of a guess once the tests are green with this assumption.

Copy link
Member

@hashhar hashhar Aug 11, 2021

Choose a reason for hiding this comment

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

Also, maybe reversing the function logic (i.e. return !(condition)) + rename to isOld may make more sense given that the old behaviour is the "exceptional" behaviour and new behaviour is the expected one.

Copy link
Member Author

Choose a reason for hiding this comment

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

I reveresed the condition. As for guessing, the green pass does not tell us much. I see that behaviour is different for 3.1 and for older ones. But I do not know if the behavior switch was exactly on version 3.1

@losipiuk
Copy link
Member Author

What is the Hive behaviour though - I can't understand how it's arriving at those specific values?

It looks like on old Hive values are shifted by timezone offset of Hive's VM. It is using Asia/Kathmandu which is +5:30 or 5:45 vs UTC.
I do not get what it did with 1811-07-23 07:13:41.999 which is 1811-07-23 12:51:39.999 on old Hive.

@losipiuk losipiuk merged commit dad2092 into trinodb:master Aug 12, 2021
@losipiuk losipiuk mentioned this pull request Aug 12, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants