[fix](jdbc) Map SQL Server user-defined alias types via JDBC DATA_TYPE - #67903
Open
arimu1 wants to merge 1 commit into
Open
[fix](jdbc) Map SQL Server user-defined alias types via JDBC DATA_TYPE#67903arimu1 wants to merge 1 commit into
arimu1 wants to merge 1 commit into
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
When mssql-jdbc reports a user-defined alias TYPE_NAME, fall back to standard java.sql.Types codes so varchar-based aliases map to STRING instead of UNSUPPORTED.
arimu1
force-pushed
the
fix/67793-sqlserver-alias-types
branch
2 times, most recently
from
September 13, 2026 00:56
99a9134 to
556c452
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: close #67793
Related PR: N/A
Problem Summary:
SQL Server JDBC catalog schema discovery maps columns using
JdbcSQLServerClient.jdbcTypeToDoris(), which only matched built-inTYPE_NAMEvalues. User-defined alias types created withCREATE TYPE ... FROM varcharexpose a customTYPE_NAME(for examplecustomtexttype) whileDATA_TYPEremainsTypes.VARCHAR, so Doris mapped them toUNSUPPORTEDand blocked queries.Release note
Fixed JDBC SQL Server external catalog mapping for user-defined alias types when JDBC reports a standard scalar
DATA_TYPE.Check List (For Author)
Test
Behavior changed:
TYPE_NAMEvalues now fall back to JDBCDATA_TYPEfor standard scalar types (e.g. varchar aliases → STRING). CLR/special types still reported as unsupported binary codes remain unsupported.Does this need documentation?
Test plan
cd fe && mvn test -pl fe-core -am -Dtest=JdbcSQLServerClientTest -Dsurefire.failIfNoSpecifiedTests=false -Ddoris.thrift.executable=/opt/homebrew/bin/thriftFixes #67793