You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "ebyhr (via GitHub)" <gi...@apache.org> on 2025/10/17 22:22:49 UTC

[PR] Parquet: Fix UnnecessaryParentheses warning [iceberg]

ebyhr opened a new pull request, #14361:
URL: https://github.com/apache/iceberg/pull/14361

   Fix UnnecessaryParentheses warning:
   ```
   iceberg/parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java:181: warning: [UnnecessaryParentheses] These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them
         IntFunction<ByteBuffer> delegateAllocate = (allocate::allocate);
                                                    ^
       (see https://errorprone.info/bugpattern/UnnecessaryParentheses)
     Did you mean 'IntFunction<ByteBuffer> delegateAllocate =  allocate::allocate;'?
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Fix UnnecessaryParentheses warning [iceberg]

Posted by "ebyhr (via GitHub)" <gi...@apache.org>.
ebyhr commented on code in PR #14361:
URL: https://github.com/apache/iceberg/pull/14361#discussion_r2441398179


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java:
##########
@@ -178,7 +178,7 @@ public boolean readVectoredAvailable(ByteBufferAllocator allocate) {
     @Override
     public void readVectored(List<ParquetFileRange> ranges, ByteBufferAllocator allocate)
         throws IOException {
-      IntFunction<ByteBuffer> delegateAllocate = (allocate::allocate);

Review Comment:
   Sure, updated to inline the variable. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Fix UnnecessaryParentheses warning [iceberg]

Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao merged PR #14361:
URL: https://github.com/apache/iceberg/pull/14361


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Fix UnnecessaryParentheses warning [iceberg]

Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on PR #14361:
URL: https://github.com/apache/iceberg/pull/14361#issuecomment-3417542813

   Thanks @ebyhr for the PR! Thanks @amogh-jahagirdar @singhpk234 for the review!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Parquet: Fix UnnecessaryParentheses warning [iceberg]

Posted by "amogh-jahagirdar (via GitHub)" <gi...@apache.org>.
amogh-jahagirdar commented on code in PR #14361:
URL: https://github.com/apache/iceberg/pull/14361#discussion_r2441394712


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java:
##########
@@ -178,7 +178,7 @@ public boolean readVectoredAvailable(ByteBufferAllocator allocate) {
     @Override
     public void readVectored(List<ParquetFileRange> ranges, ByteBufferAllocator allocate)
         throws IOException {
-      IntFunction<ByteBuffer> delegateAllocate = (allocate::allocate);

Review Comment:
   Thanks for fixing this, as a minor point, while we're addressing this can we just inline this as part of the call to `delegate.readVectored`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org