You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/02/16 16:46:35 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5307: Allow DISTINCT with ORDER BY and an aliased select list

alamb commented on code in PR #5307:
URL: https://github.com/apache/arrow-datafusion/pull/5307#discussion_r1108738294


##########
datafusion/core/src/dataframe.rs:
##########
@@ -1092,24 +1092,15 @@ mod tests {
     #[tokio::test]
     async fn test_distinct_sort_by() -> Result<()> {
         let t = test_table().await?;
-        let plan = t
+        let err = t
             .select(vec![col("c1")])
             .unwrap()
             .distinct()
             .unwrap()
+            // try to sort on some value not present in input to distinct
             .sort(vec![col("c2").sort(true, true)])

Review Comment:
   This is a newly added test in https://github.com/apache/arrow-datafusion/pull/5258 
   
   I think the answer is wrong in this case - in particular you can see there are duplicate values of `c1` produced.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org