From 17d25d7eda382388d867e2b7b51c08c13a3611a0 Mon Sep 17 00:00:00 2001 From: PhilippLgh Date: Wed, 27 Dec 2023 00:23:16 +0000 Subject: [PATCH] fix: parquet column parsing (#127) * fix: parquet column parsing * avoid use of unwrap() --------- Co-authored-by: sslivkoff --- crates/cli/src/parse/parse_utils.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/cli/src/parse/parse_utils.rs b/crates/cli/src/parse/parse_utils.rs index 35313e93..04f46987 100644 --- a/crates/cli/src/parse/parse_utils.rs +++ b/crates/cli/src/parse/parse_utils.rs @@ -51,8 +51,13 @@ pub(crate) fn parse_binary_arg( let mut parsed = HashMap::new(); // separate into files vs explicit - let (files, hex_strings): (Vec<&String>, Vec<&String>) = - inputs.iter().partition(|tx| std::path::Path::new(tx).exists()); + let (files, hex_strings): (Vec<&String>, Vec<&String>) = inputs.iter().partition(|tx| { + // strip off column name if present + match parse_file_column_reference(tx, default_column) { + Ok(reference) => std::path::Path::new(&reference.path).exists(), + _ => false, + } + }); // files columns for path in files {