doris-flink-connector icon indicating copy to clipboard operation
doris-flink-connector copied to clipboard

[fix] Fix the bug that the `DorisTypeMapper` datetime type will lose precision when converted to flink type

Open huyuanfeng2018 opened this issue 9 months ago • 4 comments

Proposed changes

Issue Number: close #378

Problem Summary:

#378

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

huyuanfeng2018 avatar May 07 '24 03:05 huyuanfeng2018

Did you create the table through catalog?

JNSimba avatar May 07 '24 06:05 JNSimba

Did you create the table through catalog?

no, it was not created through flink doris catalog

huyuanfeng2018 avatar May 07 '24 06:05 huyuanfeng2018

How was that triggered? In theory, the catalog will reach this point

JNSimba avatar May 07 '24 13:05 JNSimba

How was that triggered? In theory, the catalog will reach this point

Then the doris table is created through the doris command and then written through flink image As shown in the figure, the stime field is at the millisecond level. I write it through flink.

USE CATALOG doris;
insert into doris.db,table xxx

The DorisCatalog#getTable method will return the mapping of the doris table to the flink table. The precision is not considered when processing the datetime type.

image

huyuanfeng2018 avatar May 08 '24 07:05 huyuanfeng2018