[SPARK-2191][SQL] Make sure InsertIntoHiveTable doesn't execute more than once.