alexeykudinkin commented on a change in pull request #4106:
URL: https://github.com/apache/hudi/pull/4106#discussion_r765346967



##########
File path: 
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestColumnStatsIndex.scala
##########
@@ -53,100 +43,25 @@ class TestZOrderLayoutOptimization extends 
HoodieClientTestBase {
       .add("c7", BinaryType)
       .add("c8", ByteType)
 
-  val commonOpts = Map(
-    "hoodie.insert.shuffle.parallelism" -> "4",
-    "hoodie.upsert.shuffle.parallelism" -> "4",
-    "hoodie.bulkinsert.shuffle.parallelism" -> "4",
-    DataSourceWriteOptions.RECORDKEY_FIELD.key() -> "_row_key",
-    DataSourceWriteOptions.PARTITIONPATH_FIELD.key() -> "partition",
-    DataSourceWriteOptions.PRECOMBINE_FIELD.key() -> "timestamp",
-    HoodieWriteConfig.TBL_NAME.key -> "hoodie_test"
-  )
-
   @BeforeEach
   override def setUp() {
     initPath()
     initSparkContexts()
-    spark = sqlContext.sparkSession
-    initTestDataGenerator()
     initFileSystem()
+    spark = sqlContext.sparkSession
   }
 
   @AfterEach
   override def tearDown() = {
-    cleanupSparkContexts()
-    cleanupTestDataGenerator()
     cleanupFileSystem()
-  }
-
-  @ParameterizedTest
-  @ValueSource(strings = Array("COPY_ON_WRITE", "MERGE_ON_READ"))
-  def testZOrderingLayoutClustering(tableType: String): Unit = {
-    val targetRecordsCount = 10000
-    // Bulk Insert Operation
-    val records = recordsToStrings(dataGen.generateInserts("001", 
targetRecordsCount)).toList
-    val writeDf: Dataset[Row] = 
spark.read.json(spark.sparkContext.parallelize(records, 2))
-
-    writeDf.write.format("org.apache.hudi")
-      .options(commonOpts)
-      .option("hoodie.compact.inline", "false")
-      .option(DataSourceWriteOptions.OPERATION.key(), 
DataSourceWriteOptions.BULK_INSERT_OPERATION_OPT_VAL)
-      .option(DataSourceWriteOptions.TABLE_TYPE.key(), tableType)
-      // option for clustering
-      .option("hoodie.parquet.small.file.limit", "0")
-      .option("hoodie.clustering.inline", "true")
-      .option("hoodie.clustering.inline.max.commits", "1")
-      .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(HoodieClusteringConfig.LAYOUT_OPTIMIZE_ENABLE.key, "true")
-      .option(HoodieClusteringConfig.PLAN_STRATEGY_SORT_COLUMNS.key, 
"begin_lat, begin_lon")
-      .mode(SaveMode.Overwrite)
-      .save(basePath)
-
-    val hudiMetaClient = HoodieTableMetaClient.builder
-      .setConf(hadoopConf)
-      .setBasePath(basePath)
-      .setLoadActiveTimelineOnLoad(true)
-      .build
-
-    val lastCommit = 
hudiMetaClient.getActiveTimeline.getAllCommitsTimeline.lastInstant().get()
-
-    assertEquals(HoodieTimeline.REPLACE_COMMIT_ACTION, lastCommit.getAction)
-    assertEquals(HoodieInstant.State.COMPLETED, lastCommit.getState)
-
-    val readDf =
-      spark.read
-        .format("hudi")
-        .load(basePath)
-
-    val readDfSkip =
-      spark.read
-        .option(DataSourceReadOptions.ENABLE_DATA_SKIPPING.key(), "true")
-        .format("hudi")
-        .load(basePath)
-
-    assertEquals(targetRecordsCount, readDf.count())
-    assertEquals(targetRecordsCount, readDfSkip.count())
-
-    readDf.createOrReplaceTempView("hudi_snapshot_raw")
-    readDfSkip.createOrReplaceTempView("hudi_snapshot_skipping")
-
-    def select(tableName: String) =
-      spark.sql(s"SELECT * FROM $tableName WHERE begin_lat >= 0.49 AND 
begin_lat < 0.51 AND begin_lon >= 0.49 AND begin_lon < 0.51")
-
-    assertRowsMatch(
-      select("hudi_snapshot_raw"),
-      select("hudi_snapshot_skipping")
-    )
+    cleanupSparkContexts()
   }
 
   @Test
   @Disabled

Review comment:
       We didn't merge the fixtures from the original PR, so we need to sort 
that out first




-- 
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]


Reply via email to