protected function JoinCategory(&$Comments) {
      $DiscussionIDs = array();
      
      foreach ($Comments as &$Comment)
         $DiscussionIDs[$Comment['DiscussionID']] = TRUE;
      $DiscussionIDs = array_keys($DiscussionIDs);
      
      $Discussions = Gdn::SQL()->Select('d.*')
         ->From('Discussion d')
         ->WhereIn('DiscussionID', $DiscussionIDs)
         ->Get()->Result(DATASET_TYPE_ARRAY);
      
      $DiscussionsByID = array();
      foreach ($Discussions as $Discussion)
         $DiscussionsByID[$Discussion['DiscussionID']] = $Discussion;
      unset($$Discussions);
      
      foreach ($Comments as &$Comment) {
         $Comment['Discussion'] = $DiscussionsByID[$Comment['DiscussionID']];
         $Comment['CategoryID'] = GetValueR('Discussion.CategoryID', $Comment);
      }
   }