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

LikeSimplification should handle NULL

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.1.2, 3.2.0
    • Component/s: SQL
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: