private OutputFromComputeCellGroups ComputeCellGroups(InputForComputingCellGroups args)
        {
            OutputFromComputeCellGroups result = new OutputFromComputeCellGroups();

            result.Success = true;

            CellCreator cellCreator = new CellCreator(args.ContainerMapping);

            result.Cells       = cellCreator.GenerateCells(args.Config);
            result.Identifiers = cellCreator.Identifiers;

            if (result.Cells.Count <= 0)
            {
                //When type-specific QVs are asked for but not defined in the MSL we should return without generating
                // Query pipeline will handle this appropriately by asking for UNION ALL view.
                result.Success = false;
                return(result);
            }

            result.ForeignKeyConstraints = ForeignConstraint.GetForeignConstraints(args.ContainerMapping.StorageEntityContainer);

            // Go through each table and determine their foreign key constraints
            CellPartitioner  partitioner = new CellPartitioner(result.Cells, result.ForeignKeyConstraints);
            List <CellGroup> cellGroups  = partitioner.GroupRelatedCells();

            //Clone cell groups- i.e, List<Set<Cell>> - upto cell before storing it in the cache because viewgen modified the Cell structure
            result.CellGroups = cellGroups.Select(setOfcells => new CellGroup(setOfcells.Select(cell => new Cell(cell)))).ToList();

            return(result);
        }
 internal OutputFromComputeCellGroups GetCellgroups(InputForComputingCellGroups args)
 {
     Debug.Assert(object.ReferenceEquals(this, args.ContainerMapping));
     return(m_memoizedCellGroupEvaluator.Evaluate(args));
 }