HyukjinKwon commented on a change in pull request #22905: [SPARK-25894][SQL]
Add a ColumnarFileFormat type which returns the column count for a given schema
URL: https://github.com/apache/spark/pull/22905#discussion_r244077125
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala
##########
@@ -306,7 +306,15 @@ case class FileSourceScanExec(
withOptPartitionCount
}
- withSelectedBucketsCount
+ val withOptColumnCount = relation.fileFormat match {
+ case columnar: ColumnarFileFormat =>
+ val sqlConf = relation.sparkSession.sessionState.conf
+ val columnCount = columnar.columnCountForSchema(sqlConf,
requiredSchema)
+ withSelectedBucketsCount + ("ColumnCount" -> columnCount.toString)
Review comment:
That basically says logging is useless when to use beeline. I don't think
this info is super important to (non-advanced) users.
I mean log4j which is Spark's logging module, and I meant information you're
including in the metadata. Maybe info level? or debug level.
```
logInfo("The number of actual column being pruned is blah blah")
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]