Skip to content

[ISSUE-5130][EC-JDBC] Map NUMERIC columns to decimal#5445

Merged
casionone merged 1 commit into
apache:masterfrom
hutiefang76:codex/linkis-5130-jdbc-numeric-type
Jun 25, 2026
Merged

[ISSUE-5130][EC-JDBC] Map NUMERIC columns to decimal#5445
casionone merged 1 commit into
apache:masterfrom
hutiefang76:codex/linkis-5130-jdbc-numeric-type

Conversation

@hutiefang76

Copy link
Copy Markdown
Contributor

What is changed?

This PR fixes PostgreSQL numeric column metadata mapping in the JDBC engine plugin. PostgreSQL reports numeric columns as java.sql.Types.NUMERIC, but JDBCHelper.getTypeStr only mapped Types.DECIMAL to Linkis decimal, leaving NUMERIC as null.

The value extraction path already handles Types.NUMERIC and Types.DECIMAL together, so this change applies the same mapping in the type-name conversion path.

Why?

Fixes #5130.

Tests

  • Reproduced with mvn -pl linkis-engineconn-plugins/jdbc -am -Dtest=org.apache.linkis.manager.engineplugin.jdbc.executor.JDBCHelperTest -Dsurefire.failIfNoSpecifiedTests=false test: failed before the fix with expected: <decimal> but was: <null>.
  • Passed after the fix with the same command.
  • Passed JDBC unit test set with mvn -pl linkis-engineconn-plugins/jdbc -am -Dtest=ConnectionManagerTest,ProgressMonitorTest,JDBCErrorCodeSummaryTest,JDBCHelperTest,JdbcParamUtilsTest,JDBCMultiDatasourceParserTest -Dsurefire.failIfNoSpecifiedTests=false test (13 tests).

Note: direct mvn -pl linkis-engineconn-plugins/jdbc test cannot resolve unpublished Linkis 1.9.0 reactor artifacts from the configured mirror in this local environment, so the verified commands use -am to build required modules from source.

@casionone casionone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@casionone casionone merged commit c6c09e7 into apache:master Jun 25, 2026
5 of 11 checks passed
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.

[Bug] postgresql dataType Error

2 participants