ResolvedJoinedGroupingTableInfo constitutes an implementation of ITableInfo that contains a sub-statement that returns items from groupings produced by another SqlTable. ResolvingTableInfoVisitor creates this for an UnresolvedGroupReferenceTableInfo that points to a UnresolvedGroupReferenceTableInfo.ReferencedGroupSource with a SqlGroupingSelectExpression.
Inheritance: ResolvedSubStatementTableInfo
 public ITableInfo VisitJoinedGroupingTableInfo (ResolvedJoinedGroupingTableInfo tableInfo)
 {
   var newStatement = _stage.ApplySelectionContext (tableInfo.SqlStatement, _expressionContext, _mappingResolutionContext);
   if (newStatement != tableInfo.SqlStatement)
     return new ResolvedJoinedGroupingTableInfo (
         tableInfo.TableAlias, 
         newStatement, 
         tableInfo.AssociatedGroupingSelectExpression, 
         tableInfo.GroupSourceTableAlias);
   return tableInfo;
 }
    public void SetUp ()
    {
      _sqlStatement = new SqlStatementBuilder (SqlStatementModelObjectMother.CreateSqlStatement_Resolved (typeof (Cook)))
      {
        SelectProjection = new NamedExpression ("test", Expression.Constant (5)),
        DataInfo = new StreamedSequenceInfo (typeof (int[]), Expression.Constant (0))
      }.GetSqlStatement ();

      _tableInfo = new ResolvedJoinedGroupingTableInfo (
          "q0",
          _sqlStatement,
          SqlStatementModelObjectMother.CreateSqlGroupingSelectExpression(),
          "q1");
    }
 public ITableInfo VisitJoinedGroupingTableInfo (ResolvedJoinedGroupingTableInfo tableInfo)
 {
   return VisitSubStatementTableInfo (tableInfo);
 }
    public ITableInfo VisitJoinedGroupingTableInfo (ResolvedJoinedGroupingTableInfo tableInfo)
    {
      ArgumentUtility.CheckNotNull ("tableInfo", tableInfo);

      var newSqlStatement = _stage.ResolveSqlStatement (tableInfo.SqlStatement, _context);
      if (newSqlStatement.Equals (tableInfo.SqlStatement))
      {
        return tableInfo;
      }
      else
      {
        return new ResolvedJoinedGroupingTableInfo (
            tableInfo.TableAlias,
            newSqlStatement,
            tableInfo.AssociatedGroupingSelectExpression,
            tableInfo.GroupSourceTableAlias);
      }
    }