Câu 39: Databricks Certified Associate Developer for Apache Spark
The code block shown below contains an error. The code block is intended to return a new 12-partition DataFrame from the 8-partition DataFrame storesDF by inducing a shuffle. Identify the error. Code block:storesDF.coalesce(12)
Nội dung câu hỏi
The code block shown below contains an error. The code block is intended to return a new 12-partition DataFrame from the 8-partition DataFrame storesDF by inducing a shuffle. Identify the error. Code block:storesDF.coalesce(12)
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. The coalesce() operation cannot guarantee the number of target partitions – the repartition() operation should be used instead.
- B. The coalesce() operation does not induce a shuffle and cannot increase the number of partitions – the repartition() operation should be used instead. — đáp án hiện tại
- C. The coalesce() operation will only work if the DataFrame has been cached to memory – the repartition() operation should be used instead.
- D. The coalesce() operation requires a column by which to partition rather than a number of partitions – the repartition() operation should be used instead.
- E. The number of resulting partitions, 12, is not achievable for an 8-partition DataFrame.
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.
Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.