File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ def check_q17(df):
74
74
("q10_returned_item_reporting" , "q10" ),
75
75
pytest .param (
76
76
"q11_important_stock_identification" , "q11" ,
77
- marks = pytest .mark .xfail # https://github.com/apache/datafusion-python/issues/730
78
77
),
79
78
("q12_ship_mode_order_priority" , "q12" ),
80
79
("q13_customer_distribution" , "q13" ),
Original file line number Diff line number Diff line change @@ -320,14 +320,20 @@ fn window(
320
320
window_frame : Option < PyWindowFrame > ,
321
321
ctx : Option < PySessionContext > ,
322
322
) -> PyResult < PyExpr > {
323
- let fun = find_df_window_func ( name) . or_else ( || {
323
+
324
+ let fun = if name == "sum" {
325
+ let sum_udf = functions_aggregate:: sum:: sum_udaf ( ) ;
326
+ Some ( WindowFunctionDefinition :: AggregateUDF ( sum_udf) )
327
+ } else {
328
+ find_df_window_func ( name) . or_else ( || {
324
329
ctx. and_then ( |ctx| {
325
330
ctx. ctx
326
331
. udaf ( name)
327
332
. map ( WindowFunctionDefinition :: AggregateUDF )
328
333
. ok ( )
334
+ } )
329
335
} )
330
- } ) ;
336
+ } ;
331
337
if fun. is_none ( ) {
332
338
return Err ( DataFusionError :: Common ( "window function not found" . to_string ( ) ) . into ( ) ) ;
333
339
}
You can’t perform that action at this time.
0 commit comments