duongcongtoai commented on PR #17915:
URL: https://github.com/apache/datafusion/pull/17915#issuecomment-3384541921

   ```
   toai@salamancabrothehood:~/proj/rust/playpy$ bash test.sh sample-1m.parquet 
   Benchmark 1: uv run polar.py sample-1m.parquet
     Time (mean ± σ):     594.7 ms ±   9.0 ms    [User: 1190.6 ms, System: 
614.0 ms]
     Range (min … max):   582.7 ms … 607.2 ms    10 runs
    
   Benchmark 2: uv run df.py sample-1m.parquet
     Time (mean ± σ):     786.1 ms ±  10.4 ms    [User: 3790.5 ms, System: 
569.3 ms]
     Range (min … max):   767.9 ms … 805.6 ms    10 runs
    
   Summary
     uv run polar.py sample-1m.parquet ran
       1.32 ± 0.03 times faster than uv run df.py sample-1m.parquet
   ```
   
   I tried benchmark again with this branch, the result is improved compared to 
datafusion 50.0.0, however i have to modify the original script a bit, because 
writing to parquet fails in the same way described in this 
[issue](https://github.com/apache/datafusion/issues/17445)
   
   I'll also take a look on that later
   
   ```
       df = df.aggregate(
           [col("df.name"), col("df.group")],
           array_agg(col("market")).alias("markets"),
       )
       df = df.select(
           col("df.name"),
           col("df.group"),
           when(col("markets")[1].is_not_null(), 
col("markets")).otherwise(lit(None)),
       )
   
       df.collect();
   
       # df.write_parquet("output_datafusion.parquet")
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to