andygrove commented on code in PR #3208:
URL: https://github.com/apache/arrow-datafusion/pull/3208#discussion_r950157361


##########
datafusion/sql/src/planner.rs:
##########
@@ -973,6 +973,20 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
         alias: Option<String>,
         outer_query_schema: Option<&DFSchema>,
     ) -> Result<LogicalPlan> {
+        // check for unsupported syntax first
+        if !select.cluster_by.is_empty() {
+            return Err(DataFusionError::NotImplemented("CLUSTER 
BY".to_string()));
+        }
+        if !select.lateral_views.is_empty() {
+            return Err(DataFusionError::NotImplemented("LATERAL 
VIEWS".to_string()));
+        }
+        if select.qualify.is_some() {
+            return Err(DataFusionError::NotImplemented("QUALIFY".to_string()));
+        }
+        if select.top.is_some() {
+            return Err(DataFusionError::NotImplemented("TOP".to_string()));
+        }

Review Comment:
   We were previously just ignoring these fields so I think it is better to 
error if they are set and we don't support them



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