[SQL] spark-sql aborted if passed in a wrong sql

If we passed in a wrong sql like ```abdcdfsfs```, the spark-sql script aborted.