Skip to content

Commit

Permalink
lint, remove log
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed May 8, 2024
1 parent cd1eafc commit 9241d2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 3 additions & 4 deletions nexus/analyzer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,11 +680,9 @@ fn parse_db_options(db_type: DbType, with_options: &[SqlOption]) -> anyhow::Resu
.to_string(),
metadata_schema: opts.get("metadata_schema").map(|s| s.to_string()),
transaction_snapshot: "".to_string(),
ssh_config: ssh_fields
ssh_config: ssh_fields,
};

// log postgres config
println!("postgres_config: {:#?}", postgres_config);
Config::PostgresConfig(postgres_config)
}
DbType::S3 => {
Expand Down Expand Up @@ -760,7 +758,8 @@ fn parse_db_options(db_type: DbType, with_options: &[SqlOption]) -> anyhow::Resu
.unwrap_or_default(),
disable_tls: opts
.get("disable_tls")
.map(|s| s.parse::<bool>().unwrap_or_default()).unwrap_or_default(),
.map(|s| s.parse::<bool>().unwrap_or_default())
.unwrap_or_default(),
endpoint: opts.get("endpoint").map(|s| s.to_string()),
};
Config::ClickhouseConfig(clickhouse_config)
Expand Down
5 changes: 4 additions & 1 deletion nexus/analyzer/src/qrep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ pub fn process_options(

// If mode is upsert, we need unique key columns
if opts.get("mode") == Some(&Value::String(String::from("upsert")))
&& opts.get("unique_key_columns").map(|ukc| ukc == &Value::Array(Vec::new())).unwrap_or(true)
&& opts
.get("unique_key_columns")
.map(|ukc| ukc == &Value::Array(Vec::new()))
.unwrap_or(true)
{
anyhow::bail!("For upsert mode, unique_key_columns must be specified");
}
Expand Down

0 comments on commit 9241d2c

Please sign in to comment.