tshauck commented on code in PR #18831:
URL: https://github.com/apache/datafusion/pull/18831#discussion_r2558372350


##########
datafusion/sql/tests/cases/plan_to_sql.rs:
##########
@@ -334,9 +334,7 @@ fn roundtrip_statement_with_dialect_1() -> Result<(), 
DataFusionError> {
         sql: "select min(ta.j1_id) as j1_min from j1 ta order by min(ta.j1_id) 
limit 10;",
         parser_dialect: MySqlDialect {},
         unparser_dialect: UnparserMySqlDialect {},
-        // top projection sort gets derived into a subquery
-        // for MySQL, this subquery needs an alias
-        expected: @"SELECT `j1_min` FROM (SELECT min(`ta`.`j1_id`) AS 
`j1_min`, min(`ta`.`j1_id`) FROM `j1` AS `ta` ORDER BY min(`ta`.`j1_id`) ASC) 
AS `derived_sort` LIMIT 10",
+        expected: @"SELECT min(`ta`.`j1_id`) AS `j1_min` FROM `j1` AS `ta` 
ORDER BY `j1_min` ASC LIMIT 10",

Review Comment:
   I think this is ok... I tested the updated query on mysql and it returns the 
correct result.
   
   That said, I'm not really sure what this is supposed to be testing -- in the 
input sql, it's selecting the minimum so the order by is useless/limit are 
useless.



-- 
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