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 2019/06/23 09:42:20 UTC

[GitHub] [incubator-iceberg] aokolnychyi commented on a change in pull request #226: Apply Baseline plugin to iceberg-spark

aokolnychyi commented on a change in pull request #226: Apply Baseline plugin to iceberg-spark
URL: https://github.com/apache/incubator-iceberg/pull/226#discussion_r296473115
 
 

 ##########
 File path: spark/src/main/java/org/apache/iceberg/spark/PruneColumnsWithReordering.java
 ##########
 @@ -72,7 +72,7 @@ public Type schema(Schema schema, Supplier<Type> structResult) {
   public Type struct(Types.StructType struct, Iterable<Type> fieldResults) {
     Preconditions.checkNotNull(struct, "Cannot prune null struct. Pruning must start with a schema.");
     Preconditions.checkArgument(current instanceof StructType, "Not a struct: %s", current);
-    StructType s = (StructType) current;
+    StructType requestedStruct = (StructType) current;
 
 Review comment:
   I was inspired by other existing places such as [this](https://github.com/apache/incubator-iceberg/blob/master/spark/src/main/java/org/apache/iceberg/spark/PruneColumnsWithReordering.java#L107). It was a bit unclear what `current` means until I saw that `current = requestedType` initially. Since this class is about pruning `requested` made sense to me.
   
   If we keep `requested` in the name, conditions are self-descriptive `requestedDecimal.scale() == decimal.scale()`. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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