Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
  • Loading branch information
BugenZhao committed Sep 21, 2023
1 parent 8676ca2 commit f6c468b
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 22 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/expr/src/expr/expr_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use risingwave_pb::expr::expr_node::{PbType, RexNode};
use risingwave_pb::expr::ExprNode;

use super::Build;
use crate::expr::{build_from_prost, BoxedExpression, Expression};
use crate::{ExprError, Result};
use crate::expr::{BoxedExpression, Expression};
use crate::Result;

#[derive(Debug)]
pub struct WhenClause {
Expand Down
5 changes: 2 additions & 3 deletions src/expr/src/expr/expr_coalesce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::convert::TryFrom;
use std::ops::BitAnd;
use std::sync::Arc;

Expand All @@ -23,8 +22,8 @@ use risingwave_pb::expr::expr_node::{RexNode, Type};
use risingwave_pb::expr::ExprNode;

use super::Build;
use crate::expr::{build_from_prost as expr_build_from_prost, BoxedExpression, Expression};
use crate::{bail, ensure, ExprError, Result};
use crate::expr::{BoxedExpression, Expression};
use crate::{bail, ensure, Result};

#[derive(Debug)]
pub struct CoalesceExpression {
Expand Down
6 changes: 2 additions & 4 deletions src/expr/src/expr/expr_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::convert::TryFrom;

use anyhow::anyhow;
use risingwave_common::array::{ArrayImpl, ArrayRef, DataChunk};
use risingwave_common::row::OwnedRow;
Expand All @@ -23,8 +21,8 @@ use risingwave_pb::expr::expr_node::{RexNode, Type};
use risingwave_pb::expr::ExprNode;

use super::Build;
use crate::expr::{build_from_prost as expr_build_from_prost, BoxedExpression, Expression};
use crate::{bail, ensure, ExprError, Result};
use crate::expr::{BoxedExpression, Expression};
use crate::{bail, ensure, Result};

/// `FieldExpression` access a field from a struct.
#[derive(Debug)]
Expand Down
4 changes: 2 additions & 2 deletions src/expr/src/expr/expr_in.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ use risingwave_pb::expr::expr_node::{RexNode, Type};
use risingwave_pb::expr::ExprNode;

use super::Build;
use crate::expr::{build_from_prost, BoxedExpression, Expression};
use crate::{ExprError, Result};
use crate::expr::{BoxedExpression, Expression};
use crate::Result;

#[derive(Debug)]
pub struct InExpression {
Expand Down
5 changes: 2 additions & 3 deletions src/expr/src/expr/expr_input_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::convert::TryFrom;
use std::ops::Index;

use risingwave_common::array::{ArrayRef, DataChunk};
use risingwave_common::row::OwnedRow;
use risingwave_common::types::{DataType, Datum};
use risingwave_pb::expr::ExprNode;

use super::{Build, BoxedExpression};
use super::{BoxedExpression, Build};
use crate::expr::Expression;
use crate::{ExprError, Result};
use crate::Result;

/// A reference to a column in input relation.
#[derive(Debug, Clone)]
Expand Down
2 changes: 0 additions & 2 deletions src/expr/src/expr/expr_literal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::convert::TryFrom;

use risingwave_common::array::DataChunk;
use risingwave_common::row::OwnedRow;
use risingwave_common::types::{literal_type_match, DataType, Datum};
Expand Down
4 changes: 2 additions & 2 deletions src/expr/src/expr/expr_some_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use risingwave_pb::expr::expr_node::{RexNode, Type};
use risingwave_pb::expr::{ExprNode, FunctionCall};

use super::build::get_children_and_return_type;
use super::{build_from_prost, BoxedExpression, Build, Expression};
use crate::{ExprError, Result};
use super::{BoxedExpression, Build, Expression};
use crate::Result;

#[derive(Debug)]
pub struct SomeAllExpression {
Expand Down
4 changes: 2 additions & 2 deletions src/expr/src/expr/expr_udf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ use risingwave_common::types::{DataType, Datum};
use risingwave_pb::expr::ExprNode;
use risingwave_udf::ArrowFlightUdfClient;

use super::{build_from_prost, BoxedExpression, Build, InputRefExpression};
use super::{BoxedExpression, Build};
use crate::expr::Expression;
use crate::{bail, ExprError, Result};
use crate::{bail, Result};

#[derive(Debug)]
pub struct UdfExpression {
Expand Down
1 change: 0 additions & 1 deletion src/expr/src/expr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ use futures_util::TryFutureExt;
use risingwave_common::array::{ArrayRef, DataChunk};
use risingwave_common::row::OwnedRow;
use risingwave_common::types::{DataType, Datum};
use risingwave_pb::expr::PbExprNode;

pub use self::build::*;
pub use self::expr_input_ref::InputRefExpression;
Expand Down
5 changes: 4 additions & 1 deletion src/prost/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.compile_well_known_types(true)
.protoc_arg("--experimental_allow_proto3_optional")
.type_attribute(".", "#[derive(prost_helpers::AnyPB)]")
.type_attribute("node_body", "#[derive(::enum_as_inner::EnumAsInner, ::strum::Display)]")
.type_attribute(
"node_body",
"#[derive(::enum_as_inner::EnumAsInner, ::strum::Display)]",
)
.type_attribute("rex_node", "#[derive(::enum_as_inner::EnumAsInner)]")
.type_attribute(
"meta.PausedReason",
Expand Down
1 change: 1 addition & 0 deletions src/workspace-hack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ sqlx-core = { version = "0.7", features = ["_rt-tokio", "any", "chrono", "json",
sqlx-mysql = { version = "0.7", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
sqlx-postgres = { version = "0.7", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
sqlx-sqlite = { version = "0.7", default-features = false, features = ["any", "chrono", "json", "migrate", "offline"] }
strum = { version = "0.25", features = ["derive"] }
subtle = { version = "2" }
time = { version = "0.3", features = ["local-offset", "macros", "serde-well-known"] }
tinyvec = { version = "1", features = ["alloc", "grab_spare_slice", "rustc_1_55"] }
Expand Down

0 comments on commit f6c468b

Please sign in to comment.