HyukjinKwon commented on a change in pull request #24712: [SPARK-27843][SQL]
Remove duplicate logic of calculate table size
URL: https://github.com/apache/spark/pull/24712#discussion_r287628582
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveStrategies.scala
##########
@@ -118,21 +118,12 @@ class DetermineTableStats(session: SparkSession) extends
Rule[LogicalPlan] {
if DDLUtils.isHiveTable(relation.tableMeta) &&
relation.tableMeta.stats.isEmpty =>
val table = relation.tableMeta
val sizeInBytes = if
(session.sessionState.conf.fallBackToHdfsForStatsEnabled) {
- try {
- val hadoopConf = session.sessionState.newHadoopConf()
- val tablePath = new Path(table.location)
- val fs: FileSystem = tablePath.getFileSystem(hadoopConf)
- fs.getContentSummary(tablePath).getLength
Review comment:
Based on todos in `calculateTotalSize` -> `calculateLocationSize`, we
manually implement that logic because it doesn't work in Jenkins
```
// TODO: Why fs.getContentSummary returns wrong size on Jenkins?
```
Can we use fs.getContentSummary there?
----------------------------------------------------------------
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.
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]