Skip to content

branch-4.1: [fix](fe) Detect Doris-compatible MySQL JDBC targets #64389#64473

Open
suxiaogang223 wants to merge 1 commit into
branch-4.1from
pick-64389-branch-4.1
Open

branch-4.1: [fix](fe) Detect Doris-compatible MySQL JDBC targets #64389#64473
suxiaogang223 wants to merge 1 commit into
branch-4.1from
pick-64389-branch-4.1

Conversation

@suxiaogang223

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: None

Related PR: #64389

Problem Summary: Pick #64389 to branch-4.1. JDBC catalog initializes the MySQL client as a plain MySQL-compatible target unless the remote version_comment contains the word Doris. Doris-compatible deployments can expose version comments such as SelectDB, VeloDB, or enterprise cloud strings, so Doris-specific column type overrides are skipped. As a result, Doris complex types reported through MySQL metadata can be mapped as scalar MySQL types and fail during scan. This pick recognizes Doris-compatible version comments and keeps using the existing SHOW FULL COLUMNS based type override path.

Note: branch-4.1 does not have the newer fe-connector-jdbc module from master, so this manual pick keeps only the existing fe-core JDBC client and unit test changes.

Release note

Fix JDBC catalog type mapping for Doris-compatible MySQL endpoints whose version_comment does not contain Doris.

Check List (For Author)

  • Test: Unit Test
    • ./run-fe-ut.sh org.apache.doris.datasource.jdbc.client.JdbcMySQLClientTest
  • Behavior changed: Yes. JDBC MySQL catalog now treats SelectDB, VeloDB, and enterprise cloud version comments as Doris-compatible for column type mapping.
  • Does this need documentation: No

Issue Number: None

Related PR: None

Problem Summary: JDBC catalog initializes the MySQL client as a plain MySQL-compatible target unless the remote version_comment contains the word Doris. Doris-compatible deployments can expose version comments such as SelectDB, VeloDB, or enterprise cloud strings, so Doris-specific column type overrides are skipped. As a result, Doris complex types reported through MySQL metadata can be mapped as scalar MySQL types and fail during scan. This change recognizes Doris-compatible version comments in both the FE core JDBC client and the connector-jdbc MySQL client, keeping the existing SHOW FULL COLUMNS based type override path enabled for compatible endpoints.

Fix JDBC catalog type mapping for Doris-compatible MySQL endpoints whose version_comment does not contain Doris.

- Test: Unit Test
    - ./run-fe-ut.sh --run org.apache.doris.datasource.jdbc.client.JdbcMySQLClientTest
    - mvn -pl fe-connector/fe-connector-jdbc -am -Dtest=org.apache.doris.connector.jdbc.client.JdbcMySQLConnectorClientTest -DfailIfNoTests=false test
- Behavior changed: Yes. JDBC MySQL catalog now treats SelectDB, VeloDB, and enterprise cloud version comments as Doris-compatible for column type mapping.
- Does this need documentation: No

(cherry picked from commit 6411c70)
@suxiaogang223 suxiaogang223 requested a review from yiguolei as a code owner June 12, 2026 14:41
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@suxiaogang223

Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 22.22% (2/9) 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants