sarutak commented on PR #7663:
URL:
https://github.com/apache/arrow-datafusion/pull/7663#issuecomment-1745264936
Oh, wait. Clippy raises some warnings.
```
error: this expression creates a reference which is immediately dereferenced
by the compiler
-->
datafusion/core/src/datasource/avro_to_arrow/arrow_array_reader.rs:115:29
|
115 | ... &parent_field_name,
| ^^^^^^^^^^^^^^^^^^ help: change this to:
`parent_field_name`
|
= help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
error: redundant closure
-->
datafusion/core/src/datasource/avro_to_arrow/arrow_array_reader.rs:595:38
|
595 | ... .map(|v| maybe_resolve_union(v))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace
the closure with the function itself: `maybe_resolve_union`
|
= help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-D clippy::redundant-closure` implied by `-D warnings`
error: could not compile `datafusion` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: the borrowed expression implements the required traits
-->
datafusion/core/src/datasource/avro_to_arrow/arrow_array_reader.rs:1189:40
|
1189 | let r1 = apache_avro::to_value(&serde_json::json!({
| ________________________________________^
1190 | | "headers": [
1191 | | {
1192 | | "name": "a",
... |
1195 | | ]
1196 | | }))
| |__________^
|
= help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
help: change this to
|
1189 ~ let r1 = apache_avro::to_value(serde_json::json!({
1190 + "headers": [
1191 + {
1192 + "name": "a",
1193 + "value": "b"
1194 + }
1195 + ]
1196 ~ }))
|
error: the borrowed expression implements the required traits
-->
datafusion/core/src/datasource/avro_to_arrow/arrow_array_reader.rs:1407:40
|
1407 | let r1 = apache_avro::to_value(&jv1)
| ^^^^ help: change this to:
`jv1`
|
= help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
error: could not compile `datafusion` (lib test) due to 4 previous errors
```
@Samrose-Ahmed Could you fix them? Also you can check the style locally by
running `ci/scripts/rust_clippy.sh` and `ci/scripts/rust_fmt.sh`.
--
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]