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

   I would like some clarification on wether or not Iceberg officially supports 
partition truncation transform for Fixed or Binary data types.  
   
   The [specification](https://iceberg.apache.org/spec/#partition-transforms) 
denotes that the only data types supported for truncate transform are: String, 
Int, Long, and Decimal.  Yet the following 
[code](https://github.com/apache/iceberg/blob/5009949ba4377ac5a8572ff7ae70e886c9e33bec/api/src/main/java/org/apache/iceberg/transforms/Truncate.java#L37)
 seems to suggest that fixed/binary data types might be supported as well:
   
   ```
    static <T> Truncate<T> get(Type type, int width) {
       Preconditions.checkArgument(width > 0,
           "Invalid truncate width: %s (must be > 0)", width);
   
       switch (type.typeId()) {
         case INTEGER:
           return (Truncate<T>) new TruncateInteger(width);
         case LONG:
           return (Truncate<T>) new TruncateLong(width);
         case DECIMAL:
           return (Truncate<T>) new TruncateDecimal(width);
         case STRING:
           return (Truncate<T>) new TruncateString(width);
         case BINARY:
           return (Truncate<T>) new TruncateByteBuffer(width);
         default:
           throw new UnsupportedOperationException(
               "Cannot truncate type: " + type);
       }
     }
   ```
   
   Should this type be included in the specification as a valid on for the 
truncation transform or is the BINARY case aboved used for something else.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to