Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
v4.0.0-alpha
-
None
Description
when using union query with spark engine, UnionPlan transforms OLAPUnionRel to spark
DataFrame, when OLAPUnionRel.all = false, distinct transformation of spark will be used, but
it's used in a loop which traversing the DataFrame collection so that we don't have an excepted optimized flattenUnion plan(the CombineUnions rule of spark optimize the distinct, but the nested union plan does not be flattened),there are so many stages in spark dag. Actuall, distinct transformation should be used only once at last.