lvshaokang commented on code in PR #38251:
URL: https://github.com/apache/spark/pull/38251#discussion_r996646587


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/BloomFilterMightContain.scala:
##########
@@ -59,12 +61,25 @@ case class BloomFilterMightContain(
             if !subquery.containsPattern(OUTER_REFERENCE) =>
             TypeCheckResult.TypeCheckSuccess
           case _ =>
-            TypeCheckResult.TypeCheckFailure(s"The Bloom filter binary input 
to $prettyName " +
-              "should be either a constant value or a scalar subquery 
expression")
+            DataTypeMismatch(
+              errorSubClass = "BLOOM_FILTER_BINARY_OP_WRONG_TYPE",
+              messageParameters = Map(
+                "functionName" -> toSQLId(prettyName),
+                "actual" -> toSQLType(bloomFilterExpression.dataType)

Review Comment:
   > toSQLExpr(bloomFilterExpression)
   
   Yes, I tested it and using `toSQLExpr` is more clearer and useful, it will 
return actual bloomFilterExpression.



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