crepererum commented on code in PR #12076: URL: https://github.com/apache/datafusion/pull/12076#discussion_r1723241542
########## datafusion/physical-plan/src/windows/mod.rs: ########## @@ -283,7 +283,11 @@ fn create_built_in_window_expr( args[1] .as_any() .downcast_ref::<Literal>() - .unwrap() + .ok_or_else(|| { + DataFusionError::Execution( + "Expected a signed integer literal for the second argument of nth_value".to_string(), Review Comment: It might be helpful to include the actual value in here. `PhysicalExpr` implements `Display`, so it should be rather easy to generate a string from that. -- 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