-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29446: Remove reflective instance creation in iceberg-handler #6305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
okumin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't apply cosmetic changes suggested by Sonar Cloud in this PR because they are not directly related to where I changed.
https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=6305&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true
|
|
||
|
|
||
| public final class IcebergDateObjectInspectorHive3 extends AbstractPrimitiveJavaObjectInspector | ||
| public final class IcebergDateObjectInspector extends AbstractPrimitiveJavaObjectInspector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rename could be harmful if Hive includes an outdated Iceberg library. I don't think it happens.
ayushtkn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
To me this looks safe and was in my bucket list. The rename thing also looks in general safe to me, but that is a public class unless anyone is using it or having a downstream client around, it is gonna break or they have to manage it if they want to support multiple versions.
Do you think we can skip the rename part?
This reverts commit 23989ca.
I agree. I reverted the renaming commit, and resolved a conflict with the latest master |
|
|
@ayushtkn Thank you! I hope this would make it easy to develop the Iceberg storage handler a bit |



What changes were proposed in this pull request?
Remove dynamic instantiation based on the Hive version. Most likely, the conditional instantiation was implemented when the related logic existed in Apache Iceberg, aiming to be effective for both Hive 2 and 3 with a single source code base. This is an example of Iceberg 1.3.0.
https://github.com/apache/iceberg/blob/apache-iceberg-1.3.0/mr/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergInputFormat.java
Why are the changes needed?
I think the reflections are no longer needed, and having them makes development a bit hard; e.g., code jumps are disabled.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Unit and integration test