We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77308cc commit f998b1aCopy full SHA for f998b1a
1 file changed
datafusion/optimizer/src/eliminate_duplicated_expr.rs
@@ -108,17 +108,10 @@ impl OptimizerRule for EliminateDuplicatedExpr {
108
Transformed::no
109
};
110
111
- if unique_exprs.is_empty() {
112
- return if sort.fetch.is_some() {
113
- Ok(Transformed::no(LogicalPlan::Sort(Sort {
114
- expr: unique_exprs,
115
- input: sort.input,
116
- fetch: sort.fetch,
117
- })))
118
- } else {
119
- Ok(Transformed::yes(sort.input.as_ref().clone()))
120
- };
121
- }
+ assert!(
+ !unique_exprs.is_empty(),
+ "FD pruning unexpectedly removed all ORDER BY expressions"
+ );
122
123
Ok(transformed(LogicalPlan::Sort(Sort {
124
expr: unique_exprs,
0 commit comments