manticoresearch icon indicating copy to clipboard operation
manticoresearch copied to clipboard

Change TIMESTAMP type from INT to BIGINT

Open glukkkk opened this issue 5 years ago • 4 comments

Max timestamp we can store now is 2147483647, but we require to store greater timestamps. So, it would be better to change its type to BIGINT. Current limit is not logical at all.

glukkkk avatar Oct 06 '20 13:10 glukkkk

Why not use BIGINT attribute instead of TIMESTAMP as it looks like an alias to regular INT attribute.

Or could you provide cases where BIGINT works differently?

tomatolog avatar Oct 06 '20 14:10 tomatolog

We use BIGINT as workaround, but TIMESTAMP (according to its name) should allow to store any valid timestamps in it. However, it doesn't.

It is just a feature request.

glukkkk avatar Oct 06 '20 15:10 glukkkk

From what I remember, the YEARMONTH(attr) type functions only work with a 32bit uint, they bulk at being passed a bigint.

BUt otherwise, timestamp, seems to work just like uint.

barryhunter avatar Oct 06 '20 15:10 barryhunter

maybe it is better to remove timestamp but provide functions to convert int and bigint values to timestamp or even format value with some kind of date printer

tomatolog avatar Oct 06 '20 15:10 tomatolog

but we require to store greater timestamps

In https://github.com/manticoresoftware/manticoresearch/issues/2370 there's a good real case explanation of why it's important. I'm closing this one as a duplicate.

sanikolaev avatar Jul 03 '24 10:07 sanikolaev