mustafasrepo commented on code in PR #8559:
URL: https://github.com/apache/arrow-datafusion/pull/8559#discussion_r1429121784
##########
datafusion/sql/src/expr/function.rs:
##########
@@ -90,6 +90,8 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
let partition_by = window
.partition_by
.into_iter()
+ //ignore window spec PARTITION BY for scalar values
+ .filter(|e| !matches!(e, sqlparser::ast::Expr::Value { .. },))
.map(|e| self.sql_expr_to_logical_expr(e, schema,
planner_context))
.collect::<Result<Vec<_>>>()?;
let mut order_by = self.order_by_to_sort_expr(
Review Comment:
According to test it seems that we have no problem with ScalarValues inside
window `order_by`. However, I think we can apply similar filtering done for
`window.partition_by` to the `window.order_by`.
--
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]