You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "alanredsheep (via GitHub)" <gi...@apache.org> on 2023/08/17 04:22:56 UTC
[GitHub] [doris] alanredsheep opened a new issue, #23089: [Bug] date functions don't support bigint param. eg: FROM_UNIXTIME()、seconds_add() ...
alanredsheep opened a new issue, #23089:
URL: https://github.com/apache/doris/issues/23089
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Version
1.2.6-rc03
### What's Wrong?
Here is the [from_unixtime docs on doris](https://doris.apache.org/zh-CN/docs/1.2/sql-manual/sql-functions/date-time-functions/from_unixtime).
```
DATETIME FROM_UNIXTIME(INT unix_timestamp[, VARCHAR string_format])
```
It says unix_timestamp should between 0 and 253402271999.
But the data type of param "unix_timestamp" is INT. So in fact the param "unix_timestamp" cannot bigger than Interger.MAX(2147483647), otherwise from_unxitime() will return NULL.
There're more functions which have problem like from_unxitime(), such as seconds_sub()、seconds_add()、minutes_sub()、minutes_add()、microseconds_add()、date_add()、date_sub()、TIMESTAMPADD().
### What You Expected?
seconds_sub()、seconds_add()、minutes_sub()、minutes_add()、microseconds_add()、date_add()、date_sub()、TIMESTAMPADD()、FROM_UNIXTIME() should support bigint param.
```
DATETIME FROM_UNIXTIME(BIGINT unix_timestamp[, VARCHAR string_format])
```
### How to Reproduce?
_No response_
### Anything Else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Enhancement] date functions don't support bigint param. eg: FROM_UNIXTIME()、seconds_add() ... [doris]
Posted by "alanredsheep (via GitHub)" <gi...@apache.org>.
alanredsheep commented on issue #23089:
URL: https://github.com/apache/doris/issues/23089#issuecomment-1779062716
doris-2.0 add a new function from_second(bigint) to solve the problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [I] [Enhancement] date functions don't support bigint param. eg: FROM_UNIXTIME()、seconds_add() ... [doris]
Posted by "alanredsheep (via GitHub)" <gi...@apache.org>.
alanredsheep closed issue #23089: [Enhancement] date functions don't support bigint param. eg: FROM_UNIXTIME()、seconds_add() ...
URL: https://github.com/apache/doris/issues/23089
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] alanredsheep commented on issue #23089: [Bug] date functions don't support bigint param. eg: FROM_UNIXTIME()、seconds_add() ...
Posted by "alanredsheep (via GitHub)" <gi...@apache.org>.
alanredsheep commented on issue #23089:
URL: https://github.com/apache/doris/issues/23089#issuecomment-1686123193
> The document here has an error. The range should be like this https://doris.apache.org/zh-CN/docs/dev/sql-manual/sql-functions/date-time-functions/unix-timestamp/
But using INT param is really no enough and dangerous. Could it be optimized on future version ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] Mryange commented on issue #23089: [Bug] date functions don't support bigint param. eg: FROM_UNIXTIME()、seconds_add() ...
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on issue #23089:
URL: https://github.com/apache/doris/issues/23089#issuecomment-1683405415
The document here has an error. The range should be like this https://doris.apache.org/zh-CN/docs/dev/sql-manual/sql-functions/date-time-functions/unix-timestamp/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org