JingsongLi commented on a change in pull request #13306:
URL: https://github.com/apache/flink/pull/13306#discussion_r483441917



##########
File path: 
flink-formats/flink-orc/src/main/java/org/apache/flink/orc/OrcFileSystemFormatFactory.java
##########
@@ -83,14 +96,227 @@ private static Properties getOrcProperties(ReadableConfig 
options) {
                return orcProperties;
        }
 
+       private boolean isUnaryValid(CallExpression callExpression) {
+               return callExpression.getChildren().size() == 1 && 
callExpression.getChildren().get(0) instanceof FieldReferenceExpression;
+       }
+
+       private boolean isBinaryValid(CallExpression callExpression) {
+               return callExpression.getChildren().size() == 2 && 
((callExpression.getChildren().get(0) instanceof FieldReferenceExpression && 
callExpression.getChildren().get(1) instanceof ValueLiteralExpression) ||
+                               (callExpression.getChildren().get(0) instanceof 
ValueLiteralExpression && callExpression.getChildren().get(1) instanceof 
FieldReferenceExpression));
+       }
+
+       public OrcSplitReader.Predicate toOrcPredicate(Expression expression) {
+               if (expression instanceof CallExpression) {
+                       CallExpression callExp = (CallExpression) expression;
+                       FunctionDefinition funcDef = 
callExp.getFunctionDefinition();
+
+                       if (funcDef == BuiltInFunctionDefinitions.IS_NULL || 
funcDef == BuiltInFunctionDefinitions.IS_NOT_NULL || funcDef == 
BuiltInFunctionDefinitions.NOT) {

Review comment:
       Yes




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to