Skip to content

Commit

Permalink
Disable tests which are crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarthee committed Jun 2, 2024
1 parent fcd8678 commit c241978
Show file tree
Hide file tree
Showing 4 changed files with 616 additions and 613 deletions.
31 changes: 17 additions & 14 deletions native/explorer/src/series.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,32 +1228,35 @@ pub fn s_quantile<'a>(
strategy: &str,
) -> Result<Term<'a>, ExplorerError> {
let dtype = s.dtype();
let strategy = parse_quantile_interpol_options(strategy);
let strategy_opt = parse_quantile_interpol_options(strategy);
match dtype {
DataType::Date => match s.date()?.quantile(quantile, strategy)? {
DataType::Date => match s.date()?.quantile(quantile, strategy_opt)? {
None => Ok(None::<ExDate>.encode(env)),
Some(days) => Ok(ExDate::from(days as i32).encode(env)),
},
DataType::Time => match s.time()?.quantile(quantile, strategy)? {
DataType::Time => match s.time()?.quantile(quantile, strategy_opt)? {
None => Ok(None::<ExTime>.encode(env)),
Some(microseconds) => Ok(ExTime::from(microseconds as i64).encode(env)),
},
DataType::Datetime(unit, None) => match s.datetime()?.quantile(quantile, strategy)? {
DataType::Datetime(unit, None) => match s.datetime()?.quantile(quantile, strategy_opt)? {
None => Ok(None::<ExNaiveDateTime>.encode(env)),
Some(time) => Ok(encode_naive_datetime(time as i64, *unit, env)
.unwrap()
.encode(env)),
},
_ => todo!(),
// _ =>
// s.agg_quantile(quantile, strategy)

// encoding::term_from_value(
// s.quantile_as_series(quantile, strategy)?
// .cast(dtype)?
// .get(0)?,
// env,
// ),
_ => {
let series = s
.clone_inner()
.into_frame()
.lazy()
.select([col(s.name())
.quantile(quantile.into(), strategy_opt)
.cast(dtype.clone())])
.collect()?
.column(s.name())?
.clone();
encoding::term_from_value(series.get(0)?, env)
}
}
}

Expand Down
Loading

0 comments on commit c241978

Please sign in to comment.