https://github.com/apache/spark
Revision e8866f9fc62095b78421d461549f7eaf8e9070b3 authored by Reynold Xin on 14 December 2016, 20:22:49 UTC, committed by Herman van Hovell on 14 December 2016, 20:23:01 UTC
## What changes were proposed in this pull request?
This patch reduces the default number element estimation for arrays and maps from 100 to 1. The issue with the 100 number is that when nested (e.g. an array of map), 100 * 100 would be used as the default size. This sounds like just an overestimation which doesn't seem that bad (since it is usually better to overestimate than underestimate). However, due to the way we assume the size output for Project (new estimated column size / old estimated column size), this overestimation can become underestimation. It is actually in general in this case safer to assume 1 default element.

## How was this patch tested?
This should be covered by existing tests.

Author: Reynold Xin <rxin@databricks.com>

Closes #16274 from rxin/SPARK-18853.

(cherry picked from commit 5d799473696a15fddd54ec71a93b6f8cb169810c)
Signed-off-by: Herman van Hovell <hvanhovell@databricks.com>
1 parent af12a21
History
Tip revision: e8866f9fc62095b78421d461549f7eaf8e9070b3 authored by Reynold Xin on 14 December 2016, 20:22:49 UTC
[SPARK-18853][SQL] Project (UnaryNode) is way too aggressive in estimating statistics
Tip revision: e8866f9

README.md

back to top