Skip to content

Commit 44b7a56

Browse files
committed
fixed error on parse filter regex
1 parent 53f11d8 commit 44b7a56

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/loaders/parquet/parse_params.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub fn parse_filters(params: &HashMap<String, String>) -> Option<Vec<(&str, &str
3535
return None
3636
}
3737

38-
let re = Regex::new(r"([a-zA-Z_]+)([<>=]+)([-+]?[0-9]*\.?[0-9]*)").unwrap();
38+
let re = Regex::new(r"([a-zA-Z_]+)([!<>=]+)([-+]?[0-9]*\.?[0-9]*)").unwrap();
3939
let mut filter_vec = Vec::new();
4040
for filter in filters {
4141
let f_vec = re.captures(filter).unwrap();

tests/parquet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ mod parser {
1313
let mut params = HashMap::new();
1414

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

1818
let result = parquet::parquet::process_and_return_parquet_file(
1919
file_path.to_str().unwrap(),

0 commit comments

Comments
 (0)