findepi commented on code in PR #17643:
URL: https://github.com/apache/datafusion/pull/17643#discussion_r2363208053
##########
datafusion-examples/examples/flight/flight_server.rs:
##########
@@ -98,7 +99,7 @@ impl FlightService for FlightServiceImpl {
let df = ctx.sql(sql).await.map_err(to_tonic_err)?;
// execute the query
- let schema = df.schema().clone().into();
+ let schema: SchemaRef = df.schema().into();
Review Comment:
@Dandandan you're right. Here the explicit annotation as `SchemaRef` is
needed because the variable is later used to invoke `schema: &Schema`.
In some places the `SchemaRef` is required by the callee (e.g.
`RecordBatch::try_new`) and then no explicit type annotation is needed.
--
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]