findepi commented on code in PR #12873:
URL: https://github.com/apache/datafusion/pull/12873#discussion_r1797442180


##########
datafusion/sql/src/unparser/plan.rs:
##########
@@ -352,6 +352,20 @@ impl Unparser<'_> {
                 )
             }
             LogicalPlan::Sort(sort) => {
+                if let Some(fetch) = sort.fetch {
+                    let new_sort = Arc::new(LogicalPlan::Sort(Sort {
+                        expr: sort.expr.clone(),
+                        input: Arc::clone(&sort.input),
+                        fetch: None,
+                    }));
+                    let limit = Arc::new(LogicalPlan::Limit(Limit {

Review Comment:
   Is it possible to unparse without creating intermediate (fake) plan nodes?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to