diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
index 8db60d32767b5c28beee0adb219ce8141b4b1d7c..156b090712df244ca9180fe64cc72d32884798f3 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala
@@ -258,7 +258,7 @@ private[hive] case class MetastoreRelation
   // org.apache.hadoop.hive.ql.metadata.Partition will cause a NotSerializableException
   // which indicates the SerDe we used is not Serializable.
 
-  def hiveQlTable = new Table(table)
+  @transient lazy val hiveQlTable = new Table(table)
 
   def hiveQlPartitions = partitions.map { p =>
     new Partition(hiveQlTable, p)