shangxinli commented on a change in pull request #1566:
URL: https://github.com/apache/iceberg/pull/1566#discussion_r505905559
##########
File path: parquet/src/main/java/org/apache/iceberg/parquet/ParquetFilters.java
##########
@@ -38,9 +43,71 @@
class ParquetFilters {
+ private static final Set<Operation> SUPPORTED_OPS = ImmutableSet.of(
+ Operation.IS_NULL,
+ Operation.NOT_NULL,
+ Operation.EQ,
+ Operation.NOT_EQ,
+ Operation.GT,
+ Operation.GT_EQ,
+ Operation.LT,
+ Operation.LT_EQ);
+
+ private static final Set<Type.TypeID> SUPPORTED_TYPES = ImmutableSet.of(
+ Type.TypeID.BOOLEAN,
+ Type.TypeID.INTEGER,
+ Type.TypeID.LONG,
+ Type.TypeID.FLOAT,
+ Type.TypeID.DOUBLE,
+ Type.TypeID.DATE,
+ Type.TypeID.TIME
+ );
+
private ParquetFilters() {
}
+ public static boolean isSupportedFilter(Expression expr, Schema schema,
boolean caseSensitive) {
Review comment:
That is what I originally use but I changed it because throwing/catching
exception is pretty expensive. In the non-error case, we should avoid that,
although I understand creating some separate code to keep tracking is another
pain.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]