H13-723_V2.0 · Question #99
In Spark, because DataFrame is a higher-level interface than RDD, the call level will be more. Therefore, the performance of all programs developed based on DataFrame will be worse than that of…
The correct answer is B. False. B (False) is correct because Spark's DataFrame API leverages the Catalyst optimizer and Tungsten execution engine, which apply query optimization techniques (predicate pushdown, column pruning, code generation) that raw RDD code cannot benefit from. Even though DataFrame sits…
Question
In Spark, because DataFrame is a higher-level interface than RDD, the call level will be more. Therefore, the performance of all programs developed based on DataFrame will be worse than that of programs developed based on RDD.
Options
- ATrue
- BFalse
How the community answered
(60 responses)- A23% (14)
- B77% (46)
Explanation
B (False) is correct because Spark's DataFrame API leverages the Catalyst optimizer and Tungsten execution engine, which apply query optimization techniques (predicate pushdown, column pruning, code generation) that raw RDD code cannot benefit from. Even though DataFrame sits at a higher abstraction level, the optimizer can often produce execution plans that outperform hand-written RDD logic.
Why A is wrong: The premise - that more abstraction layers always mean worse performance - is a common but incorrect intuition. In Spark's case, the optimizer actively closes the performance gap and frequently reverses it. Higher-level doesn't mean slower; it means the engine has more information to optimize with.
Memory tip: Think of it like a compiler. Writing assembly (RDD) gives you manual control, but a smart optimizing compiler (Catalyst + DataFrame) often beats hand-written assembly because it can see the whole picture. "Higher level, smarter optimizer" - DataFrame wins on performance in most real-world cases.
Community Discussion
No community discussion yet for this question.