Skip to content

Initial Implementation of ExistsQuery #3187

Initial Implementation of ExistsQuery

Initial Implementation of ExistsQuery #3187

Triggered via pull request August 29, 2023 21:01
Status Success
Total duration 1h 15m 54s
Artifacts

coverage.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

30 warnings
an array of `Range` that is only one element: src/snippet/mod.rs#L684
warning: an array of `Range` that is only one element --> src/snippet/mod.rs:684:66 | 684 | assert_eq!(&collapse_overlapped_ranges(&[0..3, 1..2,]), &[0..3]); | ^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init help: if you wanted a `Vec` that contains the entire range, try | 684 | assert_eq!(&collapse_overlapped_ranges(&[0..3, 1..2,]), &(0..3).collect::<std::vec::Vec<usize>>()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: if you wanted an array of len 3, try | 684 | assert_eq!(&collapse_overlapped_ranges(&[0..3, 1..2,]), &[0; 3]); | ~~~~
an array of `Range` that is only one element: src/snippet/mod.rs#L683
warning: an array of `Range` that is only one element --> src/snippet/mod.rs:683:66 | 683 | assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..3,]), &[0..3]); | ^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init help: if you wanted a `Vec` that contains the entire range, try | 683 | assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..3,]), &(0..3).collect::<std::vec::Vec<usize>>()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: if you wanted an array of len 3, try | 683 | assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..3,]), &[0; 3]); | ~~~~
an array of `Range` that is only one element: src/snippet/mod.rs#L682
warning: an array of `Range` that is only one element --> src/snippet/mod.rs:682:66 | 682 | assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..2,]), &[0..2]); | ^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init = note: `#[warn(clippy::single_range_in_vec_init)]` on by default help: if you wanted a `Vec` that contains the entire range, try | 682 | assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..2,]), &(0..2).collect::<std::vec::Vec<usize>>()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ help: if you wanted an array of len 2, try | 682 | assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..2,]), &[0; 2]); | ~~~~
useless use of `vec!`: src/query/phrase_query/mod.rs#L78
warning: useless use of `vec!` --> src/query/phrase_query/mod.rs:78:32 | 78 | let terms: Vec<Term> = vec!["a", "b", "c"] | ^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["a", "b", "c"]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
unneeded `return` statement: src/query/exist_query.rs#L80
warning: unneeded `return` statement --> src/query/exist_query.rs:80:13 | 80 | / return Err(TantivyError::SchemaError(format!( 81 | | "Field {:?} with type {:?} is not supported by exists query.", 82 | | self.field, self.field_type, 83 | | ))); | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 80 ~ Err(TantivyError::SchemaError(format!( 81 + "Field {:?} with type {:?} is not supported by exists query.", 82 + self.field, self.field_type, 83 ~ ))) |
unneeded `return` statement: src/query/exist_query.rs#L78
warning: unneeded `return` statement --> src/query/exist_query.rs:78:13 | 78 | return Ok(Box::new(ConstScorer::new(docset, boost))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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` | 78 - return Ok(Box::new(ConstScorer::new(docset, boost))); 78 + Ok(Box::new(ConstScorer::new(docset, boost))) |
useless use of `vec!`: src/positions/mod.rs#L122
warning: useless use of `vec!` --> src/positions/mod.rs:122:43 | 122 | let mut output_delta_pos_buffer = vec![0u32; 5]; | ^^^^^^^^^^^^^ help: you can use an array directly: `[0u32; 5]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
useless use of `vec!`: src/fastfield/mod.rs#L1016
warning: useless use of `vec!` --> src/fastfield/mod.rs:1016:23 | 1016 | let numbers = vec![1000, 1001, 1003]; | ^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[1000, 1001, 1003]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
useless use of `vec!`: src/fastfield/mod.rs#L942
warning: useless use of `vec!` --> src/fastfield/mod.rs:942:23 | 942 | let numbers = vec![100, 200, 300]; | ^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[100, 200, 300]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
useless use of `vec!`: src/aggregation/metric/percentiles.rs#L502
warning: useless use of `vec!` --> src/aggregation/metric/percentiles.rs:502:37 | 502 | let num_values_in_segment = vec![100, 30_000, 8000]; | ^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[100, 30_000, 8000]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec = note: `#[warn(clippy::useless_vec)]` on by default
unneeded `return` statement: src/query/exist_query.rs#L80
warning: unneeded `return` statement --> src/query/exist_query.rs:80:13 | 80 | / return Err(TantivyError::SchemaError(format!( 81 | | "Field {:?} with type {:?} is not supported by exists query.", 82 | | self.field, self.field_type, 83 | | ))); | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 80 ~ Err(TantivyError::SchemaError(format!( 81 + "Field {:?} with type {:?} is not supported by exists query.", 82 + self.field, self.field_type, 83 ~ ))) |
unneeded `return` statement: src/query/exist_query.rs#L78
warning: unneeded `return` statement --> src/query/exist_query.rs:78:13 | 78 | return Ok(Box::new(ConstScorer::new(docset, boost))); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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` | 78 - return Ok(Box::new(ConstScorer::new(docset, boost))); 78 + Ok(Box::new(ConstScorer::new(docset, boost))) |
associated function `new_exists_query` is never used: src/query/exist_query.rs#L27
warning: associated function `new_exists_query` is never used --> src/query/exist_query.rs:27:12 | 22 | impl ExistsQuery { | ---------------- associated function in this implementation ... 27 | pub fn new_exists_query(field: String) -> ExistsQuery { | ^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
unnecessary hashes around raw string literal: src/schema/schema.rs#L518
warning: unnecessary hashes around raw string literal --> src/schema/schema.rs:518:50 | 518 | assert_eq!(&super::locate_splitting_dots(r#"a\..b.c"#), &[3, 5]); | ^^^^^^^^^^^^ help: try: `r"a\..b.c"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/schema/schema.rs#L517
warning: unnecessary hashes around raw string literal --> src/schema/schema.rs:517:50 | 517 | assert_eq!(&super::locate_splitting_dots(r#"a\.b.c"#), &[4]); | ^^^^^^^^^^^ help: try: `r"a\.b.c"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/query/query_parser/query_parser.rs#L1737
warning: unnecessary hashes around raw string literal --> src/query/query_parser/query_parser.rs:1737:46 | 1737 | let query = query_parser.parse_query(r#"a\.b:hello"#).unwrap(); | ^^^^^^^^^^^^^^^ help: try: `r"a\.b:hello"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/query/query_parser/query_parser.rs#L1734
warning: unnecessary hashes around raw string literal --> src/query/query_parser/query_parser.rs:1734:39 | 1734 | schema_builder.add_text_field(r#"a\.b"#, STRING); | ^^^^^^^^^ help: try: `r"a\.b"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/query/query_parser/query_parser.rs#L1308
warning: unnecessary hashes around raw string literal --> src/query/query_parser/query_parser.rs:1308:42 | 1308 | extract_query_term_json_path(r#"json.k8s\.node\.name:hello"#), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r"json.k8s\.node\.name:hello"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/fastfield/mod.rs#L1101
warning: unnecessary hashes around raw string literal --> src/fastfield/mod.rs:1101:32 | 1101 | .column_opt::<i64>(r#"json.attr\.age"#) | ^^^^^^^^^^^^^^^^^^^ help: try: `r"json.attr\.age"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
private item shadows public glob re-export: src/aggregation/bucket/mod.rs#L33
warning: private item shadows public glob re-export --> src/aggregation/bucket/mod.rs:33:16 | 33 | pub(crate) use range::SegmentRangeCollector; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the name `SegmentRangeCollector` in the type namespace is supposed to be publicly re-exported here --> src/aggregation/bucket/mod.rs:34:9 | 34 | pub use range::*; | ^^^^^^^^ note: but the private item here shadows it --> src/aggregation/bucket/mod.rs:33:16 | 33 | pub(crate) use range::SegmentRangeCollector; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private item shadows public glob re-export: src/aggregation/bucket/mod.rs#L31
warning: private item shadows public glob re-export --> src/aggregation/bucket/mod.rs:31:16 | 31 | pub(crate) use histogram::SegmentHistogramCollector; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the name `SegmentHistogramCollector` in the type namespace is supposed to be publicly re-exported here --> src/aggregation/bucket/mod.rs:32:9 | 32 | pub use histogram::*; | ^^^^^^^^^^^^ note: but the private item here shadows it --> src/aggregation/bucket/mod.rs:31:16 | 31 | pub(crate) use histogram::SegmentHistogramCollector; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: `#[warn(hidden_glob_reexports)]` on by default
unnecessary hashes around raw string literal: src/indexer/mod.rs#L130
warning: unnecessary hashes around raw string literal --> src/indexer/mod.rs:130:30 | 130 | .parse_query(r#"json.k8s\.container\.name:prometheus"#) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r"json.k8s\.container\.name:prometheus"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/indexer/mod.rs#L92
warning: unnecessary hashes around raw string literal --> src/indexer/mod.rs:92:30 | 92 | .parse_query(r#"json.k8s\.container\.name:prometheus"#) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r"json.k8s\.container\.name:prometheus"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/core/json_utils.rs#L636
warning: unnecessary hashes around raw string literal --> src/core/json_utils.rs:636:41 | 636 | let json_path = split_json_path(r#"toto\titi"#); | ^^^^^^^^^^^^^^ help: try: `r"toto\titi"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/core/json_utils.rs#L631
warning: unnecessary hashes around raw string literal --> src/core/json_utils.rs:631:34 | 631 | assert_eq!(&json_path, &[r#"toto\titi"#]); | ^^^^^^^^^^^^^^ help: try: `r"toto\titi"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/core/json_utils.rs#L630
warning: unnecessary hashes around raw string literal --> src/core/json_utils.rs:630:41 | 630 | let json_path = split_json_path(r#"toto\\titi"#); | ^^^^^^^^^^^^^^^ help: try: `r"toto\\titi"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/core/json_utils.rs#L624
warning: unnecessary hashes around raw string literal --> src/core/json_utils.rs:624:43 | 624 | let json_path_2 = split_json_path(r#"k8s\.container\.name"#); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `r"k8s\.container\.name"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
unnecessary hashes around raw string literal: src/core/json_utils.rs#L622
warning: unnecessary hashes around raw string literal --> src/core/json_utils.rs:622:41 | 622 | let json_path = split_json_path(r#"toto\.titi"#); | ^^^^^^^^^^^^^^^ help: try: `r"toto\.titi"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes = note: `#[warn(clippy::needless_raw_string_hashes)]` on by default
private item shadows public glob re-export: src/aggregation/bucket/mod.rs#L33
warning: private item shadows public glob re-export --> src/aggregation/bucket/mod.rs:33:16 | 33 | pub(crate) use range::SegmentRangeCollector; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the name `SegmentRangeCollector` in the type namespace is supposed to be publicly re-exported here --> src/aggregation/bucket/mod.rs:34:9 | 34 | pub use range::*; | ^^^^^^^^ note: but the private item here shadows it --> src/aggregation/bucket/mod.rs:33:16 | 33 | pub(crate) use range::SegmentRangeCollector; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private item shadows public glob re-export: src/aggregation/bucket/mod.rs#L31
warning: private item shadows public glob re-export --> src/aggregation/bucket/mod.rs:31:16 | 31 | pub(crate) use histogram::SegmentHistogramCollector; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: the name `SegmentHistogramCollector` in the type namespace is supposed to be publicly re-exported here --> src/aggregation/bucket/mod.rs:32:9 | 32 | pub use histogram::*; | ^^^^^^^^^^^^ note: but the private item here shadows it --> src/aggregation/bucket/mod.rs:31:16 | 31 | pub(crate) use histogram::SegmentHistogramCollector; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: `#[warn(hidden_glob_reexports)]` on by default