Skip to content

Commit

Permalink
chore: remove redundant input var
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Oct 27, 2024
1 parent d4b63fe commit 88cf57a
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2032,20 +2032,18 @@ pub fn get_stats_records(

let statsdatajson_path = canonical_input_path.with_extension("stats.csv.data.jsonl");

let input = if let Some(arg_input) = stats_args.arg_input {
arg_input
} else {
"-".to_string()
};
let mut stats_args_str = match mode {
StatsMode::Schema => {
// mode is StatsMode::Schema
// we're generating schema, so we need cardinality and to infer-dates
format!(
"stats {input} --infer-dates --dates-whitelist {dates_whitelist} --round 4 \
--cardinality --stats-jsonl --force --output {output}",
input = {
if let Some(arg_input) = stats_args.arg_input.clone() {
arg_input
} else {
"-".to_string()
}
},
dates_whitelist = stats_args.flag_dates_whitelist,
output = tempfile_path,
)
Expand All @@ -2055,13 +2053,6 @@ pub fn get_stats_records(
// we're doing frequency, so we just need cardinality
format!(
"stats {input} --cardinality --stats-jsonl --output {output}",
input = {
if let Some(arg_input) = stats_args.arg_input.clone() {
arg_input
} else {
"-".to_string()
}
},
output = tempfile_path,
)
},
Expand All @@ -2070,13 +2061,6 @@ pub fn get_stats_records(
// we need data types and ranges
format!(
"stats {input} --infer-boolean --stats-jsonl --output {output}",
input = {
if let Some(arg_input) = stats_args.arg_input.clone() {
arg_input
} else {
"-".to_string()
}
},
output = tempfile_path,
)
},
Expand Down

0 comments on commit 88cf57a

Please sign in to comment.