Skip to content

Commit

Permalink
Fixing compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Kudinkin committed Feb 24, 2022
1 parent 11cfd33 commit 2eb193a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ abstract class HoodieBaseRelation(val sqlContext: SQLContext,
toScalaOption(timeline.lastInstant())

protected def queryTimestamp: Option[String] = {
specifiedQueryTimestamp.orElse(toScalaOption(timeline.lastInstant().map(i => i.getTimestamp)))
specifiedQueryTimestamp.orElse(toScalaOption(timeline.lastInstant()).map(i => i.getTimestamp))
}

override def schema: StructType = tableStructSchema
Expand Down Expand Up @@ -336,4 +336,4 @@ object HoodieBaseRelation {
})
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ class HoodieFileScanRDD(@transient private val sparkSession: SparkSession,
iterator.asInstanceOf[Iterator[InternalRow]]
}

override protected def getPartitions: Array[Partition] = fileSplits.toArray
override protected def getPartitions: Array[Partition] = fileSplits.map(_.filePartition).toArray
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ class MergeOnReadIncrementalRelation(sqlContext: SQLContext,
val filteredFileSlices = if (!StringUtils.isNullOrEmpty(pathGlobPattern)) {
val globMatcher = new GlobPattern("*" + pathGlobPattern)
fileSlices.filter(fileSlice => {
val path = toScalaOption(fileSlice.getBaseFile.map(_.getPath))
.orElse(toScalaOption(fileSlice.getLatestLogFile.map(_.getPath.toString)))
val path = toScalaOption(fileSlice.getBaseFile).map(_.getPath)
.orElse(toScalaOption(fileSlice.getLatestLogFile).map(_.getPath.toString))
.get
globMatcher.matches(path)
})
Expand Down

0 comments on commit 2eb193a

Please sign in to comment.