[jira] [Updated] (CALCITE-2699) The bug of timestampadd handles time

2018-12-01 Thread xuqianjin (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xuqianjin updated CALCITE-2699:
---
External issue URL: https://github.com/apache/calcite/pull/936
 Fix Version/s: 1.17.0
1.18.0

> The bug of timestampadd  handles time
> -
>
> Key: CALCITE-2699
> URL: https://issues.apache.org/jira/browse/CALCITE-2699
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.17.0, 1.18.0
>Reporter: xuqianjin
>Assignee: Julian Hyde
>Priority: Major
> Fix For: 1.17.0, 1.18.0
>
>
> Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is 
> executed:
>  # The return result can only be of {{TimeStamp}} type and is expected to be 
> of {{Time}} type
>  # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
> {{01:01:00}}
>  # I think it should meet the following conditions:
> ||expression||Expect the result||
> |timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
> |timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
> |timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
> |timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
> |timestampadd(HOUR, 1, time '23:59:59')|00:59:59|
> |timestampadd(DAY, -1, time '23:59:59')|23:59:59|
> |timestampadd(WEEK, -1, time '23:59:59')|23:59:59|
> |timestampadd(MONTH, -1, time '23:59:59')|23:59:59|
> |timestampadd(QUARTER, -1, time '23:59:59')|23:59:59|
> |timestampadd(YEAR, -1, time '23:59:59')|23:59:59|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CALCITE-2699) The bug of timestampadd handles time

2018-11-26 Thread xuqianjin (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xuqianjin updated CALCITE-2699:
---
Description: 
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # I think it should meet the following conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|00:59:59|
|timestampadd(DAY, -1, time '23:59:59')|23:59:59|
|timestampadd(WEEK, -1, time '23:59:59')|23:59:59|
|timestampadd(MONTH, -1, time '23:59:59')|23:59:59|
|timestampadd(QUARTER, -1, time '23:59:59')|23:59:59|
|timestampadd(YEAR, -1, time '23:59:59')|23:59:59|

  was:
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # I think it should meet the following conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|00:59:59|


> The bug of timestampadd  handles time
> -
>
> Key: CALCITE-2699
> URL: https://issues.apache.org/jira/browse/CALCITE-2699
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.17.0, 1.18.0
>Reporter: xuqianjin
>Assignee: Julian Hyde
>Priority: Major
>
> Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is 
> executed:
>  # The return result can only be of {{TimeStamp}} type and is expected to be 
> of {{Time}} type
>  # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
> {{01:01:00}}
>  # I think it should meet the following conditions:
> ||expression||Expect the result||
> |timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
> |timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
> |timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
> |timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
> |timestampadd(HOUR, 1, time '23:59:59')|00:59:59|
> |timestampadd(DAY, -1, time '23:59:59')|23:59:59|
> |timestampadd(WEEK, -1, time '23:59:59')|23:59:59|
> |timestampadd(MONTH, -1, time '23:59:59')|23:59:59|
> |timestampadd(QUARTER, -1, time '23:59:59')|23:59:59|
> |timestampadd(YEAR, -1, time '23:59:59')|23:59:59|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CALCITE-2699) The bug of timestampadd handles time

2018-11-23 Thread xuqianjin (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xuqianjin updated CALCITE-2699:
---
 Docs Text: https://github.com/apache/calcite/pull/936
External issue URL:   (was: https://github.com/apache/calcite/pull/936)

> The bug of timestampadd  handles time
> -
>
> Key: CALCITE-2699
> URL: https://issues.apache.org/jira/browse/CALCITE-2699
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.17.0, 1.18.0
>Reporter: xuqianjin
>Assignee: Julian Hyde
>Priority: Major
>
> Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is 
> executed:
>  # The return result can only be of {{TimeStamp}} type and is expected to be 
> of {{Time}} type
>  # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
> {{01:01:00}}
>  # I think it should meet the following conditions:
> ||expression||Expect the result||
> |timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
> |timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
> |timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
> |timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
> |timestampadd(HOUR, 1, time '23:59:59')|00:59:59|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CALCITE-2699) The bug of timestampadd handles time

2018-11-23 Thread xuqianjin (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xuqianjin updated CALCITE-2699:
---
Docs Text:   (was: https://github.com/apache/calcite/pull/936)

> The bug of timestampadd  handles time
> -
>
> Key: CALCITE-2699
> URL: https://issues.apache.org/jira/browse/CALCITE-2699
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.17.0, 1.18.0
>Reporter: xuqianjin
>Assignee: Julian Hyde
>Priority: Major
>
> Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is 
> executed:
>  # The return result can only be of {{TimeStamp}} type and is expected to be 
> of {{Time}} type
>  # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
> {{01:01:00}}
>  # I think it should meet the following conditions:
> ||expression||Expect the result||
> |timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
> |timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
> |timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
> |timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
> |timestampadd(HOUR, 1, time '23:59:59')|00:59:59|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CALCITE-2699) The bug of timestampadd handles time

2018-11-23 Thread xuqianjin (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xuqianjin updated CALCITE-2699:
---
External issue URL: https://github.com/apache/calcite/pull/936

> The bug of timestampadd  handles time
> -
>
> Key: CALCITE-2699
> URL: https://issues.apache.org/jira/browse/CALCITE-2699
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.17.0, 1.18.0
>Reporter: xuqianjin
>Assignee: Julian Hyde
>Priority: Major
>
> Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is 
> executed:
>  # The return result can only be of {{TimeStamp}} type and is expected to be 
> of {{Time}} type
>  # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
> {{01:01:00}}
>  # I think it should meet the following conditions:
> ||expression||Expect the result||
> |timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
> |timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
> |timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
> |timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
> |timestampadd(HOUR, 1, time '23:59:59')|00:59:59|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CALCITE-2699) The bug of timestampadd handles time

2018-11-23 Thread xuqianjin (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xuqianjin updated CALCITE-2699:
---
Description: 
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # I think it should meet the following conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|00:59:59|

  was:
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # Compared with {{mysql}} database, I think it should meet the following 
conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|00:59:59|


> The bug of timestampadd  handles time
> -
>
> Key: CALCITE-2699
> URL: https://issues.apache.org/jira/browse/CALCITE-2699
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.17.0, 1.18.0
>Reporter: xuqianjin
>Assignee: Julian Hyde
>Priority: Major
>
> Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is 
> executed:
>  # The return result can only be of {{TimeStamp}} type and is expected to be 
> of {{Time}} type
>  # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
> {{01:01:00}}
>  # I think it should meet the following conditions:
> ||expression||Expect the result||
> |timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
> |timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
> |timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
> |timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
> |timestampadd(HOUR, 1, time '23:59:59')|00:59:59|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CALCITE-2699) The bug of timestampadd handles time

2018-11-23 Thread xuqianjin (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xuqianjin updated CALCITE-2699:
---
Description: 
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # Compared with {{mysql}} database, I think it should meet the following 
conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|00:59:59|

  was:
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # Compared with {{mysql}} database, I think it should meet the following 
conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|-00:01:00|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')| 24:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|24:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|24:59:59|


> The bug of timestampadd  handles time
> -
>
> Key: CALCITE-2699
> URL: https://issues.apache.org/jira/browse/CALCITE-2699
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.17.0, 1.18.0
>Reporter: xuqianjin
>Assignee: Julian Hyde
>Priority: Major
>
> Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is 
> executed:
>  # The return result can only be of {{TimeStamp}} type and is expected to be 
> of {{Time}} type
>  # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
> {{01:01:00}}
>  # Compared with {{mysql}} database, I think it should meet the following 
> conditions:
> ||expression||Expect the result||
> |timestampadd(MINUTE, -1, time '00:00:00')|23:59:00|
> |timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
> |timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
> |timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
> |timestampadd(HOUR, 1, time '23:59:59')|00:59:59|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CALCITE-2699) The bug of timestampadd handles time

2018-11-23 Thread xuqianjin (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xuqianjin updated CALCITE-2699:
---
Description: 
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # Compared with {{mysql}} database, I think it should meet the following 
conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|-00:01:00|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')| 24:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|24:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|24:59:59|

  was:
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # Compared with {{mysql}} database, I think it should meet the following 
conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|-00:01:00|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|00:59:59|


> The bug of timestampadd  handles time
> -
>
> Key: CALCITE-2699
> URL: https://issues.apache.org/jira/browse/CALCITE-2699
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.17.0, 1.18.0
>Reporter: xuqianjin
>Assignee: Julian Hyde
>Priority: Major
>
> Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is 
> executed:
>  # The return result can only be of {{TimeStamp}} type and is expected to be 
> of {{Time}} type
>  # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
> {{01:01:00}}
>  # Compared with {{mysql}} database, I think it should meet the following 
> conditions:
> ||expression||Expect the result||
> |timestampadd(MINUTE, -1, time '00:00:00')|-00:01:00|
> |timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
> |timestampadd(MINUTE, 1, time '23:59:59')| 24:00:59|
> |timestampadd(SECOND, 1, time '23:59:59')|24:00:00|
> |timestampadd(HOUR, 1, time '23:59:59')|24:59:59|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CALCITE-2699) The bug of timestampadd handles time

2018-11-23 Thread xuqianjin (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xuqianjin updated CALCITE-2699:
---
Description: 
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # Compared with {{mysql}} database, I think it should meet the following 
conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|-00:01:00|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|00:59:59|

  was:
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # Compared with {{mysql}} database, I think it should meet the following 
conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|NULL|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|00:59:59|


> The bug of timestampadd  handles time
> -
>
> Key: CALCITE-2699
> URL: https://issues.apache.org/jira/browse/CALCITE-2699
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.17.0, 1.18.0
>Reporter: xuqianjin
>Assignee: Julian Hyde
>Priority: Major
>
> Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is 
> executed:
>  # The return result can only be of {{TimeStamp}} type and is expected to be 
> of {{Time}} type
>  # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
> {{01:01:00}}
>  # Compared with {{mysql}} database, I think it should meet the following 
> conditions:
> ||expression||Expect the result||
> |timestampadd(MINUTE, -1, time '00:00:00')|-00:01:00|
> |timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
> |timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
> |timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
> |timestampadd(HOUR, 1, time '23:59:59')|00:59:59|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CALCITE-2699) The bug of timestampadd handles time

2018-11-22 Thread xuqianjin (JIRA)


 [ 
https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

xuqianjin updated CALCITE-2699:
---
Description: 
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type
 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}
 # Compared with {{mysql}} database, I think it should meet the following 
conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|NULL|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|00:59:59|

  was:
Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is executed:
 # The return result can only be of {{TimeStamp}} type and is expected to be of 
{{Time}} type

 # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
{{01:01:00}}

 # Compared with {{mysql}} database, I think it should meet the following 
conditions:

||expression||Expect the result||
|timestampadd(MINUTE, -1, time '00:00:00')|NULL|
|timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
|timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
|timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
|timestampadd(HOUR, 1, time '23:59:59')|00:59:59|


> The bug of timestampadd  handles time
> -
>
> Key: CALCITE-2699
> URL: https://issues.apache.org/jira/browse/CALCITE-2699
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.17.0, 1.18.0
>Reporter: xuqianjin
>Assignee: Julian Hyde
>Priority: Major
>
> Two errors occur when {{timestampadd(MINUTE, 1, time '01:00:00')}} is 
> executed:
>  # The return result can only be of {{TimeStamp}} type and is expected to be 
> of {{Time}} type
>  # The return value is {{1970-01-01 01:01:00}}, and the expectation is 
> {{01:01:00}}
>  # Compared with {{mysql}} database, I think it should meet the following 
> conditions:
> ||expression||Expect the result||
> |timestampadd(MINUTE, -1, time '00:00:00')|NULL|
> |timestampadd(MINUTE, 1, time '00:00:00')|00:01:00|
> |timestampadd(MINUTE, 1, time '23:59:59')|00:00:59|
> |timestampadd(SECOND, 1, time '23:59:59')|00:00:00|
> |timestampadd(HOUR, 1, time '23:59:59')|00:59:59|



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)