You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/args.rs
+21-3Lines changed: 21 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -127,22 +127,40 @@ impl DftArgs {
127
127
}
128
128
}
129
129
130
+
/// Parameters for each command match to exactly how they are defined in specification (https://arrow.apache.org/docs/format/FlightSql.html#protocol-buffer-definitions)
130
131
#[derive(Clone,Debug,Subcommand)]
131
132
pubenumFlightSqlCommand{
132
133
/// Executes `CommandStatementQuery` and `DoGet` to return results
133
134
StatementQuery{
134
135
/// The query to execute
136
+
#[clap(long)]
135
137
sql:String,
136
138
},
137
139
/// Executes `CommandGetCatalogs` and `DoGet` to return results
138
140
GetCatalogs,
139
141
/// Executes `CommandGetDbSchemas` and `DoGet` to return results
140
142
GetDbSchemas{
141
143
/// The catalog to retrieve schemas
142
-
#[clap(long, short)]
144
+
#[clap(long)]
143
145
catalog:Option<String>,
144
-
#[clap(long, short)]
145
-
schema_pattern:Option<String>,
146
+
/// Schema filter pattern to apply
147
+
#[clap(long)]
148
+
db_schema_filter_pattern:Option<String>,
149
+
},
150
+
/// Executes `CommandGetDbSchemas` and `DoGet` to return results
@@ -264,16 +269,85 @@ impl FlightSqlService for FlightSqlServiceImpl {
264
269
(Some(catalog),None) => format!("SELECT DISTINCT table_catalog, table_schema FROM information_schema.tables WHERE table_catalog = '{catalog}' ORDER BY table_catalog, table_schema"),
265
270
(None,None) => "SELECT DISTINCT table_catalog, table_schema FROM information_schema.tables ORDER BY table_catalog, table_schema".to_string()
266
271
};
267
-
println!("QUERY: {query}");
268
272
let res = self.create_flight_info(query, request_id, request).await;
269
273
270
274
// TODO: Move recording to after response is sent to not impact response latency
0 commit comments