jcsherin commented on issue #11433:
URL: https://github.com/apache/datafusion/issues/11433#issuecomment-2225700932

   For comparison I ran a few queries from #11299 with `nth_value`. This looks 
right to me.
   
   ```sql
   DataFusion CLI v40.0.0
   > create table t(a int, b float, c bigint) as values (1, 1.2, 2);
   0 row(s) fetched. 
   
   > select nth_value(a, 1) from t where a > 2;
   +-------------------------+
   | nth_value(t.a,Int64(1)) |
   +-------------------------+
   |                         |
   +-------------------------+
   1 row(s) fetched.
   
   > select nth_value(a, 1), count(1) from t where a > 3 group by a;
   +-------------------------+-----------------+
   | nth_value(t.a,Int64(1)) | count(Int64(1)) |
   +-------------------------+-----------------+
   +-------------------------+-----------------+
   0 row(s) fetched.
   
   > select nth_value(a, 1), count(1) from t where a > 3;
   +-------------------------+-----------------+
   | nth_value(t.a,Int64(1)) | count(Int64(1)) |
   +-------------------------+-----------------+
   |                         | 0               |
   +-------------------------+-----------------+
   1 row(s) fetched.
   
   > select nth_value(a, 1 order by a desc), count(1) from t where a > 2;
   +---------------------------------------------------------+-----------------+
   | nth_value(t.a,Int64(1)) ORDER BY [t.a DESC NULLS FIRST] | count(Int64(1)) |
   +---------------------------------------------------------+-----------------+
   |                                                         | 0               |
   +---------------------------------------------------------+-----------------+
   1 row(s) fetched.   
   ```


-- 
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-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to