[jira] [Commented] (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:comment-tabpanel=16697317#comment-16697317
 ] 

xuqianjin commented on CALCITE-2699:


[~julianhyde] [~vlsi] I have submitted PR. Can you give me this isuse 
permission to add PR links

> 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] [Commented] (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:comment-tabpanel=16697130#comment-16697130
 ] 

xuqianjin commented on CALCITE-2699:


[~kgyrtkirk] Your conclusion is correct. Null is due to my mysql connection to 
the client.I've changed it

> 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)


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

2018-11-23 Thread Zoltan Haindrich (JIRA)


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

Zoltan Haindrich commented on CALCITE-2699:
---

I've just checked {{10.1.26-MariaDB-0+deb9u1}}
{code}
> select timestampadd(MINUTE, -1, time '00:00:00');
-00:01:00
1 row in set (0.00 sec)
{code}
so I think even mysql don't return null in this case...sorry I don't 
follow...why would it make sense?

> 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)


[jira] [Commented] (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:comment-tabpanel=16696602#comment-16696602
 ] 

xuqianjin commented on CALCITE-2699:


[~kgyrtkirk] Yes, that's right. I think it makes sense to return null

> 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)


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

2018-11-23 Thread Zoltan Haindrich (JIRA)


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

Zoltan Haindrich commented on CALCITE-2699:
---

I think for {{timestampadd(MINUTE, -1, time '00:00:00')}}: NULL would be an 
unexpected result

> 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)


[jira] [Commented] (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:comment-tabpanel=16696474#comment-16696474
 ] 

xuqianjin commented on CALCITE-2699:


I want to try to fix it

> 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)


[jira] [Commented] (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:comment-tabpanel=16696448#comment-16696448
 ] 

xuqianjin commented on CALCITE-2699:


I want to try and fix this

> 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)