alexeykudinkin commented on code in PR #7672:
URL: https://github.com/apache/hudi/pull/7672#discussion_r1107937844
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestColumnStatsIndex.scala:
##########
@@ -247,7 +247,7 @@ class TestColumnStatsIndex extends HoodieClientTestBase {
// We have to include "c1", since we sort the expected outputs by this
column
val requestedColumns = Seq("c4", "c1")
- val expectedColStatsSchema = composeIndexSchema(requestedColumns.sorted,
targetColumnsToIndex.toSet, sourceTableSchema)
+ val (expectedColStatsSchema, targetIndexedColumns) =
composeIndexSchema(requestedColumns.sorted, targetColumnsToIndex.toSet,
sourceTableSchema)
Review Comment:
If this var is not used, i'd suggest we instead stub it out like `val
(expectedSchema, _) = ...`
##########
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/ColumnStatsIndexHelper.java:
##########
@@ -236,12 +238,12 @@ public static Dataset<Row> buildColumnStatsTableFor(
})
.filter(Objects::nonNull);
- StructType indexSchema =
ColumnStatsIndexSupport$.MODULE$.composeIndexSchema(
-
JavaConverters$.MODULE$.collectionAsScalaIterableConverter(columnNames).asScala().toSeq(),
-
JavaConverters$.MODULE$.collectionAsScalaIterableConverter(columnNames).asScala().toSet(),
- StructType$.MODULE$.apply(orderedColumnSchemas)
- );
+ Tuple2<StructType, Seq<String>> indexSchemaAndColumns =
ColumnStatsIndexSupport$.MODULE$.composeIndexSchema(
+
JavaConverters$.MODULE$.collectionAsScalaIterableConverter(columnNames).asScala().toSeq(),
+
JavaConverters$.MODULE$.collectionAsScalaIterableConverter(columnNames).asScala().toSet(),
+ StructType$.MODULE$.apply(orderedColumnSchemas)
+ );
Review Comment:
We can just add `._1` here and keep most of the code intact
--
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]