jonvex commented on code in PR #13711:
URL: https://github.com/apache/hudi/pull/13711#discussion_r2354145201


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/ColumnStatIndexTestBase.scala:
##########
@@ -334,24 +334,24 @@ class ColumnStatIndexTestBase extends 
HoodieSparkClientTestBase {
     val metadataConfig = HoodieMetadataConfig.newBuilder()
       .fromProperties(toProperties(metadataOpts))
       .build()
-
-    val pStatsIndex = new PartitionStatsIndexSupport(spark, sourceTableSchema, 
metadataConfig, metaClient)
-
     val schemaUtil = new TableSchemaResolver(metaClient)
     val tableSchema = schemaUtil.getTableAvroSchema(false)
+    val localSourceTableSchema = 
AvroConversionUtils.convertAvroSchemaToStructType(tableSchema)
+
+    val pStatsIndex = new PartitionStatsIndexSupport(spark, 
localSourceTableSchema, metadataConfig, metaClient)
     val indexedColumnswithMeta: Set[String] = 
metaClient.getIndexMetadata.get().getIndexDefinitions.get(PARTITION_NAME_COLUMN_STATS).getSourceFields.asScala.toSet
     val pIndexedColumns = indexedColumnswithMeta.filter(colName => 
!HoodieTableMetadataUtil.META_COL_SET_TO_INDEX.contains(colName))
       .toSeq.sorted
 
-    val (pExpectedColStatsSchema, _) = composeIndexSchema(pIndexedColumns, 
pIndexedColumns, sourceTableSchema)
+    val (pExpectedColStatsSchema, _) = composeIndexSchema(pIndexedColumns, 
pIndexedColumns, localSourceTableSchema)

Review Comment:
   Yes. And if you go to the above method, the same change was made there, but 
forgot in this one



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