An exception should be thrown in the case of failure for DDL commands. On Tue, Sep 23, 2014 at 4:55 PM, Du Li <l...@yahoo-inc.com.invalid> wrote:
> Hi, > > After executing sql() in SQLContext or HiveContext, is there a way to > tell whether the query/command succeeded or failed? Method sql() returns > SchemaRDD which either is empty or contains some Rows of results. However, > some queries and commands do not return results by nature; being empty is > not indicative of their status of execution. For example, if the command is > to create/drop a table, how could I know if the table has really been > created/dropped? If it fails, is there a status code or something I could > check to tell the reasons for failure? > > Thanks, > Du >