File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/query/expression/src/utils Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ use tonic::metadata::MetadataKey;
3737use tonic:: metadata:: MetadataMap ;
3838use tonic:: metadata:: MetadataValue ;
3939use tonic:: transport:: channel:: Channel ;
40+ use tonic:: transport:: ClientTlsConfig ;
4041use tonic:: transport:: Endpoint ;
4142use tonic:: Request ;
4243
@@ -65,6 +66,7 @@ impl UDFFlightClient {
6566 request_timeout : u64 ,
6667 batch_rows : u64 ,
6768 ) -> Result < UDFFlightClient > {
69+ let tls_config = ClientTlsConfig :: new ( ) . with_native_roots ( ) ;
6870 let endpoint = Endpoint :: from_shared ( addr. to_string ( ) )
6971 . map_err ( |err| {
7072 ErrorCode :: UDFServerConnectError ( format ! ( "Invalid UDF Server address: {err}" ) )
@@ -78,7 +80,11 @@ impl UDFFlightClient {
7880 . tcp_keepalive ( Some ( Duration :: from_secs ( UDF_TCP_KEEP_ALIVE_SEC ) ) )
7981 . http2_keep_alive_interval ( Duration :: from_secs ( UDF_HTTP2_KEEP_ALIVE_INTERVAL_SEC ) )
8082 . keep_alive_timeout ( Duration :: from_secs ( UDF_KEEP_ALIVE_TIMEOUT_SEC ) )
81- . keep_alive_while_idle ( true ) ;
83+ . keep_alive_while_idle ( true )
84+ . tls_config ( tls_config)
85+ . map_err ( |err| {
86+ ErrorCode :: UDFServerConnectError ( format ! ( "Invalid UDF Client TLS Config: {err}" ) )
87+ } ) ?;
8288
8389 let mut connector = HttpConnector :: new_with_resolver ( DNSService ) ;
8490 connector. enforce_http ( false ) ;
You can’t perform that action at this time.
0 commit comments