From f87ace62773fd47249c73ff97a0f4cc3465ad156 Mon Sep 17 00:00:00 2001 From: Cheng Hao Date: Sun, 10 May 2015 23:17:06 +0800 Subject: [PATCH] remove the TODO and add `resolved condition` for HiveTable --- .../src/main/scala/org/apache/spark/sql/hive/HiveQl.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala index 5d9b1448d7c23..2cbb5ca4d2e0c 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala @@ -64,10 +64,11 @@ case class CreateTableAsSelect( override def output: Seq[Attribute] = Seq.empty[Attribute] override lazy val resolved: Boolean = - // TODO add more condition? tableDesc.specifiedDatabase.isDefined && tableDesc.schema.size > 0 && tableDesc.serde.isDefined && + tableDesc.inputFormat.isDefined && + tableDesc.outputFormat.isDefined && childrenResolved } @@ -254,7 +255,6 @@ private[hive] object HiveQl { /** * Returns the HiveConf - * TODO get it from HiveContext? */ private[this] def hiveConf(): HiveConf = { val ss = SessionState.get() // SessionState is lazy initializaion, it can be null here