Skip to content

HIVE-29560: Fix JdbcColumn DECIMAL class mapping to BigDecimal#6424

Closed
kezhuoquan wants to merge 1 commit into
apache:masterfrom
kezhuoquan:HIVE-29560
Closed

HIVE-29560: Fix JdbcColumn DECIMAL class mapping to BigDecimal#6424
kezhuoquan wants to merge 1 commit into
apache:masterfrom
kezhuoquan:HIVE-29560

Conversation

@kezhuoquan

Copy link
Copy Markdown

What changes were proposed in this pull request?

JdbcColumn.columnClassName() currently maps Types.DECIMAL to
BigInteger.class.getName(), which is incorrect for DECIMAL semantics.
This PR changes the mapping to BigDecimal.class.getName().

Why are the changes needed?

JDBC DECIMAL should map to java.math.BigDecimal, not BigInteger.
The current behavior may cause type mismatch and incorrect metadata
interpretation by JDBC clients.

Does this PR introduce any user-facing change?

Yes.
For DECIMAL columns, JDBC metadata now reports
java.math.BigDecimal as the column class name.

How was this patch tested?

  • Built JDBC module successfully:
    • mvn -pl jdbc -DskipTests compile
  • Verified code change in:
    • jdbc/src/java/org/apache/hive/jdbc/JdbcColumn.java

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.

@github-actions github-actions Bot added the stale label Jun 12, 2026
@github-actions github-actions Bot closed this Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants