This is an automated email from the ASF dual-hosted git repository.
garyli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 6cf25d5 [MINOR] Minor improve in IncrementalRelation (#2314)
6cf25d5 is described below
commit 6cf25d5c8a4c0ee7e8cd09a7a2884806b0fee1b7
Author: wangxianghu <[email protected]>
AuthorDate: Thu Dec 10 20:16:00 2020 +0800
[MINOR] Minor improve in IncrementalRelation (#2314)
---
.../main/scala/org/apache/hudi/IncrementalRelation.scala | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git
a/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/IncrementalRelation.scala
b/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/IncrementalRelation.scala
index f834578..9cd562c 100644
---
a/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/IncrementalRelation.scala
+++
b/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/IncrementalRelation.scala
@@ -92,17 +92,8 @@ class IncrementalRelation(val sqlContext: SQLContext,
StructType(skeletonSchema.fields ++ dataSchema.fields)
}
-
- private val filters = {
- if
(optParams.contains(DataSourceReadOptions.PUSH_DOWN_INCR_FILTERS_OPT_KEY)) {
- val filterStr = optParams.getOrElse(
- DataSourceReadOptions.PUSH_DOWN_INCR_FILTERS_OPT_KEY,
- DataSourceReadOptions.DEFAULT_PUSH_DOWN_FILTERS_OPT_VAL)
- filterStr.split(",").filter(!_.isEmpty)
- } else {
- Array[String]()
- }
- }
+ private val filters =
optParams.getOrElse(DataSourceReadOptions.PUSH_DOWN_INCR_FILTERS_OPT_KEY,
+
DataSourceReadOptions.DEFAULT_PUSH_DOWN_FILTERS_OPT_VAL).split(",").filter(!_.isEmpty)
override def schema: StructType = usedSchema