apache / doris-flink-connector

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

Fix a mismatch between the type of jdbc query result and the datatype #509

Closed Zhumengze closed 1 week ago

Zhumengze commented 2 weeks ago

Proposed changes

Issue Number: close #xxx

Problem Summary:

The value type obtained by rs.getObject(index + 1) is inconsistent with the field type obtained by flink Context, resulting in a conversion failure in encapsulating flink RowData. For example, the java type corresponding to TINYINT is Java.lang. Byte, while the java type obtained by rs.getObject(index + 1) is Java.lang. Integer, which has a type conversion problem. SMALLINT had the same problem.

Checklist(Required)

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

Thank you for your contribution. Could you add some test cases for this PR?

Zhumengze commented 1 week ago

@JNSimba No problem,I will submit a new pr later.

Zhumengze commented 1 week ago

Thank you for your contribution. Could you add some test cases for this PR? @JNSimba I submitted a new PR and added some test cases,For more information please see #512