amansinha100 commented on a change in pull request #1334: DRILL-6385: Support 
JPPD feature
URL: https://github.com/apache/drill/pull/1334#discussion_r199336633
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/HashPrelUtil.java
 ##########
 @@ -125,6 +126,47 @@ public RexNode createCall(String funcName, List<RexNode> 
inputFields) {
     return func;
   }
 
+  /**
+   * Create hash expression based on the given input fields.
+   *
+   * @param inputExprs Expression list based on which the hash expression is 
constructed.
+   * @param helper Implementation of {@link HashExpressionCreatorHelper}
+   *               which is used to create function expressions.
+   * @param hashAsDouble Whether to use the hash as double function or regular 
hash64 function.
+   * @param <T> Input and output expression type.
+   *           Currently it could be either {@link RexNode} or {@link 
LogicalExpression}
+   * @return
+   */
+  public static <T> T createHash64Expression(
+    List<T> inputExprs,
+    T seed,
+    HashExpressionCreatorHelper<T> helper,
+    boolean hashAsDouble) {
+
+    assert inputExprs.size() > 0;
 
 Review comment:
   Use Preconditions.checkArgument() since asserts are not enabled by default. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to