Why Does Spark Fail to Query Data Written by the Union Statement Running on Tez?
Symptom
Hive uses the Tez engine to execute union-related statements to write data. After Hive is switched to the Spark engine for query, no data is found.
Solution
When Hive uses the Tez engine to execute the union-related statement, the generated output file is stored in the HIVE_UNION_SUBDIR directory. After Hive is switched back to the Spark engine, files in the directory are not read by default. Therefore, data in the HIVE_UNION_SUBDIR directory is not queried.
In this case, you can set set mapreduce.input.fileinputformat.input.dir.recursive to true to enable union optimization and determine whether to read data in the directory.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
