Hi All, I have taken a stab at adding support for Spark runtime + aggregation direction for both CP and Spark in this PR: https://github.com/apache/systemds/pull/1531
I have outlined a few minor issues with the implementation that I am currently working on in the PR description- that is why I marked the PR a draft. However, all of the core logic has been implemented with corresponding tests, so the PR is by and large ready for your review. I have outlined my thought process in this design note, hopefully it will help in reviewing the code: https://docs.google.com/document/d/1jKnVjHXWjo6u2Ij1lPhgQAiyMj9QPcioeCMI3UwqnNw/edit# JIRA Issue <https://issues.apache.org/jira/browse/SYSTEMDS-2996?jql=project%20%3D%20SYSTEMDS%20AND%20text%20~%20%22count%20distinct%22> It would be great if you could PTAL when you get a chance. Looking forward to your feedback! Thanks, Badrul
