ZhangChaoming commented on issue #4568:
URL: https://github.com/apache/paimon/issues/4568#issuecomment-2492937232

   > Can fix this issue by cast byte/short to int in 
`org.apache.parquet.filter2.predicate.ParquetFilters`.
   > 
   > ```java
   > private static Comparable<?> toParquetObject(Object value) {
   >         if (value == null) {
   >             return null;
   >         }
   >         if (value instanceof Byte) {
   >             return (int) (Byte) value;
   >         } else if (value instanceof Short) {
   >             return (int) (Short) value;
   >         } else if (value instanceof Number) {
   >             return (Comparable<?>) value;
   >         } else if (value instanceof String) {
   >             return Binary.fromString((String) value);
   >         } else if (value instanceof BinaryString) {
   >             return Binary.fromString(value.toString());
   >         } else if (value instanceof byte[]) {
   >             return Binary.fromReusedByteArray((byte[]) value);
   >         }
   > 
   >         // TODO Support Decimal and Timestamp
   >         throw new UnsupportedOperationException();
   >     }
   > ```
   
   cc @JingsongLi 


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

Reply via email to