alexeykudinkin commented on code in PR #7672:
URL: https://github.com/apache/hudi/pull/7672#discussion_r1107399443
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/ColumnStatsIndexSupport.scala:
##########
@@ -209,11 +209,11 @@ class ColumnStatsIndexSupport(spark: SparkSession,
// NOTE: We're sorting the columns to make sure final index schema matches
layout
// of the transposed table
val sortedTargetColumnsSet = TreeSet(queryColumns:_*)
- val sortedTargetColumns = sortedTargetColumnsSet.toSeq
// NOTE: This is a trick to avoid pulling all of
[[ColumnStatsIndexSupport]] object into the lambdas'
// closures below
val indexedColumns = this.indexedColumns
+ val indexedTargetColumns =
sortedTargetColumnsSet.filter(indexedColumns.contains(_)).toSeq
Review Comment:
Let's de-duplicate filtering and tie it up w/ index schema composition:
- Let's make `composeIndexSchema` return (schema, targetIndexedColumns)
- Let's move schema composition up here
--
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]