@MobinRanjbar
Set the hive execution engine to spark is sufficient to run a hive query in spark.
set hive.execution.engine=spark;
But where did you set this and from where did you try to execute your query? There are 3 options
a. In CLI, login as hive/beeline and run the above set command, but this is effective only for that session. You cannot control Oozie with this command. Because Oozie will be a new session.
b. In Hue, login to hue and go to Hive query and run the above command, this is also session specific. You cannot control Oozie with this command.
c. CM -> Hive -> configuration -> set hive.execution.engine to spark, this is a permanent setup and it will control all the session including Oozie
In your case, if you want to try temporarly for a specific query. Run the 'set' command in Oozie itself 'along with your query' as follows
ex:
set hive.execution.engine=spark;
select * from test_table;