Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-03-23 Thread Jark Wu
;>> > An implementation note. I think we should aim to base the >>>> implementation >>>> > on the DataTypes already rather than going back to the >>>> TypeInformation. >>>> > >>>> > I would still try to le

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-26 Thread Jingsong Li
QL >>> standard. >>> >> The problem is that JsonRowDeserializationSchema only support >>> RFC-3339. >>> >> On the other hand, CsvRowDeserializationSchema supports to parse >>> >> "2019-07-09 02:02:00.040". >>> >&

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-26 Thread Jark Wu
f the >> > standard as it makes time types unambiguous. >> > >> > What do you think? >> > >> > Ps. I cross posted this on the dev ML. >> > >> > Best, >> > >> > Dawid >> > >> > >> > On 26/02/

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-26 Thread Jingsong Li
awid > > > > > > On 26/02/2020 03:45, Jark Wu wrote: > > > > Yes, I'm also in favor of loosen the datetime format constraint. > > I guess most of the users don't know there is a JSON standard which > > follows RFC 3339. > > > > Best, > &

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-26 Thread Jark Wu
port “loosen it for usability”. If not, may add some explanation >> about JSON. >> >> >> >> Original Message >> *Sender:* Jark Wu >> *Recipient:* Outlook; Dawid Wysakowicz< >> dwysakow...@apache.org> >> *Cc:* godfrey he; Leonard

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-26 Thread Dawid Wysakowicz
.@outlook.com>>; Dawid > Wysakowiczmailto:dwysakow...@apache.org>> > *Cc:* godfrey he <mailto:godfre...@gmail.com>>; Leonard Xu <mailto:xbjt...@gmail.com>>; user <mailto:user@flink.apache.org>> > *Date:* Wednesday, Feb 26, 2020 09

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-25 Thread Jark Wu
ntics are closer to {@link java.time.LocalTime}. A time WITH time >> zone is not provided. >> * >> * @see #TIME(int) >> * @see TimeType >> */ >> public static DataType TIME() { >> return new AtomicDataType(new TimeType()); >> >> }``` >> >&

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-25 Thread NiYanchun
Subject: Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API Hi Outlook, The explanation in DataTypes is correct, it is compliant to SQL standard. The problem is that JsonRowDeserializationSchema only support RFC-3339. On the other hand, CsvRowDeserializationSchema supports to parse "2019-

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-25 Thread Jark Wu
> > > Thanks again. > > Original Message > *Sender:* Leonard Xu > *Recipient:* godfrey he > *Cc:* Outlook; user > *Date:* Tuesday, Feb 25, 2020 22:56 > *Subject:* Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API > > Hi,Outlook > Godfrey is righ

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-25 Thread Outlook
again. Original Message Sender: Leonard Xu Recipient: godfrey he Cc: Outlook; user Date: Tuesday, Feb 25, 2020 22:56 Subject: Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API Hi,Outlook Godfrey is right, you should follow the json format[1] when you parse your json message. You can use foll

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-25 Thread Leonard Xu
ecipient: usermailto:user@flink.apache.org>> > Date: Tuesday, Feb 25, 2020 17:43 > Subject: TIME/TIMESTAMP parse in Flink TABLE/SQL API > > Hi all, > > I read json data from kafka, and print to console. When I do this, some error > occurs when time/timestamp deserialization

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-25 Thread godfrey he
my flink version is 1.10.0. > > Original Message > *Sender:* Outlook > *Recipient:* user > *Date:* Tuesday, Feb 25, 2020 17:43 > *Subject:* TIME/TIMESTAMP parse in Flink TABLE/SQL API > > Hi all, > > I read json data from kafka, and print to console. When I do th

Re: TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-25 Thread Outlook
By the way, my flink version is 1.10.0. Original Message Sender: Outlook Recipient: user Date: Tuesday, Feb 25, 2020 17:43 Subject: TIME/TIMESTAMP parse in Flink TABLE/SQL API Hi all, I read json data from kafka, and print to console. When I do this, some error occurs when time/timestamp

TIME/TIMESTAMP parse in Flink TABLE/SQL API

2020-02-25 Thread Outlook
Hi all, I read json data from kafka, and print to console. When I do this, some error occurs when time/timestamp deserialization. json data in Kafka: ``` { "server_date": "2019-07-09", "server_time": "14:02:00", "reqsndtime_c": "2019-07-09 02:02:00.040" } ``` flink code: ``` bsTableEnv.c