QuestionQ254Verified/Troubleshooting and Tuning Apache Spark DataFrame API Applications.Copy linkReport a problemAsk AstroTutorSave questionWhich of the following operations is least likely to cause a shuffle?ADataFrame.join()BDataFrame.fliter()CDataFrame.orderBy()DDataFrame.distinct()EDataFrame.intersect()Show AnswerAnswerExplanationFiltering evaluates a predicate independently within each existing partition, so it is normally a narrow transformation and does not redistribute records between executors. By contrast, global ordering, duplicate removal, set intersection, and many joins require records to be co-located or globally arranged, which commonly requires a shuffle. Spark documents DataFrame.filter as filtering rows according to a condition.Learn morepyspark.sql.DataFrame.filterPySpark DataFrame API referenceShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion