@@ -498,41 +498,20 @@ impl FromNapiValue for Wrap<u64> {
498
498
499
499
#[ napi( object) ]
500
500
pub struct JsRollingOptions {
501
- pub window_size : String ,
501
+ pub window_size : i16 ,
502
502
pub weights : Option < Vec < f64 > > ,
503
503
pub min_periods : i64 ,
504
504
pub center : bool ,
505
505
pub ddof : Option < u8 > ,
506
506
}
507
507
508
- impl From < JsRollingOptions > for RollingOptionsImpl < ' static > {
508
+ impl From < JsRollingOptions > for RollingOptionsFixedWindow {
509
509
fn from ( o : JsRollingOptions ) -> Self {
510
- RollingOptionsImpl {
511
- window_size : Duration :: parse ( & o. window_size ) ,
510
+ RollingOptionsFixedWindow {
511
+ window_size : o. window_size as usize ,
512
512
weights : o. weights ,
513
513
min_periods : o. min_periods as usize ,
514
514
center : o. center ,
515
- by : None ,
516
- tu : None ,
517
- tz : None ,
518
- closed_window : None ,
519
- fn_params : Some ( Arc :: new ( RollingVarParams {
520
- ddof : o. ddof . unwrap_or ( 1 ) ,
521
- } ) as Arc < dyn Any + Send + Sync > ) ,
522
- ..Default :: default ( )
523
- }
524
- }
525
- }
526
-
527
- impl From < JsRollingOptions > for RollingOptions {
528
- fn from ( o : JsRollingOptions ) -> Self {
529
- RollingOptions {
530
- window_size : Duration :: parse ( & o. window_size ) ,
531
- weights : o. weights ,
532
- min_periods : o. min_periods as usize ,
533
- center : o. center ,
534
- by : None ,
535
- closed_window : None ,
536
515
fn_params : Some ( Arc :: new ( RollingVarParams {
537
516
ddof : o. ddof . unwrap_or ( 1 ) ,
538
517
} ) as Arc < dyn Any + Send + Sync > ) ,
@@ -550,7 +529,7 @@ pub struct JsRowCount {
550
529
impl From < JsRowCount > for RowIndex {
551
530
fn from ( o : JsRowCount ) -> Self {
552
531
RowIndex {
553
- name : o. name ,
532
+ name : o. name . into ( ) ,
554
533
offset : o. offset ,
555
534
}
556
535
}
@@ -832,7 +811,7 @@ impl FromNapiValue for Wrap<JoinType> {
832
811
let parsed = match s. as_ref ( ) {
833
812
"inner" => JoinType :: Inner ,
834
813
"left" => JoinType :: Left ,
835
- "outer" => JoinType :: Outer { coalesce : true } ,
814
+ "outer" => JoinType :: Outer ,
836
815
"semi" => JoinType :: Semi ,
837
816
"anti" => JoinType :: Anti ,
838
817
"cross" => JoinType :: Cross ,
0 commit comments