We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c228100 commit be56898Copy full SHA for be56898
sql/core/src/main/scala/org/apache/spark/sql/Column.scala
@@ -464,7 +464,15 @@ class Column(val expr: Expression) extends Logging {
464
* @group expr_ops
465
* @since 1.3.0
466
*/
467
- def <=> (other: Any): Column = withExpr { EqualNullSafe(expr, lit(other).expr) }
+ def <=> (other: Any): Column = withExpr {
468
+ val right = lit(other).expr
469
+ if (this.expr == right) {
470
+ logWarning(
471
+ s"Constructing trivially true equals predicate, '${this.expr} = $right'. " +
472
+ "Perhaps you need to use aliases.")
473
+ }
474
+ EqualNullSafe(expr, right)
475
476
477
/**
478
* Equality test that is safe for null values.
0 commit comments