Skip to content

Allow ORDER BY to see projection names #2391

Allow ORDER BY to see projection names

Allow ORDER BY to see projection names #2391

GitHub Actions / clippy succeeded Feb 6, 2024 in 1s

clippy

26 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 26
Note 0
Help 0

Versions

  • rustc 1.75.0 (82e1608df 2023-12-21)
  • cargo 1.75.0 (1d8b05cdd 2023-11-20)
  • clippy 0.1.75 (82e1608 2023-12-21)

Annotations

Check warning on line 134 in partiql-eval/src/eval/expr/path.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> partiql-eval/src/eval/expr/path.rs:132:18
    |
132 |                   .fold(Some(owned), |v, path| {
    |  __________________^
133 | |                     v.and_then(|v| path.take_val(v, bindings, ctx))
134 | |                 })
    | |__________________^ help: use `try_fold` instead: `try_fold(owned, |v, path| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold

Check warning on line 127 in partiql-eval/src/eval/expr/path.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> partiql-eval/src/eval/expr/path.rs:125:18
    |
125 |                   .fold(Some(borrowed), |v, path| {
    |  __________________^
126 | |                     v.and_then(|v| path.get_val(v, bindings, ctx))
127 | |                 })
    | |__________________^ help: use `try_fold` instead: `try_fold(borrowed, |v, path| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
    = note: `#[warn(clippy::manual_try_fold)]` on by default

Check warning on line 343 in partiql-logical-planner/src/lower.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> partiql-logical-planner/src/lower.rs:339:42
    |
339 |                   let name_ref: &NameRef = &key_schema
    |  __________________________________________^
340 | |                     .consume
341 | |                     .iter()
342 | |                     .find(|name_ref| name_ref.sym == varref.name)
343 | |                     .expect("NameRef");
    | |______________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `#[warn(clippy::needless_borrow)]` on by default
help: change this to
    |
339 ~                 let name_ref: &NameRef = key_schema
340 +                     .consume
341 +                     .iter()
342 +                     .find(|name_ref| name_ref.sym == varref.name)
343 ~                     .expect("NameRef");
    |

Check warning on line 292 in partiql-logical-planner/src/lower.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `binding_to_symprim` is never used

warning: function `binding_to_symprim` is never used
   --> partiql-logical-planner/src/lower.rs:292:12
    |
292 |         fn binding_to_symprim<'a>(binding: &'a BindingsName<'a>) -> SymbolPrimitive {
    |            ^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 914 in partiql-logical-planner/src/lower.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `vrtype`

warning: unused variable: `vrtype`
   --> partiql-logical-planner/src/lower.rs:914:56
    |
914 |                         if let ValueExpr::VarRef(name, vrtype) = &value {
    |                                                        ^^^^^^ help: if this is intentional, prefix it with an underscore: `_vrtype`

Check warning on line 359 in partiql-logical-planner/src/lower.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused variable: `k`

warning: unused variable: `k`
   --> partiql-logical-planner/src/lower.rs:359:32
    |
359 |                         .map(|(k, v)| binding_to_static(v))
    |                                ^ help: if this is intentional, prefix it with an underscore: `_k`
    |
    = note: `#[warn(unused_variables)]` on by default

Check warning on line 35 in partiql-logical-planner/src/lower.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `NameLookup`

warning: unused import: `NameLookup`
  --> partiql-logical-planner/src/lower.rs:35:41
   |
35 | use partiql_ast_passes::name_resolver::{NameLookup, NameRef};
   |                                         ^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

Check warning on line 3 in partiql-eval/src/eval/expr/path.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `BorrowMut`

warning: unused import: `BorrowMut`
 --> partiql-eval/src/eval/expr/path.rs:3:32
  |
3 | pub use core::borrow::{Borrow, BorrowMut};
  |                                ^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 47881 in /home/runner/work/partiql-lang-rust/partiql-lang-rust/target/debug/build/partiql-parser-b7f563fc44f4149d/out/partiql.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant pattern matching, consider using `is_some()`

warning: redundant pattern matching, consider using `is_some()`
     --> /home/runner/work/partiql-lang-rust/partiql-lang-rust/target/debug/build/partiql-parser-b7f563fc44f4149d/out/partiql.rs:47881:25
      |
47881 |         let recursive = matches!(rec, Some(_));
      |                         ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rec.is_some()`
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
      = note: `#[warn(clippy::redundant_pattern_matching)]` on by default

Check warning on line 209 in extension/partiql-extension-visualize/src/plan_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
   --> extension/partiql-extension-visualize/src/plan_to_dot.rs:209:9
    |
209 |         return String::from_utf8(output_bytes).expect("invalid utf8");
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
209 -         return String::from_utf8(output_bytes).expect("invalid utf8");
209 +         String::from_utf8(output_bytes).expect("invalid utf8")
    |

Check warning on line 167 in extension/partiql-extension-visualize/src/plan_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

returning the result of a `let` binding from a block

warning: returning the result of a `let` binding from a block
   --> extension/partiql-extension-visualize/src/plan_to_dot.rs:167:13
    |
166 |             let expr = expr.replace('>', "\\>");
    |             ------------------------------------ unnecessary `let` binding
167 |             expr
    |             ^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
    = note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
    |
166 ~             
167 ~             expr.replace('>', "\\>")
    |

Check warning on line 139 in extension/partiql-extension-visualize/src/plan_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> extension/partiql-extension-visualize/src/plan_to_dot.rs:139:25
    |
139 |             .set_label(&format!("{label}"));
    |                         ^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `label.to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 112 in extension/partiql-extension-visualize/src/plan_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> extension/partiql-extension-visualize/src/plan_to_dot.rs:112:17
    |
112 |                 format!("{{project  * }}")
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"{project  * }".to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Check warning on line 97 in extension/partiql-extension-visualize/src/plan_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

warning: redundant closure
  --> extension/partiql-extension-visualize/src/plan_to_dot.rs:97:30
   |
97 |                         .map(|e| expr_to_str(e))
   |                              ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `expr_to_str`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
   = note: `#[warn(clippy::redundant_closure)]` on by default

Check warning on line 77 in extension/partiql-extension-visualize/src/plan_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> extension/partiql-extension-visualize/src/plan_to_dot.rs:77:67
   |
77 |                         .map(|e| format!("offset {}", expr_to_str(&e))),
   |                                                                   ^^ help: change this to: `e`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 74 in extension/partiql-extension-visualize/src/plan_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
  --> extension/partiql-extension-visualize/src/plan_to_dot.rs:74:66
   |
74 |                         .map(|e| format!("limit {}", expr_to_str(&e))),
   |                                                                  ^^ help: change this to: `e`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 17 in extension/partiql-extension-visualize/src/plan_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> extension/partiql-extension-visualize/src/plan_to_dot.rs:13:1
   |
13 | / impl Default for PlanToDot {
14 | |     fn default() -> Self {
15 | |         PlanToDot {}
16 | |     }
17 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = help: remove the manual implementation...
help: ...and instead derive it
   |
11 + #[derive(Default)]
12 | pub struct PlanToDot {}
   |

Check warning on line 458 in extension/partiql-extension-visualize/src/ast_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

useless use of `format!`

warning: useless use of `format!`
   --> extension/partiql-extension-visualize/src/ast_to_dot.rs:458:45
    |
458 |         CaseSensitivity::CaseInsensitive => format!("{}", sym.value),
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `sym.value.to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
    = note: `#[warn(clippy::useless_format)]` on by default

Check warning on line 136 in extension/partiql-extension-visualize/src/ast_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> extension/partiql-extension-visualize/src/ast_to_dot.rs:136:43
    |
136 |             Some(ast) => self.to_dot(out, &ast),
    |                                           ^^^^ help: change this to: `ast`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 123 in extension/partiql-extension-visualize/src/ast_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> extension/partiql-extension-visualize/src/ast_to_dot.rs:123:41
    |
123 |             res.extend(self.to_dot(out, &ast));
    |                                         ^^^^ help: change this to: `ast`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `#[warn(clippy::needless_borrow)]` on by default

Check warning on line 99 in extension/partiql-extension-visualize/src/ast_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

warning: unneeded `return` statement
  --> extension/partiql-extension-visualize/src/ast_to_dot.rs:99:9
   |
99 |         return String::from_utf8(output_bytes).expect("invalid utf8");
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
   = note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
   |
99 -         return String::from_utf8(output_bytes).expect("invalid utf8");
99 +         String::from_utf8(output_bytes).expect("invalid utf8")
   |

Check warning on line 66 in extension/partiql-extension-visualize/src/ast_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> extension/partiql-extension-visualize/src/ast_to_dot.rs:62:1
   |
62 | / impl Default for AstToDot {
63 | |     fn default() -> Self {
64 | |         AstToDot {}
65 | |     }
66 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = note: `#[warn(clippy::derivable_impls)]` on by default
   = help: remove the manual implementation...
help: ...and instead derive it
   |
60 + #[derive(Default)]
61 | pub struct AstToDot {}
   |

Check warning on line 52 in extension/partiql-extension-visualize/src/ast_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> extension/partiql-extension-visualize/src/ast_to_dot.rs:52:29
   |
52 |             out.edge(&from, &target).attributes().set_label(lbl);
   |                             ^^^^^^^ help: change this to: `target`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 52 in extension/partiql-extension-visualize/src/ast_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> extension/partiql-extension-visualize/src/ast_to_dot.rs:52:22
   |
52 |             out.edge(&from, &target).attributes().set_label(lbl);
   |                      ^^^^^ help: change this to: `from`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
   = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default

Check warning on line 32 in extension/partiql-extension-visualize/src/ast_to_dot.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

single-character string constant used as pattern

warning: single-character string constant used as pattern
  --> extension/partiql-extension-visualize/src/ast_to_dot.rs:32:48
   |
32 |         cluster.set("label", lbl, lbl.contains(" "));
   |                                                ^^^ help: try using a `char` instead: `' '`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
   = note: `#[warn(clippy::single_char_pattern)]` on by default