You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2024/02/20 01:08:51 UTC

[I] Support Emit::First for SumDecimalGroupsAccumulator [arrow-datafusion-comet]

viirya opened a new issue, #46:
URL: https://github.com/apache/arrow-datafusion-comet/issues/46

   ### What is the problem the feature request solves?
   
   If the upstream operator of `HashAggregate` is sorted, `HashAggregate` will try to emit first groups if possible. Our custom `SumDecimalGroupsAccumulator` doesn't support `Emit::First`. So if  `Sort` is followed by `HashAggregate` and there is sum of decimal, the query will fail with:
   
   ```
           at std::backtrace::Backtrace::create(__internal__:0)                                                                                                                                                                           
           at comet::errors::init::{{closure}}(__internal__:0)                                                                                                                                                                            
           at std::panicking::rust_panic_with_hook(__internal__:0)                                                                                                                                                                        
           at std::panicking::begin_panic_handler::{{closure}}(__internal__:0)                                                                                                                                                            
           at std::sys_common::backtrace::__rust_end_short_backtrace(__internal__:0)                                                                                                                                                      
           at _rust_begin_unwind(__internal__:0)                                                                                                                                                                                          
           at core::panicking::panic_fmt(__internal__:0)                                                                                                                                                                                  
           at <comet::execution::datafusion::expressions::sum_decimal::SumDecimalGroupsAccumulator as datafusion_physical_expr::aggregate::groups_accumulator::GroupsAccumulator>::state(__internal__:0)                                  
           at datafusion_physical_plan::aggregates::row_hash::GroupedHashAggregateStream::emit(__internal__:0)                                                                                                                            
           at <datafusion_physical_plan::aggregates::row_hash::GroupedHashAggregateStream as futures_core::stream::Stream>::poll_next(__internal__:0)                                                                                     
           at <datafusion_physical_plan::aggregates::row_hash::GroupedHashAggregateStream as futures_core::stream::Stream>::poll_next(__internal__:0)                                                                                     
           at <datafusion_physical_plan::projection::ProjectionStream as futures_core::stream::Stream>::poll_next(__internal__:0)                                                                                                         
           at std::panicking::try::do_call(__internal__:0)                                                                                                                                                                                
           at _Java_org_apache_comet_Native_executePlan(__internal__:0)     
   ```
   
   ### Describe the potential solution
   
   Support Emit::First for SumDecimalGroupsAccumulator
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Support Emit::First for SumDecimalGroupsAccumulator [arrow-datafusion-comet]

Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya closed issue #46: Support Emit::First for SumDecimalGroupsAccumulator
URL: https://github.com/apache/arrow-datafusion-comet/issues/46


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org