Skip to content

Conversation

@mdayakar
Copy link
Contributor

HIVE-26877: Parquet CTAS with JOIN on decimals with different precision/scale fail

What changes were proposed in this pull request?

While creating the writer object, if it is decimal type then using the precision and scale from schema instead of object inspector.

Why are the changes needed?

To fix the issue HIVE-26877

Does this PR introduce any user-facing change?

No

How was this patch tested?

Added q file test
mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile=parquet_join_dec_col_diff_pre_scale.q -pl itests/qtest -Pitests

Copy link
Contributor

@thomasrebele thomasrebele left a comment

Choose a reason for hiding this comment

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

LGTM

return new TimestampDataWriter((TimestampObjectInspector)inspector);
case DECIMAL:
return new DecimalDataWriter((HiveDecimalObjectInspector)inspector);
return new DecimalDataWriter((HiveDecimalObjectInspector) inspector,

This comment was marked as resolved.

Copy link
Contributor

@soumyakanti3578 soumyakanti3578 left a comment

Choose a reason for hiding this comment

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

Overall LGTM logically. Please consider resolving the remaining comments.

@mdayakar mdayakar force-pushed the HIVE-26877_Parquet_Decimal_Issue branch from fd70f84 to f3405b0 Compare January 23, 2026 10:22
@sonarqubecloud
Copy link

@soumyakanti3578 soumyakanti3578 merged commit 5c1a99a into apache:master Jan 24, 2026
2 checks passed
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.

4 participants