Skip to content

Conversation

@HangyuanLiu
Copy link
Contributor

Fix timediff can't support time berfore 1970
#1570

morningman
morningman previously approved these changes Aug 7, 2019
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

int64_t timediff = ts_value1.unix_timestamp() - ts_value2.unix_timestamp();

return DoubleVal(timediff);
int day_diff = ts_value1.daynr() - ts_value2.daynr();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you encapsulate a function return seconds since 0000-01-01 in DateTimeValue?

Copy link
Contributor

@imay imay left a comment

Choose a reason for hiding this comment

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

LGTM

@imay imay merged commit a551abb into apache:master Aug 15, 2019
luwei16 pushed a commit to luwei16/incubator-doris that referenced this pull request Apr 7, 2023
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.

3 participants