Skip to content

Commit

Permalink
minor: fix doc/typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener committed Aug 19, 2023
1 parent 74320d8 commit 7211a48
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions datafusion/expr/src/logical_plan/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,15 +593,8 @@ impl LogicalPlanBuilder {

/// Apply a union, removing duplicate rows
pub fn union_distinct(self, plan: LogicalPlan) -> Result<Self> {
// unwrap top-level Distincts, to avoid duplication
let left_plan: LogicalPlan = match self.plan {
LogicalPlan::Distinct(Distinct { input }) => (*input).clone(),
_ => self.plan,
};
let right_plan: LogicalPlan = match plan {
LogicalPlan::Distinct(Distinct { input }) => (*input).clone(),
_ => plan,
};
let left_plan: LogicalPlan = self.plan;
let right_plan: LogicalPlan = plan;

Ok(Self::from(LogicalPlan::Distinct(Distinct {
input: Arc::new(union(left_plan, right_plan)?),
Expand Down

0 comments on commit 7211a48

Please sign in to comment.