Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up
Signed-off-by: Karen Feng <[email protected]>
  • Loading branch information
karenfeng committed Mar 31, 2021
commit 6c3dde274e36ab5665b72703435b41332ef60f65
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ case class Generate(

val unrequiredSet: Set[Int] = unrequiredChildIndex.toSet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems not needed.


lazy val requiredChildOutput: Seq[Attribute] =
lazy val requiredChildOutput: Seq[Attribute] = {
val unrequiredSet = unrequiredChildIndex.toSet
child.output.zipWithIndex.filterNot(t => unrequiredSet.contains(t._2)).map(_._1)
}

override lazy val resolved: Boolean = {
generator.resolved &&
Expand All @@ -136,8 +138,7 @@ case class Generate(
}

def output: Seq[Attribute] = requiredChildOutput ++ qualifiedGeneratorOutput
override def metadataOutput: Seq[Attribute] =
child.metadataOutput.zipWithIndex.filterNot(t => unrequiredSet.contains(t._2)).map(_._1)
override def metadataOutput: Seq[Attribute] = child.metadataOutput
}

case class Filter(condition: Expression, child: LogicalPlan)
Expand Down Expand Up @@ -376,7 +377,7 @@ case class Join(

override def metadataOutput: Seq[Attribute] = {
joinType match {
case j: ExistenceJoin =>
case ExistenceJoin(_) =>
left.metadataOutput
case LeftExistence(_) =>
left.metadataOutput
Expand Down