Fix flakey percentile test
This query was added to "percentile" in commit b877cd43 as outer references were allowed after we backported ordered-set aggregates. But the query was using an ARRAY sublink, which semantically does not guarantee ordering. This causes sporadic failure in tests. This commit tweaks the test query so that it has a deterministic ordering in the output array. We considered just adding an ORDER BY to the subquery, but ultimately we chose to use `array_agg` with an `ORDER BY` because subquery order is not preserved per SQL standard. Signed-off-by: NSambitesh Dash <sdash@pivotal.io>
Showing
想要评论请 注册 或 登录