Skip to content

Commit

Permalink
Optimize batch pipeline: no need in cache w/o deadletters
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Moskalenko <moskalenko.alexey@gmail.com>
  • Loading branch information
pyalex committed Apr 15, 2021
1 parent 1b24bac commit 691cb45
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ object BatchPipeline extends BasePipeline {
)
}

val projected = input.select(projection: _*).cache()
val projected = if (config.deadLetterPath.nonEmpty) {
input.select(projection: _*).cache()
} else {
input.select(projection: _*)
}

TypeCheck.allTypesMatch(projected.schema, featureTable) match {
case Some(error) =>
Expand Down

0 comments on commit 691cb45

Please sign in to comment.