Error while processing statement: FAILED: Execution Error, return code 3 from org.apache.
This error occurs when executing sql with a collection in the hive on spark engine:
[42000][3] Error while processing statement: FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.spark.SparkTask. Spark job failed during runtime. Please check stacktrace for the root cause.

[42000][3] Error while processing statement: FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.spark.SparkTask. Spark job failed during runtime. Please check stacktrace for the root cause.


Solution 1: Switching engine using mr
set hive.execution.engine=mr;
Solution 2:
set mapred.map.tasks.speculative.execution=true
set mapred.reduce.tasks.speculative.execution=true
Read More:
- Hive 3.1.2 startup error reporting and resolution of guava version conflict
- [Solved] Hive Error: FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask
- [Solved] HiveSQL Error: “Error while processing statement: FAILED: Execution Error, return code 2“
- [Solved] Hive Error while processing statement: FAILED: Execution Error
- [Solved] Error: Could not open client transport with JDBC Uri
- [Solved] Sparksql error: Exception in thread “main” org.apache.spark.sql.catalyst.errors.package$TreeNodeException
- [Solved] Hive tez due to: ROOT_INPUT_INIT_FAILURE java.lang.IllegalArgumentException: Illegal Capacity: -38297
- [Solved] Hadoop Mapreduce Error: GC overhead limit exceeded
- How to Solve Error in importing scala word2vecmodel
- [Solved] Schema initialization FAILED Metastore state would be inconsistent
- [Solved] Hadoop Error: Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster
- How to Solve HiveServer2 & Beeline Error
- [Solved] bin/hive Startup Error: Operation category READ is not supported in state standby
- Initial installation of hive-2.1.0 startup error problem solution
- [Solved] Hadoop error java.lang.nosuchmethoderror
- [Solved] Exception in thread “main“ org.apache.spark.SparkException: When running with master ‘yarn‘ either
- [ERROR] Terminal initialization failed; falling back to unsupported java.lang.IncompatibleClassChang
- Hive Statement Error During Execution: Error while processing statement: FAILED: Execution Error, return code 2 from o
- [Solved] Hive execute insert overwrite error: could not be cleared up