cloud-fan commented on a change in pull request #34053:
URL: https://github.com/apache/spark/pull/34053#discussion_r717305177
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -249,6 +249,20 @@ trait CheckAnalysis extends PredicateHelper with
LookupCatalog {
s"join condition '${condition.sql}' " +
s"of type ${condition.dataType.catalogString} is not a
boolean.")
+ case j @ AsOfJoin(_, _, _, Some(condition), _, _, _)
+ if condition.dataType != BooleanType =>
+ failAnalysis(
+ s"join condition '${condition.sql}' " +
+ s"of type ${condition.dataType.catalogString} is not a
boolean.")
+
+ case j @ AsOfJoin(_, _, _, _, _, _, Some(toleranceAssertion)) =>
+ if (!toleranceAssertion.foldable) {
+ failAnalysis("Input argument tolerance must be a constant.")
+ }
+ if (!toleranceAssertion.eval().asInstanceOf[Boolean]) {
Review comment:
ah that's why it's called `toleranceAssertion`, it's a predicate!
--
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]