Hi

getTableName does not throw and error when the table does not exist. It
just parses the table name out of the sql.
Similarly, super.analyzeInternal does not throw an exception as well


On Tue, Jul 9, 2013 at 11:05 PM, Reynold Xin <notifications@github.com>wrote:

> In src/main/scala/shark/parse/SharkDDLSemanticAnalyzer.scala:
>
> > @@ -0,0 +1,23 @@
> > +package shark.parse
> > +
> > +import org.apache.hadoop.hive.conf.HiveConf
> > +import org.apache.hadoop.hive.ql.parse.{ASTNode, BaseSemanticAnalyzer, DDLSemanticAnalyzer, HiveParser}
> > +import shark.{LogHelper, SharkEnv}
> > +import spark.RDD
> > +import spark.rdd.UnionRDD
> > +
> > +class SharkDDLSemanticAnalyzer(conf: HiveConf) extends DDLSemanticAnalyzer(conf) with LogHelper {
> > +
> > +  override def analyzeInternal(node: ASTNode): Unit = {
> > +    super.analyzeInternal(node)
> > +    //handle drop table query
> > +    if (node.getToken().getType() == HiveParser.TOK_DROPTABLE) {
> > +      SharkEnv.unpersist(getTableName(node))
>
> Maybe check whether the table exists. If it doesn't throw an error when
> the table does not exist, it is fine too.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/amplab/shark/pull/104/files#r5108566>
> .
>