Github user cloud-fan commented on the issue: https://github.com/apache/spark/pull/15090 has an offline discussion with @wzhfy , here is the result: 1. The current `ColumnStats` is hard to use because most of its fields are `Option`, some are `Option[Any]`, and we may need a lot of pattern match to use them. 2. If we use `InternalRow` directly, we may need to write a lot of comments at caller side, e.g. we need to explain `columnStats.getInt(0)` is to get the max value. a new proposal: We can still use `InternalRow` to represent column statistics, and provide some util functions to construct a "getter" for it. e.g. ``` object ColumnStats { def forBooleanColumn(statsRow: InternalRow): BooleanColumnStatus = ... def forStringColumn(statsRow: InternalRow): StringColumnStatus = ... def forNumericColumn[T <: Number] ... ...... } class BooleanColumnStats(statsRow) { def numTrues = statsRow.getLong(0) ...... } ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org