The grammar only accepted UNION ALL and visitUnion hardcoded UNION ALL, so
plain UNION never deduped. Accept optional ALL, carry a distinct flag on the
Union node, and lower it to relBuilder.union(all=!distinct). DataFusion and
the analytics-engine planner already execute LogicalUnion(all=false).
Reject a chain that mixes UNION and UNION ALL: it is left-associative, which
one flat Union cannot represent. Add SetOperationIT and give Capability a
per-backend blacklist, so SET_OPERATION skips on the OpenSearch backend
instead of the analytics engine.
Signed-off-by: Chen Dai <daichen@amazon.com>
Description
This PR fixed the
UNION(distinct) gap for the analytics engine via unified SQL and extended the test-capability mechanism with a per-backend dimension, since set operations are broken on SQL V2 (the JSON response formatter deprecated in 3.0).Related Issues
Part of #5248
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.