Skip to content

Commit

Permalink
Fix import, create Arc instances in handle functions
Browse files Browse the repository at this point in the history
  • Loading branch information
shanicky committed Nov 14, 2023
1 parent d492e7e commit 3a06437
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/frontend/src/handler/create_sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use std::collections::{HashMap, HashSet};
use std::rc::Rc;
use std::sync::{Arc, LazyLock};

use either::Either;
use anyhow::Context;
use either::Either;
use itertools::Itertools;
use maplit::{convert_args, hashmap};
use pgwire::pg_response::{PgResponse, StatementType};
Expand Down Expand Up @@ -386,7 +386,7 @@ pub async fn handle_create_sink(
.map(|source_schema| source_schema.into_source_schema_v2().0);

// Create handler args as if we're creating a new table with the altered definition.
let handler_args = HandlerArgs::new(session.clone(), &definition, "")?;
let handler_args = HandlerArgs::new(session.clone(), &definition, Arc::from(""))?;
let col_id_gen = ColumnIdGenerator::new_alter(&table_catalog);
let Statement::CreateTable {
columns,
Expand Down
4 changes: 3 additions & 1 deletion src/frontend/src/handler/drop_sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::sync::Arc;

use pgwire::pg_response::{PgResponse, StatementType};
use risingwave_common::error::Result;
use risingwave_pb::ddl_service::ReplaceTablePlan;
Expand Down Expand Up @@ -96,7 +98,7 @@ pub async fn handle_drop_sink(
.map(|source_schema| source_schema.into_source_schema_v2().0);

// Create handler args as if we're creating a new table with the altered definition.
let handler_args = HandlerArgs::new(session.clone(), &definition, "")?;
let handler_args = HandlerArgs::new(session.clone(), &definition, Arc::from(""))?;
let col_id_gen = ColumnIdGenerator::new_alter(&table_catalog);
let Statement::CreateTable {
columns,
Expand Down
1 change: 0 additions & 1 deletion src/meta/src/stream/stream_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ use uuid::Uuid;
use super::{
Locations, ParallelUnitReschedule, RescheduleOptions, ScaleController, ScaleControllerRef,
};

use crate::barrier::{BarrierScheduler, Command, ReplaceTableCommand};
use crate::hummock::HummockManagerRef;
use crate::manager::{ClusterManagerRef, FragmentManagerRef, MetaSrvEnv};
Expand Down

0 comments on commit 3a06437

Please sign in to comment.