Performing a trial run (like `empty` in `groupingsets`) and choosing the `tight` function based on that sounds like an even better idea, thank you! _Originally posted by @aitap in https://github.com/Rdatatable/data.table/pull/7272#discussion_r2337722933_