Explanation
In Apache Spark, operations are classified as transformations and actions:
Transformations (Lazy Evaluation) → They define a logical plan but do not trigger execution.
Actions (Trigger Evaluation) → They cause Spark to execute the transformations and return a result.
Analysis of Each Option
A. DataFrame.collect() → Action → Brings all data to the driver, triggering execution.
B. DataFrame.count() → Action → Computes the number of rows, triggering execution.
C. DataFrame.first() → Action → Returns the first row, triggering execution.
D. DataFrame.join() → Transformation → Defines a new DataFrame but does not trigger execution.
E. DataFrame.take() → Action → Returns a limited number of rows, triggering execution.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ARUNKUMARKRISHNASAMY
1 month, 3 weeks agoAnweee
9 months ago