Building a Production-Grade DuckDB Aggregation Service: Wrapping Optimization Techniques into Reusable Code