Skip to content

Commit

Permalink
fixed error on parse filter regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Schwarzam committed Jun 9, 2024
1 parent 53f11d8 commit 44b7a56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/loaders/parquet/parse_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub fn parse_filters(params: &HashMap<String, String>) -> Option<Vec<(&str, &str
return None
}

let re = Regex::new(r"([a-zA-Z_]+)([<>=]+)([-+]?[0-9]*\.?[0-9]*)").unwrap();
let re = Regex::new(r"([a-zA-Z_]+)([!<>=]+)([-+]?[0-9]*\.?[0-9]*)").unwrap();
let mut filter_vec = Vec::new();
for filter in filters {
let f_vec = re.captures(filter).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion tests/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mod parser {
let mut params = HashMap::new();

params.insert("columns".to_string(), "RA,DEC".to_string());
params.insert("filters".to_string(), "RA>=30.1241,DEC<=-30.3,RA>30,DEC<-30,RA==1,RA=1,RA!=0".to_string());
params.insert("filters".to_string(), "RA>=30.1241,DEC<=-30.3,RA>30,DEC<=30,RA==1,RA=1,RA!=0".to_string());

let result = parquet::parquet::process_and_return_parquet_file(
file_path.to_str().unwrap(),
Expand Down

0 comments on commit 44b7a56

Please sign in to comment.