You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/14 13:37:45 UTC

[GitHub] [spark] srowen commented on a change in pull request #29728: [SPARK-32856][SQL] Prohibit binary comparisons chain

srowen commented on a change in pull request #29728:
URL: https://github.com/apache/spark/pull/29728#discussion_r487921098



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -1327,22 +1327,29 @@ class AstBuilder(conf: SQLConf) extends SqlBaseBaseVisitor[AnyRef] with Logging
   override def visitComparison(ctx: ComparisonContext): Expression = withOrigin(ctx) {
     val left = expression(ctx.left)
     val right = expression(ctx.right)
+    val isUnsupportedComparison = (left, right) match {

Review comment:
       Total nit, but isn't it clearer to write `isSupportedComparison` and avoid inverting the logic everywhere?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org