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

Overflow in sys.epoch #6412

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Overflow in sys.epoch #6412

monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2017-10-02 14:57:08 +0200
From: Manuel <>
To: SQL devs <>
Version: 11.25.23 (Dec2016-SP5)
CC: @njnes

Last updated: 2017-11-01 16:41:06 +0100

Comment 25677

Date: 2017-10-02 14:57:08 +0200
From: Manuel <>

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Build Identifier:

If I call sys.epoch function on date beyond 19-01-2038 03:14:00, what I get back is a negative number. I understand that this is an overflow issue, but currently there is no work-around for this problem in monetdb.

Reproducible: Always

Steps to Reproduce:

select sys.epoch(str_to_timestamp('19-01-2038 03:15', '%d-%m-%Y %H:%M')) AS "timestamp";

Actual Results:

-2147483596

Expected Results:

2147483700

I am actually using sys.epoch to evaluate the mean (avg) over a date column: Is there an alternative workaround for that ?.

Comment 25720

Date: 2017-10-15 11:32:17 +0200
From: @njnes

given the current data type (int) used an error should be given by the epoch function. Somehow we need to switch to BIGINT.

Comment 25834

Date: 2017-11-01 16:41:06 +0100
From: Manuel <>

(In reply to Niels Nes from comment 1)

given the current data type (int) used an error should be given by the epoch
function. Somehow we need to switch to BIGINT.

Would it be possible to introduce a new function returning a bigint ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant