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
Next Next commit
Rerun the indeterminate stage for cache operation
(cherry picked from commit b543fab)
Signed-off-by: Yuanjian Li <[email protected]>
  • Loading branch information
xuanyuanking committed Aug 12, 2019
commit 99457d8dafeb8be7e1dfee02fb6d4598fc4b07d7
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ case class CachedRDDBuilder(

private def buildBuffers(): RDD[CachedBatch] = {
val output = cachedPlan.output
val cached = cachedPlan.execute().mapPartitionsInternal { rowIterator =>
val cached = cachedPlan.execute().mapPartitionsWithIndexInternal({ (_, rowIterator) =>
Copy link
Member

Choose a reason for hiding this comment

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

I think we only run cached plan once. I think it should be determinate? If so, this map should not be order sensitive effectively?

new Iterator[CachedBatch] {
def next(): CachedBatch = {
val columnBuilders = output.map { attribute =>
Expand Down Expand Up @@ -131,7 +131,7 @@ case class CachedRDDBuilder(

def hasNext: Boolean = rowIterator.hasNext
}
}.persist(storageLevel)
}, isOrderSensitive = true).persist(storageLevel)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite get it. The isOrderSensitive flag is used to describe the map function. Why the map function is order sensitive?


cached.setName(cachedName)
cached
Expand Down