ratmice commented on code in PR #23904:
URL: https://github.com/apache/datafusion/pull/23904#discussion_r3653325615
##########
datafusion-cli/examples/cli-custom-udf.rs:
##########
@@ -31,6 +31,7 @@ static GLOBAL: MiMalloc = MiMalloc;
#[derive(Debug, Parser, PartialEq)]
#[clap(author, version, about, long_about= None)]
struct CustomArgs {
+ // Shown is one way to avoid clashing arguments between datafusion and the
custom command.
Review Comment:
FWIW, I'm not totally sold that the contortions here required to get clap to
avoid clashing
arguments are really worthwhile, they add considerable complexity over the
simple `#[command(flatten)]`
which gets used in the example that doesn't add additional arguments.
But it felt like it was worth trying to come up with an example that
composed the arguments in a way
which cannot possibly clash when `CliArgs` inevitably adds an additional
argument.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]