Details
Description
Hive query editor allows users to save Hive query results to HDFS or a new Hive table. However, when users have multiple query statements in the Hive query editor, the editor wraps all the queries inserts them into the 'CREATE TABLE AS SELECT ...’ or 'INSERT OVERWRITE DIRECTORY SELECT ...' statement to save the query, which causes syntax error. The fix takes only the last SELECT statement being executed and saves it, and it also provides an error message that only SELECT statement can be saved.