QuestionQ129

VerifiedTroubleshooting and Tuning Apache Spark DataFrame API Applications.

Which of the following code blocks will return an approximation of the number of distinct values in the division column in DataFrame storesDF most quickly?

Explanation

approx_count_distinct estimates cardinality with HyperLogLog++, and its relativeSD parameter sets the maximum permitted relative standard deviation. Allowing a higher RSD reduces required precision and resource use. An RSD of 0.15 is the least precise valid approximation among these choices, so it is the fastest option.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!