Skip to content

Commit

Permalink
add qualifier only for generator output
Browse files Browse the repository at this point in the history
  • Loading branch information
chenghao-intel committed Apr 17, 2015
1 parent 5ee5d2c commit 04ae500
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ case class Generate(
override def expressions: Seq[Expression] = generator :: Nil

def output: Seq[Attribute] = {
val withoutQualifier = if (join) child.output ++ generatorOutput else generatorOutput

qualifier.map(q =>
val qualified = qualifier.map(q =>
// prepend the new qualifier to the existed one
withoutQualifier.map(a => a.withQualifiers(q +: a.qualifiers))
).getOrElse(withoutQualifier)
generatorOutput.map(a => a.withQualifiers(q +: a.qualifiers))
).getOrElse(generatorOutput)

if (join) child.output ++ qualified else qualified
}
}

Expand Down

0 comments on commit 04ae500

Please sign in to comment.