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

Nullability of Intersect can be stricter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0
    • SQL
    • None

    Description

      Intersect doesn't override SetOperation.output, which is defined as:

        override def output: Seq[Attribute] =
          left.output.zip(right.output).map { case (leftAttr, rightAttr) =>
            leftAttr.withNullability(leftAttr.nullable || rightAttr.nullable)
          }
      

      However, we can replace the || with && for intersection.

      Attachments

        Activity

          People

            smilegator Xiao Li
            lian cheng Cheng Lian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: