[jira] [Comment Edited] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16757200#comment-16757200 ] xuqianjin edited comment on CALCITE-2791 at 1/31/19 12:57 PM: -- hi [~zhztheplayer] Some discussions about the adding of MySQL JSON functions in the dev list. I think it's a great idea. We can start talking about this. best qianjin was (Author: x1q1j1): hi [~zhztheplayer] Some discussions about the adding of MySQL JSON functions in the dev list. We can start talking about this. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16757200#comment-16757200 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] Some discussions about the adding of MySQL JSON functions in the dev list. We can start talking about this. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16757196#comment-16757196 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] I have modified this PR, can you take a look at it sometime? Thank you very much. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16756821#comment-16756821 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] I have modified this PR, can you take a look at it sometime? Thank you very much. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16754713#comment-16754713 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] Ok, I can understand. I am looking forward to your review. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16754601#comment-16754601 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] I have modified this PR. Can you spare some time to review it.thank you very much. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuqianjin updated CALCITE-2791: --- Description: The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types in json can be diverse, so when you compare different types, you have a priority, and the high priority is greater than the low priority (you can view the types with the JSON_TYPE() function). The priorities are as follows: BOOLEAN ARRAY OBJECT STRING INTEGER DOUBLE NULL was: The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types in json can be diverse, so when you compare different types, you have a priority, and the high priority is greater than the low priority (you can view the types with the JSON_TYPE() function). The priorities are as follows: BOOLEAN ARRAY OBJECT STRING INTEGER LONG DOUBLE NULL > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16753329#comment-16753329 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] I hope you can spare your precious time to help me review, thank you very much. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16753281#comment-16753281 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] I really appreciate your review. Thank you very much。 best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16753274#comment-16753274 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] Which multi-parameter is really a problem, do you think this JSON_TYPE function can be implemented against mysql? If so, I can continue to modify this pr. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Issue Comment Deleted] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuqianjin updated CALCITE-2791: --- Comment: was deleted (was: hi [~zhztheplayer] I've turned off the PR. best qianijn) > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16753265#comment-16753265 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] I've turned off the PR. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16753255#comment-16753255 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] I've turned off the PR. best qianijn > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16753253#comment-16753253 ] xuqianjin edited comment on CALCITE-2791 at 1/27/19 3:22 AM: - hi [~zhztheplayer] Thank you very much for your suggestion. The reason why I want to extend the json function is that flink does not support dialect functions like mysql. I refer to the json function of mysql to add a set of available json functions to calcite. Because I'm not familiar with json, I saw your implementation do some work on its own. Please correct me if there is anything wrong. Thanks again. best qianjin was (Author: x1q1j1): hi [~zhztheplayer] Thank you very much for your suggestion. The reason why I want to extend the json function is that flink does not support dialect functions like mysql. I want to add a list of available json functions to calcite against the mysql json function. Because I'm not familiar with json, I saw your implementation do some work on its own. Please correct me if there is anything wrong. Thanks again. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16753253#comment-16753253 ] xuqianjin edited comment on CALCITE-2791 at 1/27/19 3:19 AM: - hi [~zhztheplayer] Thank you very much for your suggestion. The reason why I want to extend the json function is that flink does not support dialect functions like mysql. I want to add a list of available json functions to calcite against the mysql json function. Because I'm not familiar with json, I saw your implementation do some work on its own. Please correct me if there is anything wrong. Thanks again. best qianjin was (Author: x1q1j1): hi [~zhztheplayer] Thank you very much for your suggestion. The reason why I want to extend the json function is that flink does not support dialect functions like mysql. I want to add a list of available json functions to calcite against the mysql json function. Because I'm not familiar with json, I saw your implementation do some work on its own. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16753253#comment-16753253 ] xuqianjin commented on CALCITE-2791: hi [~zhztheplayer] Thank you very much for your suggestion. The reason why I want to extend the json function is that flink does not support dialect functions like mysql. I want to add a list of available json functions to calcite against the mysql json function. Because I'm not familiar with json, I saw your implementation do some work on its own. best qianjin > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2810) Add the JSON_LENGTH function
[ https://issues.apache.org/jira/browse/CALCITE-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuqianjin updated CALCITE-2810: --- Description: {{JSON_LENGTH(*json_doc*[, *path*])}} Returns the length of a JSON document, or, if a _path_ argument is given, the length of the value within the document identified by the path. Returns {{NULL}} if any argument is {{NULL}} or the _path_ argument does not identify a value in the document. An error occurs if the _json_doc_ argument is not a valid JSON document or the _path_ argument is not a valid path expression or contains a {*} or {{}}*{{*}} wildcard. The length of a document is determined as follows: * The length of a scalar is 1. * The length of an array is the number of array elements. * The length of an object is the number of object members. * The length does not count the length of nested arrays or objects. Examples are as follows: SELECT JSON_LENGTH('[1, 2, \\{"a": 3}]'); | 3| SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}'); | 2| SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b'); | 1| was: {{JSON_LENGTH(*json_doc*[, *path*\])}} Returns the length of a JSON document, or, if a _path_ argument is given, the length of the value within the document identified by the path. Returns {{NULL}} if any argument is {{NULL}} or the _path_ argument does not identify a value in the document. An error occurs if the _json_doc_ argument is not a valid JSON document or the _path_ argument is not a valid path expression or contains a {{*}} or {{**}} wildcard. The length of a document is determined as follows: * The length of a scalar is 1. * The length of an array is the number of array elements. * The length of an object is the number of object members. * The length does not count the length of nested arrays or objects. SELECT JSON_LENGTH('[1, 2, \{"a": 3}]'); +-+ | JSON_LENGTH('[1, 2, \{"a": 3}]') | +-+ | 3 | +-+ SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}'); +-+ | JSON_LENGTH('\{"a": 1, "b": {"c": 30}}') | +-+ | 2 | +-+ SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b'); ++ | JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b') | ++ | 1 | ++ > Add the JSON_LENGTH function > > > Key: CALCITE-2810 > URL: https://issues.apache.org/jira/browse/CALCITE-2810 > Project: Calcite > Issue Type: Improvement >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > > {{JSON_LENGTH(*json_doc*[, *path*])}} > Returns the length of a JSON document, or, if a _path_ argument is given, the > length of the value within the document identified by the path. Returns > {{NULL}} if any argument is {{NULL}} or the _path_ argument does not identify > a value in the document. An error occurs if the _json_doc_ argument is not a > valid JSON document or the _path_ argument is not a valid path expression or > contains a {*} or {{}}*{{*}} wildcard. > The length of a document is determined as follows: > * The length of a scalar is 1. > * The length of an array is the number of array elements. > * The length of an object is the number of object members. > * The length does not count the length of nested arrays or objects. > Examples are as follows: > SELECT JSON_LENGTH('[1, 2, \\{"a": 3}]'); > | 3| > SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}'); > | 2| > SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b'); > | 1| -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2810) Add the JSON_LENGTH function
[ https://issues.apache.org/jira/browse/CALCITE-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuqianjin updated CALCITE-2810: --- Description: {{JSON_LENGTH(*json_doc*[, *path*])}} Returns the length of a JSON document, or, if a _path_ argument is given, the length of the value within the document identified by the path. Returns {{NULL}} if any argument is {{NULL}} or the _path_ argument does not identify a value in the document. An error occurs if the _json_doc_ argument is not a valid JSON document or the _path_ argument is not a valid path expression or contains a {*} or {{**}} wildcard. The length of a document is determined as follows: * The length of a scalar is 1. * The length of an array is the number of array elements. * The length of an object is the number of object members. * The length does not count the length of nested arrays or objects. Examples are as follows: SELECT JSON_LENGTH('[1, 2, \{"a": 3}]'); | 3| SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}'); | 2| SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b'); | 1| was: {{JSON_LENGTH(*json_doc*[, *path*])}} Returns the length of a JSON document, or, if a _path_ argument is given, the length of the value within the document identified by the path. Returns {{NULL}} if any argument is {{NULL}} or the _path_ argument does not identify a value in the document. An error occurs if the _json_doc_ argument is not a valid JSON document or the _path_ argument is not a valid path expression or contains a {*} or {{}}*{{*}} wildcard. The length of a document is determined as follows: * The length of a scalar is 1. * The length of an array is the number of array elements. * The length of an object is the number of object members. * The length does not count the length of nested arrays or objects. Examples are as follows: SELECT JSON_LENGTH('[1, 2, \\{"a": 3}]'); | 3| SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}'); | 2| SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b'); | 1| > Add the JSON_LENGTH function > > > Key: CALCITE-2810 > URL: https://issues.apache.org/jira/browse/CALCITE-2810 > Project: Calcite > Issue Type: Improvement >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > > {{JSON_LENGTH(*json_doc*[, *path*])}} > Returns the length of a JSON document, or, if a _path_ argument is given, the > length of the value within the document identified by the path. Returns > {{NULL}} if any argument is {{NULL}} or the _path_ argument does not identify > a value in the document. An error occurs if the _json_doc_ argument is not a > valid JSON document or the _path_ argument is not a valid path expression or > contains a {*} or {{**}} wildcard. > The length of a document is determined as follows: > * The length of a scalar is 1. > * The length of an array is the number of array elements. > * The length of an object is the number of object members. > * The length does not count the length of nested arrays or objects. > Examples are as follows: > SELECT JSON_LENGTH('[1, 2, \{"a": 3}]'); > | 3| > SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}'); > | 2| > SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b'); > | 1| -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (CALCITE-2810) Add the JSON_LENGTH function
xuqianjin created CALCITE-2810: -- Summary: Add the JSON_LENGTH function Key: CALCITE-2810 URL: https://issues.apache.org/jira/browse/CALCITE-2810 Project: Calcite Issue Type: Improvement Reporter: xuqianjin Assignee: Julian Hyde {{JSON_LENGTH(*json_doc*[, *path*\])}} Returns the length of a JSON document, or, if a _path_ argument is given, the length of the value within the document identified by the path. Returns {{NULL}} if any argument is {{NULL}} or the _path_ argument does not identify a value in the document. An error occurs if the _json_doc_ argument is not a valid JSON document or the _path_ argument is not a valid path expression or contains a {{*}} or {{**}} wildcard. The length of a document is determined as follows: * The length of a scalar is 1. * The length of an array is the number of array elements. * The length of an object is the number of object members. * The length does not count the length of nested arrays or objects. SELECT JSON_LENGTH('[1, 2, \{"a": 3}]'); +-+ | JSON_LENGTH('[1, 2, \{"a": 3}]') | +-+ | 3 | +-+ SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}'); +-+ | JSON_LENGTH('\{"a": 1, "b": {"c": 30}}') | +-+ | 2 | +-+ SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b'); ++ | JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b') | ++ | 1 | ++ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (CALCITE-2809) Add JSON_LENGTH function
xuqianjin created CALCITE-2809: -- Summary: Add JSON_LENGTH function Key: CALCITE-2809 URL: https://issues.apache.org/jira/browse/CALCITE-2809 Project: Calcite Issue Type: Improvement Reporter: xuqianjin Assignee: Julian Hyde {{JSON_LENGTH(*json_doc*[, *path*\])}} Returns the length of a JSON document, or, if a _path_ argument is given, the length of the value within the document identified by the path. Returns {{NULL}} if any argument is {{NULL}} or the _path_ argument does not identify a value in the document. An error occurs if the _json_doc_ argument is not a valid JSON document or the _path_ argument is not a valid path expression or contains a {{*}} or {{**}} wildcard. The length of a document is determined as follows: * The length of a scalar is 1. * The length of an array is the number of array elements. * The length of an object is the number of object members. * The length does not count the length of nested arrays or objects. SELECT JSON_LENGTH('[1, 2, \{"a": 3}]'); +-+ | JSON_LENGTH('[1, 2, \{"a": 3}]') | +-+ | 3 | +-+ SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}'); +-+ | JSON_LENGTH('\{"a": 1, "b": {"c": 30}}') | +-+ | 2 | +-+ SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b'); ++ | JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b') | ++ | 1 | ++ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (CALCITE-2808) Add the JSON_LENGTH function
xuqianjin created CALCITE-2808: -- Summary: Add the JSON_LENGTH function Key: CALCITE-2808 URL: https://issues.apache.org/jira/browse/CALCITE-2808 Project: Calcite Issue Type: Improvement Reporter: xuqianjin Assignee: Julian Hyde {{JSON_LENGTH(*json_doc*[, *path*])}} Returns the length of a JSON document, or, if a _path_ argument is given, the length of the value within the document identified by the path. Returns {{NULL}} if any argument is {{NULL}} or the _path_ argument does not identify a value in the document. An error occurs if the _json_doc_ argument is not a valid JSON document or the _path_ argument is not a valid path expression or contains a {*} or {{}}*{{*}} wildcard. The length of a document is determined as follows: * The length of a scalar is 1. * The length of an array is the number of array elements. * The length of an object is the number of object members. * The length does not count the length of nested arrays or objects. SELECT JSON_LENGTH('[1, 2, \\{"a": 3}]'); +-+ |JSON_LENGTH('[1, 2, \\{"a": 3}]')| +-+ | 3| +-+ SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}'); +-+ |JSON_LENGTH('\{"a": 1, "b": {"c": 30}}')| +-+ | 2| +-+ SELECT JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b'); ++ |JSON_LENGTH('\{"a": 1, "b": {"c": 30}}', '$.b')| ++ | 1| ++ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuqianjin updated CALCITE-2791: --- Labels: https://github.com/apache/calcite/pull/1013 (was: ) > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuqianjin updated CALCITE-2791: --- Component/s: core > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement > Components: core >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > Labels: https://github.com/apache/calcite/pull/1013 > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuqianjin updated CALCITE-2791: --- Description: The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types in json can be diverse, so when you compare different types, you have a priority, and the high priority is greater than the low priority (you can view the types with the JSON_TYPE() function). The priorities are as follows: BLOB BIT OPAQUE DATETIME TIME DATE BOOLEAN ARRAY OBJECT STRING INTEGER, DOUBLE NULL was: The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types in json can be diverse, so when you compare different types, you have a priority, and the high priority is greater than the low priority (you can view the types with the JSON_TYPE() function). The priorities are as follows: BLOB BIT OPAQUE DATETIME TIME DATE BOOLEAN ARRAY OBJECT STRING INTEGER, DOUBLE NULL > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BLOB > BIT > OPAQUE > DATETIME > TIME > DATE > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER, > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuqianjin updated CALCITE-2791: --- Description: The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types in json can be diverse, so when you compare different types, you have a priority, and the high priority is greater than the low priority (you can view the types with the JSON_TYPE() function). The priorities are as follows: BOOLEAN ARRAY OBJECT STRING INTEGER LONG DOUBLE NULL was: The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types in json can be diverse, so when you compare different types, you have a priority, and the high priority is greater than the low priority (you can view the types with the JSON_TYPE() function). The priorities are as follows: BOOLEAN ARRAY OBJECT STRING INTEGER, DOUBLE NULL > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER > LONG > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-2791) Add the JSON_TYPE function
[ https://issues.apache.org/jira/browse/CALCITE-2791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuqianjin updated CALCITE-2791: --- Description: The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types in json can be diverse, so when you compare different types, you have a priority, and the high priority is greater than the low priority (you can view the types with the JSON_TYPE() function). The priorities are as follows: BOOLEAN ARRAY OBJECT STRING INTEGER, DOUBLE NULL was: The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types in json can be diverse, so when you compare different types, you have a priority, and the high priority is greater than the low priority (you can view the types with the JSON_TYPE() function). The priorities are as follows: BLOB BIT OPAQUE DATETIME TIME DATE BOOLEAN ARRAY OBJECT STRING INTEGER, DOUBLE NULL > Add the JSON_TYPE function > -- > > Key: CALCITE-2791 > URL: https://issues.apache.org/jira/browse/CALCITE-2791 > Project: Calcite > Issue Type: Improvement >Reporter: xuqianjin >Assignee: Julian Hyde >Priority: Major > > The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types > in json can be diverse, so when you compare different types, you have a > priority, and the high priority is greater than the low priority (you can > view the types with the JSON_TYPE() function). The priorities are as follows: > BOOLEAN > ARRAY > OBJECT > STRING > INTEGER, > DOUBLE > NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (CALCITE-2791) Add the JSON_TYPE function
xuqianjin created CALCITE-2791: -- Summary: Add the JSON_TYPE function Key: CALCITE-2791 URL: https://issues.apache.org/jira/browse/CALCITE-2791 Project: Calcite Issue Type: Improvement Reporter: xuqianjin Assignee: Julian Hyde The data in json can be =, <, <=, >, >=, <>,! =, and <=>. But the data types in json can be diverse, so when you compare different types, you have a priority, and the high priority is greater than the low priority (you can view the types with the JSON_TYPE() function). The priorities are as follows: BLOB BIT OPAQUE DATETIME TIME DATE BOOLEAN ARRAY OBJECT STRING INTEGER, DOUBLE NULL -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (CALCITE-2699) The bug of timestampadd handles time
[ https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] xuqianjin resolved CALCITE-2699. Resolution: Fixed > 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.18.0, 1.17.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
[ 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
[ 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] [Comment Edited] (CALCITE-2699) The bug of timestampadd handles time
[ https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697317#comment-16697317 ] xuqianjin edited comment on CALCITE-2699 at 11/23/18 4:43 PM: -- [~julianhyde] [~vlsi] I have submitted PR. Can you give me this isuse permission to add PR links https://github.com/apache/calcite/pull/936 was (Author: x1q1j1): [~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] [Comment Edited] (CALCITE-2699) The bug of timestampadd handles time
[ https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697130#comment-16697130 ] xuqianjin edited comment on CALCITE-2699 at 11/23/18 4:24 PM: -- [~kgyrtkirk] Thank you very much. Your conclusion is correct. Null is due to my mysql connection to the client.I've changed it was (Author: x1q1j1): [~kgyrtkirk] Thank you very much. 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}} > # 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
[ 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] [Updated] (CALCITE-2699) The bug of timestampadd handles time
[ 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
[ 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
[ 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
[ 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
[ 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
[ 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
[ 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] [Comment Edited] (CALCITE-2699) The bug of timestampadd handles time
[ https://issues.apache.org/jira/browse/CALCITE-2699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697130#comment-16697130 ] xuqianjin edited comment on CALCITE-2699 at 11/23/18 1:28 PM: -- [~kgyrtkirk] Thank you very much. Your conclusion is correct. Null is due to my mysql connection to the client.I've changed it was (Author: x1q1j1): [~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')|-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] [Commented] (CALCITE-2699) The bug of timestampadd handles time
[ 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
[ 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
[ 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] [Updated] (CALCITE-2699) The bug of timestampadd handles time
[ 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)
[jira] [Commented] (CALCITE-2699) The bug of timestampadd handles time
[ 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)
[jira] [Created] (CALCITE-2699) The bug of timestampadd handles time
xuqianjin created CALCITE-2699: -- Summary: 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 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)