File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ version = "0.2.2"
1717arrow-flight = { version = " 54.1.0" , features = [
1818 " flight-sql-experimental" ,
1919], optional = true }
20- axum = " 0.8.1"
20+ axum = { version = " 0.8.1" , optional = true }
2121clap = { version = " 4.5.27" , features = [" derive" ] }
2222color-eyre = " 0.6.3"
2323crossterm = { version = " 0.28.1" , features = [" event-stream" ] }
@@ -75,6 +75,7 @@ flightsql = [
7575]
7676functions-json = [" datafusion-app/functions-json" ]
7777functions-parquet = [" datafusion-app/functions-parquet" ]
78+ http = [" axum" ]
7879hudi = [" datafusion-app/hudi" ]
7980huggingface = [" datafusion-app/huggingface" ]
8081iceberg = [" datafusion-app/iceberg" ]
Original file line number Diff line number Diff line change @@ -120,6 +120,11 @@ impl DftArgs {
120120
121121#[ derive( Clone , Debug , Subcommand ) ]
122122pub enum Command {
123+ /// Start a HTTP server
124+ ServeHttp {
125+ #[ clap( short, long) ]
126+ config : Option < String > ,
127+ } ,
123128 /// Start a FlightSQL server
124129 ServeFlightSql {
125130 #[ clap( short, long) ]
Original file line number Diff line number Diff line change 1+ // Licensed to the Apache Software Foundation (ASF) under one
2+ // or more contributor license agreements. See the NOTICE file
3+ // distributed with this work for additional information
4+ // regarding copyright ownership. The ASF licenses this file
5+ // to you under the Apache License, Version 2.0 (the
6+ // "License"); you may not use this file except in compliance
7+ // with the License. You may obtain a copy of the License at
8+ //
9+ // http://www.apache.org/licenses/LICENSE-2.0
10+ //
11+ // Unless required by applicable law or agreed to in writing,
12+ // software distributed under the License is distributed on an
13+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+ // KIND, either express or implied. See the License for the
15+ // specific language governing permissions and limitations
16+ // under the License.
17+
18+ use crate :: { args:: DftArgs , config:: AppConfig } ;
19+ use color_eyre:: Result ;
20+
21+ pub async fn try_run ( cli : DftArgs , config : AppConfig ) -> Result < ( ) > {
22+ Ok ( ( ) )
23+ }
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ pub mod config;
44pub mod execution;
55#[ cfg( feature = "flightsql" ) ]
66pub mod flightsql_server;
7+ #[ cfg( feature = "http" ) ]
8+ pub mod http_server;
79pub mod telemetry;
810pub mod test_utils;
911pub mod tui;
Original file line number Diff line number Diff line change 1818use clap:: Parser ;
1919use color_eyre:: Result ;
2020#[ cfg( feature = "flightsql" ) ]
21- use datafusion_dft:: { args:: Command , flightsql_server} ;
21+ use datafusion_dft:: { args:: Command , flightsql_server, http_server } ;
2222use datafusion_dft:: { args:: DftArgs , cli, config:: create_config, tui} ;
2323
2424fn main ( ) -> Result < ( ) > {
@@ -58,6 +58,11 @@ async fn app_entry_point(cli: DftArgs) -> Result<()> {
5858 if let Some ( Command :: ServeFlightSql { .. } ) = cli. command {
5959 flightsql_server:: try_run ( cli. clone ( ) , cfg. clone ( ) ) . await ?;
6060 }
61+ #[ cfg( feature = "http" ) ]
62+ if let Some ( Command :: ServeHttp { .. } ) = cli. command {
63+ http_server:: try_run ( cli. clone ( ) , cfg. clone ( ) ) . await ?;
64+ }
65+
6166 if !cli. files . is_empty ( ) || !cli. commands . is_empty ( ) {
6267 cli:: try_run ( cli, cfg) . await ?;
6368 } else {
You can’t perform that action at this time.
0 commit comments