[jira] [Created] (FLINK-6851) Improve built-in scalar function when upgrade calcite version to 1.13

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Created] (FLINK-6851) Improve built-in scalar function when upgrade calcite version to 1.13

JIRA jira@apache.org
sunjincheng created FLINK-6851:
----------------------------------

             Summary: Improve built-in scalar function when upgrade calcite version to 1.13
                 Key: FLINK-6851
                 URL: https://issues.apache.org/jira/browse/FLINK-6851
             Project: Flink
          Issue Type: Improvement
          Components: Table API & SQL
            Reporter: sunjincheng
            Assignee: sunjincheng


I found that the difference between calcite 1.12 and calcite master affects the semantics of the build-in scalar function, for example:
The SQL:
{code}
select
timestampadd(MONTH, 1,  date '2016-05-31'),
timestampadd(MONTH, 5,  date '2016-01-31'),
timestampadd(MONTH, -1, date '2016-03-31') from depts;
{code}
Calcite 1.12 Result:
{code}
+--------+--------+--------+
| EXPR$0 | EXPR$1 | EXPR$2 |
+--------+--------+--------+
| 2016-07-01 | 2016-07-01 | 2016-03-01 |
+--------+--------+--------+
3 rows selected (1.06 seconds)
{code}
Calcite Master result:
{code}
+--------+--------+--------+
| EXPR$0 | EXPR$1 | EXPR$2 |
+--------+--------+--------+
| 2016-06-30 | 2016-06-30 | 2016-02-29 |
+--------+--------+--------+
3 rows selected (1.047 seconds)
{code}
The MSSQL result:
{code}
select
  dateadd(MONTH, 1, '2016-05-31'),
  dateadd(MONTH, 5, '2016-01-31'),
  dateadd(MONTH, -1,'2016-03-31') from pvt;
2016-06-30 00:00:00 2016-06-30 00:00:00 2016-02-29 00:00:00
{code}
So, when we flink upgrade the calcite version to 1.13. we can open some useful feature. e.g: {{TIMESTAMPADD(SqlTypeFamily.ANY, SqlTypeFamily.INTEGER, SqlTypeFamily.DATE)}}.

So, In this JIRA. will create some subtask to improve flink according to calcite 1.13.
I appreciated if you can give me some feedback?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
Loading...