@@ -92,28 +92,25 @@ pub struct DftArgs {
9292 #[ clap( short = 'n' , help = "Set the number of benchmark iterations to run" ) ]
9393 pub benchmark_iterations : Option < usize > ,
9494
95- #[ cfg( any( feature = "flightsql" , feature = "http" ) ) ]
96- #[ clap(
97- long,
98- global = true ,
99- help = "Set the host and port to be used for server"
100- ) ]
101- pub host : Option < String > ,
102-
10395 #[ clap(
10496 long,
10597 short,
10698 help = "Path to save output to. Type is inferred from file suffix"
10799 ) ]
108100 pub output : Option < PathBuf > ,
109101
102+ #[ cfg( any( feature = "flightsql" , feature = "http" ) ) ]
110103 #[ command( subcommand) ]
111104 pub command : Option < Command > ,
112105}
113106
114107impl DftArgs {
115108 pub fn config_path ( & self ) -> PathBuf {
116- if let Some ( Command :: ServeFlightSql { config : Some ( cfg) } ) = & self . command {
109+ #[ cfg( any( feature = "flightsql" , feature = "http" ) ) ]
110+ if let Some ( Command :: ServeFlightSql {
111+ config : Some ( cfg) , ..
112+ } ) = & self . command
113+ {
117114 return Path :: new ( cfg) . to_path_buf ( ) ;
118115 }
119116 if let Some ( config) = self . config . as_ref ( ) {
@@ -132,12 +129,24 @@ pub enum Command {
132129 ServeHttp {
133130 #[ clap( short, long) ]
134131 config : Option < String > ,
132+ #[ clap(
133+ long,
134+ global = true ,
135+ help = "Set the host and port to be used for server"
136+ ) ]
137+ host : Option < String > ,
135138 } ,
136139 /// Start a FlightSQL server
137140 #[ command( name = "serve-flightsql" ) ]
138141 ServeFlightSql {
139142 #[ clap( short, long) ]
140143 config : Option < String > ,
144+ #[ clap(
145+ long,
146+ global = true ,
147+ help = "Set the host and port to be used for server"
148+ ) ]
149+ host : Option < String > ,
141150 } ,
142151}
143152
0 commit comments