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

LikeSimplification should handle NULL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.1.2, 3.2.0
    • SQL
    • None

    Description

      It will throw NPE if add this test to RegexpExpressionsSuite:

      import org.apache.spark.sql.catalyst.optimizer.ConstantFolding
      import org.apache.spark.sql.internal.SQLConf
      withSQLConf(SQLConf.OPTIMIZER_EXCLUDED_RULES.key ->
        ConstantFolding.getClass.getName.stripSuffix("$")) {
        checkEvaluation(Literal.create("foo", StringType)
          .likeAll("%foo%", Literal.create(null, StringType)), null)
      }
      

      Attachments

        Activity

          People

            angerszhu angerszhu
            yumwang Yuming Wang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: