Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-48035

try_add/try_multiply should not be semantic equal to add/multiply

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL

    Description

      In the current implementation, the following code will return true

      val l1 = Literal(1)
      val l2 = Literal(2)
      val l3 = Literal(3)
      val expr1 = Add(Add(l1, l2), l3)
      val expr2 = Add(Add(l2, l1, EvalMode.TRY), l3)
      expr1.semanticEquals(expr2) 

      The same applies to Multiply.

      When creating MultiCommutativeOp for Add/Multiply, we should ensure all the evalMode are consistent.

      Attachments

        Activity

          People

            Gengliang.Wang Gengliang Wang
            Gengliang.Wang Gengliang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: