-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Change SingleBufferInputStream .read signature to match super-method. #6221
Conversation
I just bumped into the same issue when I rebased my fork to 1.1.0 release tag. cc: @rdblue, @Fokko, @nastra , @gaborkaszab But we do need to merge this. |
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 think it's ok to update this, but I don't see a reason to do another release because Iceberg is being compiled+released with JDK 8 compatibility and I don't think this will change in the near future (due to Hive requiring JDK8)
Surprisingly I didn't modify source and target compatibility in my code. (using default 1.8). But I still get this error only from my jenkins build (not from local builds). Might have to do with java version used in my jenkins build environment or a bug in new versions of error-prone (unlikely). I need to dig further on this. The same stuff was working with previous iceberg releases. |
additional context: so it depends on whether the jdk classes were compiled with the
on jdk 8 this flag is commonly not used:
on jdk 11 it is commonly used:
but there are some jdk vendors (i.e. on centos7) that also enable this flag on jdk8, thus this check might fail depending on the jdk distribution used. long story short, this PR should get merged to fix the check on all kind of jdks 😅 |
@XN137: Thank you so much for digging down on this and figuring out how jdk8 (of some vendors) is also affected by this. thanks @Fokko for merging the PR and @dchristle for the fix. |
What does this PR do?
Changes the variable name
offset
tooff
in theSingleBufferInputStream
function.Why are these changes needed?
When running
./gradlew build
withsourceCompatibility = '11'
andtargetCompatibility = '11'
instead of1.8
, the build is blocked by aConsistentOverrides
error:SingleBufferInputStream
overrides superclassInputStream
, where the equivalent method is:public int read(byte[] b, int off, int len) throws IOException
and changing it to match the super-method fixes the error.
How were these changes tested?
./gradlew build
succeeds onsourceCompatibility = '11'
andtargetCompatibility = '11'
../gradlew build
succeeds onsourceCompatibility = '1.8'
andtargetCompatibility = '1.8'
.