advancedxy commented on code in PR #226:
URL: 
https://github.com/apache/arrow-datafusion-comet/pull/226#discussion_r1535723742


##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -1645,6 +1645,41 @@ object QueryPlanSerde extends Logging with 
ShimQueryPlanSerde {
           } else {
             None
           }
+        case murmur3Hash @ Murmur3Hash(children, seed)
+            if children.forall(c => supportedDataType(c.dataType)) =>
+          // TODO: support list/map/struct type for murmur3 hash
+          val exprs = children.map(exprToProtoInternal(_, inputs))
+          val seedBuilder = ExprOuterClass.Literal
+            .newBuilder()
+            .setDatatype(serializeDataType(IntegerType).get)
+            .setIntVal(seed)
+          val seedExpr = 
Some(ExprOuterClass.Expr.newBuilder().setLiteral(seedBuilder).build())
+          // the seed is put at the end of the arguments
+          scalarExprToProtoWithReturnType("murmur3_hash", IntegerType, exprs 
:+ seedExpr: _*)
+
+        case _ @Md5(child) =>

Review Comment:
   Oops, I didn't notice the md5 is already added. Let me remove this case.
   
   However, it looks like the test case in 
https://github.com/advancedxy/arrow-datafusion-comet/blob/ca7f3252b17962693ab365dfde9da0bb496135af/spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala#L986
 is not corrected yet. I can amend that in this PR.
   



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