Skip to content

Commit a277120

Browse files
committed
Update HiveMetastoreCatalog.scala
1 parent 8d910aa commit a277120

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,11 @@ private[hive] case class MetastoreRelation
428428
}
429429
)
430430
override def sameResult(plan: LogicalPlan): Boolean = {
431-
val new_plan = plan.asInstanceOf[MetastoreRelation];
432-
plan.getClass == this.getClass &&
433-
plan.children.size == children.size &&
434-
databaseName == new_plan.databaseName &&
435-
tableName == new_plan.tableName
431+
plan match {
432+
case mr: MetastoreRelation =>
433+
mr.databaseName == databaseName && mr.tableName == tableName
434+
case _ => false
435+
}
436436
}
437437

438438
val tableDesc = HiveShim.getTableDesc(

0 commit comments

Comments
 (0)