You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "xiaojin.wy (Jira)" <ji...@apache.org> on 2019/12/18 08:40:00 UTC

[jira] [Updated] (FLINK-15310) A timestamp result get by a select sql and a csvsink sql is different

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

xiaojin.wy updated FLINK-15310:
-------------------------------
    Description: 
*The sql is:*
CREATE TABLE `orders` (
	rowtime TIMESTAMP,
	id  INT,
	product VARCHAR,
	units INT
) WITH (
	'format.field-delimiter'='|',
	'connector.type'='filesystem',
	'format.derive-schema'='true',
	'connector.path'='/defender_test_data/daily_regression_blink_sql_1.10/test_agg/sources/orders.csv',
	'format.type'='csv'
);
select floor(rowtime to hour) as rowtime, count(*) as c from orders group by floor(rowtime to hour)


The result got in a sqlClient environment which use the sql above is like this:
 !image-2019-12-18-16-33-24-510.png! 

But the same sql write directly to a cvs batch sink will get a result like this:
1972-03-06 08:44:36.736|4
1972-03-06 08:44:36.736|1



  was:
*The sql is:*
CREATE TABLE `orders` (
	rowtime TIMESTAMP,
	id  INT,
	product VARCHAR,
	units INT
) WITH (
	'format.field-delimiter'='|',
	'connector.type'='filesystem',
	'format.derive-schema'='true',
	'connector.path'='/defender_test_data/daily_regression_blink_sql_1.10/test_agg/sources/orders.csv',
	'format.type'='csv'
);
select floor(rowtime to hour) as rowtime, count(*) as c from orders group by floor(rowtime to hour)


The result got in a sqlClient environment which use the sql above:
 !image-2019-12-18-16-33-24-510.png! 

But the same sql write directly to a cvs batch sink will get a result like this:
1972-03-06 08:44:36.736|4
1972-03-06 08:44:36.736|1




> A timestamp result get by a select sql and a csvsink sql is different
> ---------------------------------------------------------------------
>
>                 Key: FLINK-15310
>                 URL: https://issues.apache.org/jira/browse/FLINK-15310
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Client
>    Affects Versions: 1.10.0
>         Environment: execution:
>   planner: blink
>   type: batch
>            Reporter: xiaojin.wy
>            Priority: Major
>         Attachments: image-2019-12-18-16-33-24-510.png
>
>
> *The sql is:*
> CREATE TABLE `orders` (
> 	rowtime TIMESTAMP,
> 	id  INT,
> 	product VARCHAR,
> 	units INT
> ) WITH (
> 	'format.field-delimiter'='|',
> 	'connector.type'='filesystem',
> 	'format.derive-schema'='true',
> 	'connector.path'='/defender_test_data/daily_regression_blink_sql_1.10/test_agg/sources/orders.csv',
> 	'format.type'='csv'
> );
> select floor(rowtime to hour) as rowtime, count(*) as c from orders group by floor(rowtime to hour)
> The result got in a sqlClient environment which use the sql above is like this:
>  !image-2019-12-18-16-33-24-510.png! 
> But the same sql write directly to a cvs batch sink will get a result like this:
> 1972-03-06 08:44:36.736|4
> 1972-03-06 08:44:36.736|1



--
This message was sent by Atlassian Jira
(v8.3.4#803005)