eliaperantoni commented on issue #14432: URL: https://github.com/apache/datafusion/issues/14432#issuecomment-2658498131
Hey @Chen-Yuan-Lai, absolutely no problem! Was checking in to see if you needed any help 😊. I see, that's a bit unfortunate. It seems like the first message is produced by a function called `take_function_args` and the second by one called `function_length_check`. I see that `take_function_args` is receiving a lot of attention lately #14525. Perhaps you should attach a `Diagnostic` in the body of that function, and maybe you could even replace that where `function_length_check` is used, so that you can remove it? Then the problem would be to get the `Span` to `take_function_args`, but maybe you could make it take an optional `function_call_site: Option<Span>` argument and then pass it in wherever possible, but without requiring _all_ callers of `take_function_args` to pass it, because maybe sometimes it's just being used for a quick assertion. > I always get "expected diagnostic" error even though I have attached Diagnostic That probably has something to do with the implementation of `DataFusionError::iter` and `DataFusionError::diagnostic`: they might not be able to unwrap the `Diagnostic` from the layers that compose the error. Have you tried `dbg!`-ing the error that you get in the test, to see if it contains a `DataFusionError::Diagnostic` somewhere? -- 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