wangyum commented on a change in pull request #25584: [SPARK-28876][SQL]
fallBackToHdfs should not support Hive partitioned table
URL: https://github.com/apache/spark/pull/25584#discussion_r317871459
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveStrategies.scala
##########
@@ -114,22 +114,22 @@ class ResolveHiveSerdeTable(session: SparkSession)
extends Rule[LogicalPlan] {
class DetermineTableStats(session: SparkSession) extends Rule[LogicalPlan] {
override def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
- case relation: HiveTableRelation
- if DDLUtils.isHiveTable(relation.tableMeta) &&
relation.tableMeta.stats.isEmpty =>
- val table = relation.tableMeta
- val sizeInBytes = if
(session.sessionState.conf.fallBackToHdfsForStatsEnabled) {
+ case relation @ HiveTableRelation(table, _, partitionCols)
+ if DDLUtils.isHiveTable(table) && table.stats.isEmpty =>
+ val conf = session.sessionState.conf
+ val sizeInBytes = if (conf.fallBackToHdfsForStatsEnabled &&
partitionCols.isEmpty) {
Review comment:
Done
----------------------------------------------------------------
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]