irenjj commented on code in PR #15077: URL: https://github.com/apache/datafusion/pull/15077#discussion_r1986078918
########## datafusion/sqllogictest/test_files/explain_tree.slt: ########## @@ -519,6 +519,52 @@ physical_plan 17)│ format: arrow │ 18)└───────────────────────────┘ +# Query for sort. +query TT +explain SELECT * FROM table1 ORDER BY string_col; +---- +logical_plan +01)Sort: table1.string_col ASC NULLS LAST +02)--TableScan: table1 projection=[int_col, string_col, bigint_col, date_col] +physical_plan +01)┌───────────────────────────┐ +02)│ SortExec │ +03)│ -------------------- │ +04)│ sort keys: │ +05)│ [string_col@1 ASC NULLS │ +06)│ LAST] │ +07)└─────────────┬─────────────┘ +08)┌─────────────┴─────────────┐ +09)│ DataSourceExec │ +10)│ -------------------- │ +11)│ files: 1 │ +12)│ format: csv │ +13)└───────────────────────────┘ + +# Query for sort with limit. +query TT +explain SELECT * FROM table1 ORDER BY string_col LIMIT 1; +---- +logical_plan +01)Sort: table1.string_col ASC NULLS LAST, fetch=1 +02)--TableScan: table1 projection=[int_col, string_col, bigint_col, date_col] +physical_plan +01)┌───────────────────────────┐ +02)│ SortExec │ +03)│ -------------------- │ +04)│ limit: 1 │ +05)│ │ +06)│ sort keys: │ +07)│ [string_col@1 ASC NULLS │ +08)│ LAST] │ Review Comment: We need to handle cases that are not in KV format. Other prs may have similar issues too, maybe we can handle it in the next pr, filed: #15098 -- 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]
