alexeykudinkin commented on a change in pull request #4026:
URL: https://github.com/apache/hudi/pull/4026#discussion_r756323101
##########
File path:
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestTableLayoutOptimization.scala
##########
@@ -83,30 +87,41 @@ class TestOptimizeTable extends HoodieClientTestBase {
.option("hoodie.clustering.plan.strategy.target.file.max.bytes",
"1073741824")
.option("hoodie.clustering.plan.strategy.small.file.limit", "629145600")
.option("hoodie.clustering.plan.strategy.max.bytes.per.group",
Long.MaxValue.toString)
- .option("hoodie.clustering.plan.strategy.target.file.max.bytes",
String.valueOf(64 *1024 * 1024L))
+ .option("hoodie.clustering.plan.strategy.target.file.max.bytes",
String.valueOf(64 * 1024 * 1024L))
.option(HoodieClusteringConfig.LAYOUT_OPTIMIZE_ENABLE.key, "true")
.option(HoodieClusteringConfig.PLAN_STRATEGY_SORT_COLUMNS.key,
"begin_lat, begin_lon")
.mode(SaveMode.Overwrite)
.save(basePath)
- assertEquals(1000, spark.read.format("hudi").load(basePath).count())
- // use unsorted col as filter.
- assertEquals(spark.read
- .format("hudi").load(basePath).where("end_lat >= 0 and rider != '1' and
weight > 0.0").count(),
- spark.read.option(DataSourceReadOptions.ENABLE_DATA_SKIPPING.key(),
"true")
- .format("hudi").load(basePath).where("end_lat >= 0 and rider != '1'
and weight > 0.0").count())
- // use sorted col as filter.
- assertEquals(spark.read.format("hudi").load(basePath)
- .where("begin_lat >= 0.49 and begin_lat < 0.51 and begin_lon >= 0.49 and
begin_lon < 0.51").count(),
- spark.read.option(DataSourceReadOptions.ENABLE_DATA_SKIPPING.key(),
"true")
- .format("hudi").load(basePath)
- .where("begin_lat >= 0.49 and begin_lat < 0.51 and begin_lon >= 0.49
and begin_lon < 0.51").count())
- // use sorted cols and unsorted cols as filter
- assertEquals(spark.read.format("hudi").load(basePath)
- .where("begin_lat >= 0.49 and begin_lat < 0.51 and end_lat >
0.56").count(),
- spark.read.option(DataSourceReadOptions.ENABLE_DATA_SKIPPING.key(),
"true")
- .format("hudi").load(basePath)
- .where("begin_lat >= 0.49 and begin_lat < 0.51 and end_lat >
0.56").count())
+ val readDf =
Review comment:
Good point. Is it okay if would fold this change into #4060 to avoid
rebasing?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]