'how does dataset run at compile time, when Apache spark has lazy evaluation

I can see that Dataset will tell you if the column exists or not during compile time. If Spark has lazy evaluation, How can it get the schema of the data before we run the action command in runtime.

Let me know if my above understanding is wrong.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source