Skip to content

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

Open
hutiefang76 wants to merge 1 commit into
apache:masterfrom
hutiefang76:codex/linkis-5130-jdbc-numeric-type
Open

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

Conversation

@hutiefang76

Copy link
Copy Markdown

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.

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

1 participant