Hello Calcite contributors, I am working on a project that builds off of Calcite and I believe I may have encountered a bug in RelBuilder.aggregate_(). The problem that I have encountered is that this function is dropping traitSet information from my the Project node when making a copy. In particular, line 2479 calls project.copy() to prune any unused columns, but instead of reusing the traitSet from the original projection it takes the traitSet directly from the cluster.
In my example, this caused problems for me because I was propagating convention information through the traitSet. I may be incorrectly relying on the traitSet in this case and perhaps my copy implementation should be improved, but I wanted to raise this as a possible concern in case anyone else has encountered this issue. I am happy to submit a PR if you agree this is a bug. Thanks for you time, Nick Riasanovsky
