HyukjinKwon commented on code in PR #47688: URL: https://github.com/apache/spark/pull/47688#discussion_r1719255232
########## sql/core/src/main/scala/org/apache/spark/sql/Column.scala: ########## @@ -283,14 +279,18 @@ class Column(val expr: Expression) extends Logging { * @since 1.3.0 */ def ===(other: Any): Column = { - val right = lit(other).expr - if (this.expr == right) { + val right = lit(other) + checkTrivialPredicate(right) + fn("=", other) + } + + private def checkTrivialPredicate(right: Column): Unit = { + if (this == right) { logWarning( log"Constructing trivially true equals predicate, " + - log"'${MDC(LEFT_EXPR, this.expr)} = ${MDC(RIGHT_EXPR, right)}'. " + + log"'${MDC(LEFT_EXPR, this)} <=> ${MDC(RIGHT_EXPR, right)}'. " + Review Comment: ```suggestion log"'${MDC(LEFT_EXPR, this)} = ${MDC(RIGHT_EXPR, right)}'. " + ``` -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org