You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/03/31 03:40:26 UTC

[GitHub] [iceberg] felixYyu opened a new pull request #4439: Changing parens

felixYyu opened a new pull request #4439:
URL: https://github.com/apache/iceberg/pull/4439


   fix #4376 cc @RussellSpitzer 


-- 
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


[GitHub] [iceberg] felixYyu commented on pull request #4439: Changing parens

Posted by GitBox <gi...@apache.org>.
felixYyu commented on pull request #4439:
URL: https://github.com/apache/iceberg/pull/4439#issuecomment-1085302190


   Do you have any suggestions about summary?@rdblue


-- 
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


[GitHub] [iceberg] rdblue commented on pull request #4439: Static Analysis: Missing private constructor, method need return single mutable, and other few static warning

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #4439:
URL: https://github.com/apache/iceberg/pull/4439#issuecomment-1086902128


   I think this should be split into different PRs for specific fixes.


-- 
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


[GitHub] [iceberg] felixYyu commented on a change in pull request #4439: Changing parens

Posted by GitBox <gi...@apache.org>.
felixYyu commented on a change in pull request #4439:
URL: https://github.com/apache/iceberg/pull/4439#discussion_r840139878



##########
File path: mr/src/test/java/org/apache/iceberg/mr/TestIcebergInputFormats.java
##########
@@ -337,7 +339,7 @@ public void testLocality() throws Exception {
     helper.appendToTable(null, expectedRecords);
 
     for (InputSplit split : testInputFormat.create(builder.conf()).getSplits()) {
-      Assert.assertArrayEquals(IcebergSplit.ANYWHERE, split.getLocations());
+      Assert.assertArrayEquals(ANYWHERE, split.getLocations());

Review comment:
       because the IcebergSplit check warning log, so make public 'ANYWHERE' var to private. the TestIcebergInputFormats need define a private internal variable.
   
   ```
   mr\src\main\java\org\apache\iceberg\mr\mapreduce\IcebergSplit.java:38: [MutablePublicArray] Non-empty arrays are mutable, so this `public static final` array is not a constant and can be modified by clients of this class.  Prefer an ImmutableList, or provide an accessor method that returns a defensive copy.
     public static final String[] ANYWHERE = new String[]{"*"};
                                  ^
       (see https://errorprone.info/bugpattern/MutablePublicArray)
   ```




-- 
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


[GitHub] [iceberg] felixYyu edited a comment on pull request #4439: Changing parens

Posted by GitBox <gi...@apache.org>.
felixYyu edited a comment on pull request #4439:
URL: https://github.com/apache/iceberg/pull/4439#issuecomment-1085297114


   > description with the motivation and what you're actually changing?
   
   - DynClasses DynFields SnapshotSummary : A Builder with a static factory method on the encapsulating class must have a private constructor
   
   - BaseFileScanTask : This method returns both mutable and immutable collections or maps from different paths,These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them.
   
   - FlinkCatalog : This method returns both mutable and immutable collections or maps from different paths
   
   - ParquetMetricsRowGroupFilter : Integer id = ref.fieldId(); id type maybe privimitive


-- 
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


[GitHub] [iceberg] felixYyu edited a comment on pull request #4439: Changing parens

Posted by GitBox <gi...@apache.org>.
felixYyu edited a comment on pull request #4439:
URL: https://github.com/apache/iceberg/pull/4439#issuecomment-1085297114


   > description with the motivation and what you're actually changing?
   
   - DynClasses DynFields SnapshotSummary : A Builder with a static factory method on the encapsulating class must have a private constructor
   - BaseFileScanTask : This method returns both mutable and immutable collections or maps from different paths,This method returns both mutable and immutable collections or maps from different paths.
   - FlinkCatalog : This method returns both mutable and immutable collections or maps from different paths
   - ParquetMetricsRowGroupFilter : Integer id = ref.fieldId(); id type maybe privimitive


-- 
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


[GitHub] [iceberg] rdblue commented on pull request #4439: Changing parens

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #4439:
URL: https://github.com/apache/iceberg/pull/4439#issuecomment-1084995915


   This PR goes well beyond "Changing parens". Can you update the summary and description with the motivation and what you're actually changing?


-- 
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


[GitHub] [iceberg] rdblue commented on a change in pull request #4439: Changing parens

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #4439:
URL: https://github.com/apache/iceberg/pull/4439#discussion_r839933718



##########
File path: mr/src/test/java/org/apache/iceberg/mr/TestIcebergInputFormats.java
##########
@@ -337,7 +339,7 @@ public void testLocality() throws Exception {
     helper.appendToTable(null, expectedRecords);
 
     for (InputSplit split : testInputFormat.create(builder.conf()).getSplits()) {
-      Assert.assertArrayEquals(IcebergSplit.ANYWHERE, split.getLocations());
+      Assert.assertArrayEquals(ANYWHERE, split.getLocations());

Review comment:
       What was the problem here?




-- 
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


[GitHub] [iceberg] felixYyu commented on pull request #4439: Changing parens

Posted by GitBox <gi...@apache.org>.
felixYyu commented on pull request #4439:
URL: https://github.com/apache/iceberg/pull/4439#issuecomment-1085297114


   - DynClasses DynFields SnapshotSummary : A Builder with a static factory method on the encapsulating class must have a private constructor
   - BaseFileScanTask : This method returns both mutable and immutable collections or maps from different paths,This method returns both mutable and immutable collections or maps from different paths.
   - FlinkCatalog : This method returns both mutable and immutable collections or maps from different paths
   - ParquetMetricsRowGroupFilter : Integer id = ref.fieldId(); id type maybe privimitive


-- 
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