github-advanced-security[bot] commented on code in PR #15974:
URL: https://github.com/apache/druid/pull/15974#discussion_r1515490040


##########
sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/BaseExpressionDimFilterOperatorConversion.java:
##########
@@ -40,13 +40,17 @@
     super(operator, druidFunctionName);
   }
 
-  protected static DimFilter toExpressionFilter(
+  protected String getFilterExpression(List<DruidExpression> druidExpressions)
+  {
+    return DruidExpression.functionCall(getDruidFunctionName(), 
druidExpressions);

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [DruidExpression.functionCall](1) should be avoided because it has 
been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/6986)



##########
sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/MultiValueStringOperatorConversions.java:
##########
@@ -458,6 +585,45 @@
     }
   }
 
+
+  private static List<DruidExpression> 
harmonizeNullsMvdArg0OperandList(List<DruidExpression> druidExpressions)
+  {
+    final List<DruidExpression> newArgs;
+    if (druidExpressions.get(0).isDirectColumnAccess()) {
+      // rewrite first argument to wrap with mv_harmonize_nulls function
+      newArgs = Lists.newArrayListWithCapacity(2);
+      newArgs.add(
+          0,
+          DruidExpression.ofFunctionCall(
+              druidExpressions.get(0).getDruidType(),
+              "mv_harmonize_nulls",
+              Collections.singletonList(druidExpressions.get(0))
+          )
+      );
+      newArgs.add(1, druidExpressions.get(1));
+    } else {
+      newArgs = druidExpressions;
+    }
+    return newArgs;
+  }
+
+  private static String haromonizeNullsMvdArg0FilterExpression(
+      String druidFunctionName,
+      List<DruidExpression> druidExpressions
+  )
+  {
+    return DruidExpression.functionCall(
+        druidFunctionName,
+        ImmutableList.of(
+            DruidExpression.fromFunctionCall(
+                "mv_harmonize_nulls",
+                Collections.singletonList(druidExpressions.get(0))
+            ),

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [DruidExpression.fromFunctionCall](1) should be avoided because it 
has been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/6988)



##########
sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/MultiValueStringOperatorConversions.java:
##########
@@ -458,6 +585,45 @@
     }
   }
 
+
+  private static List<DruidExpression> 
harmonizeNullsMvdArg0OperandList(List<DruidExpression> druidExpressions)
+  {
+    final List<DruidExpression> newArgs;
+    if (druidExpressions.get(0).isDirectColumnAccess()) {
+      // rewrite first argument to wrap with mv_harmonize_nulls function
+      newArgs = Lists.newArrayListWithCapacity(2);
+      newArgs.add(
+          0,
+          DruidExpression.ofFunctionCall(
+              druidExpressions.get(0).getDruidType(),
+              "mv_harmonize_nulls",
+              Collections.singletonList(druidExpressions.get(0))
+          )
+      );
+      newArgs.add(1, druidExpressions.get(1));
+    } else {
+      newArgs = druidExpressions;
+    }
+    return newArgs;
+  }
+
+  private static String haromonizeNullsMvdArg0FilterExpression(
+      String druidFunctionName,
+      List<DruidExpression> druidExpressions
+  )
+  {
+    return DruidExpression.functionCall(
+        druidFunctionName,
+        ImmutableList.of(
+            DruidExpression.fromFunctionCall(
+                "mv_harmonize_nulls",
+                Collections.singletonList(druidExpressions.get(0))
+            ),
+            druidExpressions.get(1)
+        )
+    );

Review Comment:
   ## Deprecated method or constructor invocation
   
   Invoking [DruidExpression.functionCall](1) should be avoided because it has 
been deprecated.
   
   [Show more 
details](https://github.com/apache/druid/security/code-scanning/6987)



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