You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tighten predicate: reject non-windowable aggregates and dotted-path BY keys
CI integration failures revealed two cases the rewrite shouldn't fire on:
1. testUnsupportedWindowFunctions — percentile / percentile_approx are in
AGGREGATION_FUNC_MAPPING but not WINDOW_FUNC_MAPPING. The legacy rex
visitor throws "Unexpected window function: ..." for them, and the test
pins that error. My predicate used only ofAggregation so it accepted
percentile and the rewrite ran instead of throwing. Now require presence
in both maps — percentile (and take/first/last/median, all aggregation-
only) fall through to the legacy throw; dc/distinct_count/row_number
(all window-only) also fall through unchanged.
2. testEventstatsOnMapPath — `eventstats count() by doc.user.city`. The
join condition uses relBuilder.field(2, side, name), which doesn't
resolve nested paths; my predicate accepted any QualifiedName so the
rewrite produced a plan that failed at field lookup. Now isSimpleQualifiedName
requires parts.size() == 1; dotted paths fall through to the legacy
RexOver lowering, which handles nested fields via the existing rexVisitor.
Plus a spotless reformat to the earliest/latest test that wasn't picked
up before push.
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
0 commit comments