Core concept

val df2 = df.filter("age > 21").select("name")  // lazy
df2.show()  // action triggers
Advertisement

How it works

Lazy = optimization opportunity. Debugging chains harder.

Advertisement

Trade-offs + gotchas

Understanding execution model.