SpinTheMic
Pro

Interview practice question

Driver hangs building a huge plan

Data Engineering · Spark · Experienced

A job loops over 2,000 small tables, reads each and unions them into one DataFrame. The driver hangs for a long time and sometimes runs out of memory before any task runs. Why?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Each union adds to the logical plan, creating a massive plan tree.
  • Catalyst analysis and optimization on huge plans is slow and memory heavy.
  • Read the tables in one go with a path pattern or list instead.
  • Or write each table out and read the combined location.
  • Break the lineage with checkpoints if iterative logic is unavoidable.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics