Spark uses Lazy Evaluation because of the following reasons:

  • It increases the manageability of the program by dividing it into smaller operations, thereby reducing the number of passes on the data by grouping operations.
  • It increases the speed and saves computational and calculational overhead by computing only necessary values.
  • It reduces complexities in any program by allowing users to work with an infinite data structure while drastically reducing time and space overheads.
  • It optimizes the program by reducing the number of queries being run.
BY Best Interview Question ON 10 Jun 2020