Skip to content

Commit 2779d95

Browse files
author
Alexey Kudinkin
committed
Tidying up
1 parent 9812889 commit 2779d95

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieFileIndex.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ object HoodieFileIndex extends Logging {
358358
}
359359

360360
private def getQueryPath(options: Map[String, String]) = {
361-
new Path(options.getOrElse("path", "'path' option required"))
361+
new Path(options.get("path") match {
362+
case Some(p) => p
363+
case None => throw new IllegalArgumentException("'path' option required")
364+
})
362365
}
363366
}

hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/SparkHoodieTableFileIndex.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ object SparkHoodieTableFileIndex {
298298
}
299299

300300
private def deduceQueryType(configProperties: TypedProperties): HoodieTableQueryType = {
301-
configProperties.asScala(QUERY_TYPE.key()) match {
301+
configProperties.asScala(QUERY_TYPE.key) match {
302302
case QUERY_TYPE_SNAPSHOT_OPT_VAL => HoodieTableQueryType.SNAPSHOT
303303
case QUERY_TYPE_INCREMENTAL_OPT_VAL => HoodieTableQueryType.INCREMENTAL
304304
case QUERY_TYPE_READ_OPTIMIZED_OPT_VAL => HoodieTableQueryType.READ_OPTIMIZED

0 commit comments

Comments
 (0)