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 2021/10/25 15:58:34 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #3368: Spark: Fix ClassCastException when using bucket UDF

rdblue commented on a change in pull request #3368:
URL: https://github.com/apache/iceberg/pull/3368#discussion_r735743711



##########
File path: spark/v2.4/spark/src/main/java/org/apache/iceberg/spark/SparkValueConverter.java
##########
@@ -117,4 +132,32 @@ private static Record convert(Types.StructType struct, Row row) {
     }
     return record;
   }
+
+  @SuppressWarnings("checkstyle:CyclomaticComplexity")
+  public static Object convertAtomicValue(DataType atomic, Object object) {

Review comment:
       Is this needed?
   
   I think you could handle short and byte types by updating the `convert(Type, Object)` method above:
   
   ```java
         case INTEGER:
           return ((Number) object).intValue();
   ```
   
   Then you wouldn't need a new method at all.




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