apache / doris-flink-connector

Flink Connector for Apache Doris
https://doris.apache.org/
Apache License 2.0
292 stars 201 forks source link

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

Closed huyuanfeng2018 closed 1 month ago

huyuanfeng2018 commented 2 months ago

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 dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

JNSimba commented 2 months ago

Did you create the table through catalog?

huyuanfeng2018 commented 2 months ago

Did you create the table through catalog?

no, it was not created through flink doris catalog

JNSimba commented 2 months ago

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

huyuanfeng2018 commented 2 months ago

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