comphead commented on code in PR #9991:
URL: https://github.com/apache/arrow-datafusion/pull/9991#discussion_r1559866209


##########
datafusion/sqllogictest/test_files/aggregate.slt:
##########
@@ -3428,3 +3428,16 @@ SELECT LAST_VALUE(column1 ORDER BY column2 DESC) IGNORE 
NULLS FROM t;
 
 statement ok
 DROP TABLE t;
+
+# Test for IGNORE NULLS / ORDER BY not implemented
+statement error DataFusion error: This feature is not implemented: IGNORE 
NULLS is not implemented for COUNT
+SELECT COUNT(*) IGNORE NULLS FROM (values (1), (null), (2));

Review Comment:
   Queries like that should fail by the invalid syntax and this is parsers work 
to stop it IMHO. And spark doesn't allow query like that, it fails on query 
compile stage. 
   
   ```
   scala> spark.sql("SELECT COUNT(*) IGNORE NULLS over () FROM (values (1), 
(null), (2));").show(false)
   org.apache.spark.sql.AnalysisException: Function count does not support 
IGNORE NULLS.; line 1 pos 7
     at 
org.apache.spark.sql.errors.QueryCompilationErrors$.functionWithUnsupportedSyntaxError(QueryCompilationErrors.scala:602)
   ```



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

Reply via email to