jonathanc-n commented on code in PR #16391:
URL: https://github.com/apache/datafusion/pull/16391#discussion_r2144430651


##########
datafusion/functions-table/src/generate_series.rs:
##########
@@ -197,11 +197,17 @@ impl TableFunctionImpl for GenerateSeriesFuncImpl {
         }
 
         let mut normalize_args = Vec::new();
-        for expr in exprs {
+        for (expr_indice, expr) in exprs.iter().enumerate() {
             match expr {
                 Expr::Literal(ScalarValue::Null, _) => {}
                 Expr::Literal(ScalarValue::Int64(Some(n)), _) => 
normalize_args.push(*n),
-                _ => return plan_err!("First argument must be an integer 
literal"),
+                other => {
+                    return plan_err!(
+                        "Argument #{} must be an integer literal or null 
value, got {:?}",

Review Comment:
   Is there a better way to word this, `Argument #...` seems awkward 🤷 



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