Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
yezizp2012 committed Nov 4, 2024
1 parent 5dd0680 commit 8d31963
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/frontend/src/handler/create_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ use either::Either;
use fixedbitset::FixedBitSet;
use itertools::Itertools;
use pgwire::pg_response::{PgResponse, StatementType};
use risingwave_common::acl::AclMode;
use risingwave_common::catalog::{IndexId, TableDesc, TableId};
use risingwave_common::util::sort_util::{ColumnOrder, OrderType};
use risingwave_pb::catalog::{PbIndex, PbIndexColumnProperties, PbStreamJobStatus, PbTable};
use risingwave_pb::user::grant_privilege::Object;
use risingwave_sqlparser::ast;
use risingwave_sqlparser::ast::{Ident, ObjectName, OrderByExpr};

Expand All @@ -34,7 +32,6 @@ use crate::binder::Binder;
use crate::catalog::root_catalog::SchemaPath;
use crate::error::{ErrorCode, Result};
use crate::expr::{Expr, ExprImpl, ExprRewriter, InputRef};
use crate::handler::privilege::ObjectCheckItem;
use crate::handler::HandlerArgs;
use crate::optimizer::plan_expr_rewriter::ConstEvalRewriter;
use crate::optimizer::plan_node::{Explain, LogicalProject, LogicalScan, StreamMaterialize};
Expand Down Expand Up @@ -84,10 +81,9 @@ pub(crate) fn gen_create_index_plan(
}

if !session.is_super_user() && session.user_id() != table.owner {
return Err(ErrorCode::PermissionDenied(
format!("must be owner of table {}", table.name).into(),
)
.into());
return Err(
ErrorCode::PermissionDenied(format!("must be owner of table {}", table.name)).into(),
);
}

let mut binder = Binder::new_for_stream(session);
Expand Down

0 comments on commit 8d31963

Please sign in to comment.