Exemplo n.º 1
0
 public bool EvaluateCondition(ViewSchema vs, ViewTable parentViewTable, Operation.ExpressionParsingContext expressionParsingContext)
 {
     if (condition == null)
     {
         return(true);
     }
     using (ScopeDebugContext.Func(() => { return("EvaluateCondition on Node '" + GetFullName() + "'"); }))
     {
         var option = new Operation.Expression.ParseIdentifierOption(vs, parentViewTable, true, true, null, expressionParsingContext);
         option.formatError = (string s, Operation.Expression.ParseIdentifierOption opt) =>
         {
             string str = "Error while evaluating node condition.";
             if (vs != null)
             {
                 str += " schema '" + vs.name + "'";
             }
             if (parentViewTable != null)
             {
                 str += " view table '" + parentViewTable.GetName() + "'";
             }
             return(str + " : " + s);
         };
         var resolvedCondition = condition.Build(option);
         if (resolvedCondition == null)
         {
             return(false);
         }
         return(resolvedCondition.GetValue(0));
     }
 }
Exemplo n.º 2
0
 public bool OpenLinkRequest(Database.LinkRequestTable link, Database.TableReference tableLink, Database.Table table)
 {
     using (ScopeDebugContext.String("OpenLinkRequest"))
     {
         if (link.LinkToOpen.RowWhere != null && link.LinkToOpen.RowWhere.Count > 0)
         {
             Database.Table filteredTable = table;
             if (table.GetMetaData().defaultFilter != null)
             {
                 filteredTable = table.GetMetaData().defaultFilter.CreateFilter(table);
             }
             var  whereUnion  = new Database.View.WhereUnion(link.LinkToOpen.RowWhere, null, null, null, null, m_UIState.CurrentMode.GetSchema(), filteredTable, link.SourceView == null ? null : link.SourceView.ExpressionParsingContext);
             long rowToSelect = whereUnion.GetIndexFirstMatch(link.SourceRow);
             if (rowToSelect < 0)
             {
                 DebugUtility.LogWarning("Could not find entry in target table '" + link.LinkToOpen.TableName + "'");
                 return(false);
             }
             DebugUtility.DebugLog("Opening table '" + link.LinkToOpen.TableName + "' at row " + rowToSelect);
             OpenTable(tableLink, table, new Database.CellPosition(rowToSelect, 0));
         }
         else
         {
             OpenTable(tableLink, table, new Database.CellPosition(0, 0));
         }
         return(true);
     }
 }
Exemplo n.º 3
0
            void SetSnapshot(DataRenderer dataRenderer, PackedMemorySnapshot snapshot)
            {
                if (snapshot == null)
                {
                    m_RawSnapshot   = null;
                    m_RawSchema     = null;
                    SchemaToDisplay = null;
                    UpdateTableSelectionNames();
                    return;
                }

                m_RawSnapshot = snapshot;

                ProgressBarDisplay.ShowBar(string.Format("Opening snapshot: {0}", System.IO.Path.GetFileNameWithoutExtension(snapshot.filePath)));

                var cachedSnapshot = new CachedSnapshot(snapshot);

                using (Profiling.GetMarker(Profiling.MarkerId.CrawlManagedData).Auto())
                {
                    var crawling = Crawler.Crawl(cachedSnapshot);
                    crawling.MoveNext(); //start execution

                    var   status          = crawling.Current as EnumerationStatus;
                    float progressPerStep = 1.0f / status.StepCount;
                    while (crawling.MoveNext())
                    {
                        ProgressBarDisplay.UpdateProgress(status.CurrentStep * progressPerStep, status.StepStatus);
                    }
                }
                ProgressBarDisplay.ClearBar();

                m_RawSchema = new RawSchema();
                m_RawSchema.SetupSchema(cachedSnapshot, dataRenderer);

                SchemaToDisplay = m_RawSchema;
                if (k_DefaultViewFilePath.Length > 0)
                {
                    using (ScopeDebugContext.Func(() => { return("File '" + k_DefaultViewFilePath + "'"); }))
                    {
                        Database.View.ViewSchema.Builder builder = null;
                        using (Profiling.GetMarker(Profiling.MarkerId.LoadViewDefinitionFile).Auto())
                        {
                            builder = Database.View.ViewSchema.Builder.LoadFromXMLFile(k_DefaultViewFilePath);
                        }
                        if (builder != null)
                        {
                            using (Profiling.GetMarker(Profiling.MarkerId.BuildViewDefinitionFile).Auto())
                            {
                                ViewSchema = builder.Build(m_RawSchema);
                            }
                            if (ViewSchema != null)
                            {
                                SchemaToDisplay = ViewSchema;
                            }
                        }
                    }
                }

                UpdateTableSelectionNames();
            }
Exemplo n.º 4
0
        public static LinkRequestTable MakeLinkRequest(TableLink metaLink, Table sourceTable, Column sourceColumn, long sourceRow, Database.Operation.ExpressionParsingContext expressionParsingContext)
        {
            if (metaLink == null)
            {
                return(null);
            }
            using (ScopeDebugContext.Func(() => { return("MakeLinkRequest from table '" + sourceTable.GetName() + "' row " + sourceRow); }))
            {
                var lr = new LinkRequestTable();
                lr.LinkToOpen   = metaLink;
                lr.SourceTable  = sourceTable;
                lr.SourceView   = sourceTable as View.ViewTable;
                lr.SourceColumn = sourceColumn;
                lr.SourceRow    = sourceRow;

                if (lr.LinkToOpen.Parameters != null)
                {
                    foreach (var p in lr.LinkToOpen.Parameters)
                    {
                        var opt            = new Operation.Expression.ParseIdentifierOption(sourceTable.Schema as View.ViewSchema, sourceTable, true, true, typeof(string), expressionParsingContext);
                        var metaExpression = new Operation.Expression.MetaExpression(p.Value, true);
                        var exp            = Operation.Expression.ParseIdentifier(metaExpression, opt);
                        var exp2           = Operation.ColumnCreator.CreateTypedExpressionFixedRow(exp, sourceRow);
                        lr.Parameters.Add(p.Key, exp2);
                    }
                }
                return(lr);
            }
        }
Exemplo n.º 5
0
            public static Builder LoadFromXML(XmlElement root)
            {
                Builder b = new Builder();

                b.name = root.GetAttribute("name");
                using (ScopeDebugContext.Func(() => { return("ViewSchema '" + b.name + "'"); }))
                {
                    foreach (XmlNode node in root.ChildNodes)
                    {
                        if (node.NodeType == XmlNodeType.Element)
                        {
                            XmlElement e = (XmlElement)node;
                            if (e.Name == "View")
                            {
                                var v = ViewTable.Builder.LoadFromXML(e);
                                if (v != null)
                                {
                                    b.viewTable.Add(v);
                                }
                            }
                        }
                    }
                    return(b);
                }
            }
Exemplo n.º 6
0
                public static Node LoadFromXML(Node parent, XmlElement root)
                {
                    Node node = new Node(parent);

                    if (parent != null)
                    {
                        node.name = root.GetAttribute("name");
                    }
                    else
                    {
                        DebugUtility.TryGetMandatoryXmlAttribute(root, "name", out node.name);
                    }

                    using (ScopeDebugContext.Func(() => { return("Node '" + node.name + "'"); }))
                    {
                        foreach (XmlNode xNode in root.ChildNodes)
                        {
                            if (xNode.NodeType == XmlNodeType.Element)
                            {
                                XmlElement e = (XmlElement)xNode;
                                switch (e.Name)
                                {
                                case "Column":
                                    var c = ViewColumn.Builder.LoadFromXML(e);
                                    if (c != null)
                                    {
                                        node.column.Add(c);
                                    }
                                    break;

                                case "Data":
                                    node.data = Data.LoadFromXML(node, e);
                                    break;

                                case "Filter":
                                    LoadFilterFromXML(node, e);
                                    break;

                                case "SelectSet":
                                    node.localSelectSet = SelectSet.Builder.LoadFromXML(e);
                                    break;

                                case "Condition":
                                    node.condition = Operation.MetaExpComparison.LoadFromXML(e);
                                    break;

                                default:
                                    DebugUtility.LogInvalidXmlChild(root, e);
                                    break;
                                }
                            }
                        }
                        return(node);
                    }
                }
Exemplo n.º 7
0
        void OpenLinkRequest(Database.LinkRequestTable link, bool focus, string tableTypeFilter = null, bool select = true)
        {
            List <Where.Builder> tableFilterWhere = null;

            m_CurrentTableTypeFilter = tableTypeFilter;
            if (tableTypeFilter != null)
            {
                tableFilterWhere = new List <Where.Builder>();
                tableFilterWhere.Add(new Where.Builder("Type", Database.Operation.Operator.Equal, new Database.Operation.Expression.MetaExpression(tableTypeFilter, true)));
            }
            //TODO this code is the same as the one inSpreadsheetPane, should be put together
            using (ScopeDebugContext.String("OpenLinkRequest"))
            {
                var tableRef = new Database.TableReference(link.LinkToOpen.TableName, link.Parameters);
                var table    = m_UIState.snapshotMode.SchemaToDisplay.GetTableByReference(tableRef);
                if (table == null)
                {
                    UnityEngine.Debug.LogError("No table named '" + link.LinkToOpen.TableName + "' found.");
                    return;
                }
                if (link.LinkToOpen.RowWhere != null && link.LinkToOpen.RowWhere.Count > 0)
                {
                    if (table.GetMetaData().defaultFilter != null)
                    {
                        table = table.GetMetaData().defaultFilter.CreateFilter(table);
                    }
                    Database.Operation.ExpressionParsingContext expressionParsingContext = null;
                    if (link.SourceView != null)
                    {
                        expressionParsingContext = link.SourceView.ExpressionParsingContext;
                    }
                    if (tableFilterWhere != null && tableFilterWhere.Count > 0)
                    {
                        table = FilterTable(table, link.SourceRow, tableFilterWhere);
                    }
                    var  whereUnion  = new WhereUnion(link.LinkToOpen.RowWhere, null, null, null, null, m_UIState.snapshotMode.SchemaToDisplay, table, expressionParsingContext);
                    long rowToSelect = whereUnion.GetIndexFirstMatch(link.SourceRow);
                    if (rowToSelect < 0)
                    {
                        UnityEngine.Debug.LogError("Could not find entry in target table '" + link.LinkToOpen.TableName + "'");
                        return;
                    }
                    OpenTable(tableRef, table, new Database.CellPosition(rowToSelect, 0), focus, select);
                }
                else if (tableFilterWhere != null && tableFilterWhere.Count > 0)
                {
                    table = FilterTable(table, link.SourceRow, tableFilterWhere);
                    OpenTable(tableRef, table, new Database.CellPosition(0, 0), focus, select);
                }
                else
                {
                    OpenTable(tableRef, table, new Database.CellPosition(0, 0), focus, select);
                }
            }
        }
Exemplo n.º 8
0
        public bool LoadView(string filename)
        {
            if (CurrentViewMode == ViewMode.ShowNone)
            {
                DebugUtility.LogWarning("Must open a snapshot before loading a view file");
                MemoryProfilerAnalytics.AddMetaDatatoEvent <MemoryProfilerAnalytics.LoadViewXMLEvent>(1);
                return(false);
            }

            if (String.IsNullOrEmpty(filename))
            {
                return(false);
            }

            using (ScopeDebugContext.Func(() => { return("File '" + filename + "'"); }))
            {
                var builder = Database.View.ViewSchema.Builder.LoadFromXMLFile(filename);
                if (builder == null)
                {
                    return(false);
                }

                BaseMode newMode = CurrentMode.BuildViewSchemaClone(builder);
                if (newMode == null)
                {
                    return(false);
                }

                switch (CurrentViewMode)
                {
                case ViewMode.ShowFirst:
                    FirstMode = newMode;
                    break;

                case ViewMode.ShowSecond:
                    SecondMode = newMode;
                    break;

                case ViewMode.ShowDiff:
                    diffMode   = newMode as DiffMode;
                    FirstMode  = diffMode.modeFirst;
                    SecondMode = diffMode.modeSecond;
                    break;

                default:
                    break;
                }
                history.Clear();
                ModeChanged(CurrentMode, CurrentViewMode);
            }
            return(true);
        }
Exemplo n.º 9
0
            public static Builder LoadFromXML(XmlElement root)
            {
                Builder b = new Builder();

                DebugUtility.TryGetMandatoryXmlAttribute(root, "name", out b.name);
                using (ScopeDebugContext.Func(() => { return("Column '" + b.name + "'"); }))
                {
                    b.value = Operation.Expression.MetaExpression.LoadFromXML(root);
                    if (!int.TryParse(root.GetAttribute("width"), out b.displayDefaultWidth))
                    {
                        b.displayDefaultWidth = 100;
                    }

                    string strisKey = root.GetAttribute("isKey");
                    if (strisKey != null && strisKey != "")
                    {
                        if (!bool.TryParse(strisKey, out b.isPrimaryKey))
                        {
                            UnityEngine.Debug.LogError("Error parsing bool value '" + strisKey + "', default to false");
                            b.isPrimaryKey = false;
                        }
                    }
                    string strGroupable = root.GetAttribute("groupable");
                    if (strGroupable == "duplicate")
                    {
                        b.groupAlgo = Database.Operation.Grouping.groupByDuplicate;
                    }
                    string strOp = root.GetAttribute("merged");
                    m_StringToMergeAlgo.TryGetValue(strOp, out b.mergeAlgoE);

                    b.FormatName = root.GetAttribute("format");

                    foreach (XmlNode node in root.ChildNodes)
                    {
                        if (node.NodeType == XmlNodeType.Element)
                        {
                            XmlElement e = (XmlElement)node;
                            if (e.Name == "Link")
                            {
                                LoadLinkFromXML(b, e);
                            }
                            else if (e.Name == "ParentGroup")
                            {
                                LoadParentGroupFromXML(b, e);
                            }
                        }
                    }

                    return(b);
                }
            }
Exemplo n.º 10
0
            public Select Create(ViewSchema vs, Database.Schema baseSchema, Table table)
            {
                Select sel = new Select();

                sel.name        = name;
                sel.sourceTable = baseSchema.GetTableByName(sourceTableName);
                sel.MaxRow      = MaxRow;
                if (sel.sourceTable == null)
                {
                    using (ScopeDebugContext.Func(() => { return("Select:'" + name + "'"); }))
                    {
                        DebugUtility.LogError("Error while building view '" + vs.name + "' select '" + name + "'. No table named '" + sourceTableName + "'");
                        return(null);
                    }
                }

                return(sel);
            }
Exemplo n.º 11
0
 public void Build(ViewSchema vs, ViewTable vTable, SelectSet selectSet, Select sel, Database.Schema baseSchema, Operation.ExpressionParsingContext expressionParsingContext)
 {
     using (ScopeDebugContext.Func(() => { return("Select:'" + name + "'"); }))
     {
         if (where.Count > 0)
         {
             sel.where = new WhereUnion();
             foreach (var w in where)
             {
                 var w2 = w.Build(vs, vTable, selectSet, sel, baseSchema, sel.sourceTable, expressionParsingContext);
                 if (w2.Comparison.IsManyToMany())
                 {
                     sel.isManyToMany = true;
                 }
                 sel.where.Add(w2);
             }
         }
     }
 }
Exemplo n.º 12
0
 public ViewSchema Build(Database.Schema baseSchema)
 {
     using (ScopeDebugContext.Func(() => { return("ViewSchema '" + name + "'"); }))
     {
         ViewSchema vs = new ViewSchema();
         vs.baseSchema = baseSchema;
         vs.tables     = new ViewTable[viewTable.Count];
         vs.name       = name;
         int i = 0;
         foreach (var tBuilder in viewTable)
         {
             var table = tBuilder.Build(vs, baseSchema);
             vs.tables[i] = table;
             vs.tablesByName.Add(table.GetName(), table);
             ++i;
         }
         return(vs);
     }
 }
Exemplo n.º 13
0
            public static Builder LoadFromXML(XmlElement root)
            {
                Builder b = new Builder();

                b.name            = root.GetAttribute("name");
                b.sourceTableName = root.GetAttribute("table");
                string strMaxRow = root.GetAttribute("maxRow");

                if (string.IsNullOrEmpty(strMaxRow) || !int.TryParse(strMaxRow, out b.MaxRow))
                {
                    b.MaxRow = -1;
                }
                using (ScopeDebugContext.Func(() => { return("Select:'" + b.name + "'"); }))
                {
                    foreach (XmlNode node in root.ChildNodes)
                    {
                        if (node.NodeType == XmlNodeType.Element)
                        {
                            XmlElement e = (XmlElement)node;
                            switch (e.Name)
                            {
                            case "Where":
                            {
                                var w = Where.Builder.LoadFromXML(e);
                                if (w != null)
                                {
                                    b.where.Add(w);
                                }
                                break;
                            }

                            default:
                                DebugUtility.LogInvalidXmlChild(root, e);
                                break;
                            }
                        }
                    }
                    return(b);
                }
            }
Exemplo n.º 14
0
            public static Builder LoadFromXML(XmlElement root)
            {
                using (ScopeDebugContext.Func(() => { return("Loading SelectSet"); }))
                {
                    Builder b = new Builder();
                    foreach (XmlNode xNode in root.ChildNodes)
                    {
                        if (xNode.NodeType == XmlNodeType.Element)
                        {
                            XmlElement e = (XmlElement)xNode;
                            switch (e.Name)
                            {
                            case "Select":
                            {
                                var s = Select.Builder.LoadFromXML(e);
                                if (s != null)
                                {
                                    b.select.Add(s);
                                }
                                break;
                            }

                            case "Condition":
                            {
                                b.Condition = Operation.MetaExpComparison.LoadFromXML(e);
                                break;
                            }

                            default:
                                DebugUtility.LogInvalidXmlChild(root, e);
                                break;
                            }
                        }
                    }
                    return(b);
                }
            }
Exemplo n.º 15
0
        void OpenLinkRequest(Database.LinkRequestTable link, bool focus)
        {
            //TODO this code is the same as the one inSpreadsheetPane, should be put together
            using (ScopeDebugContext.String("OpenLinkRequest"))
            {
                UIElementsHelper.SetVisibility(VisualElements[2], m_ActiveMode.snapshot.nativeAllocationSites.Count > 0 && m_CurrentTableView == TableDisplayMode.Allocations);

                var tableRef = new Database.TableReference(link.LinkToOpen.TableName, link.Parameters);
                var table    = m_ActiveMode.SchemaToDisplay.GetTableByReference(tableRef);
                if (table == null)
                {
                    UnityEngine.Debug.LogError("No table named '" + link.LinkToOpen.TableName + "' found.");
                    return;
                }
                if (link.LinkToOpen.RowWhere != null && link.LinkToOpen.RowWhere.Count > 0)
                {
                    Database.Table filteredTable = table;
                    if (table.GetMetaData().defaultFilter != null)
                    {
                        filteredTable = table.GetMetaData().defaultFilter.CreateFilter(table);
                    }
                    Database.Operation.ExpressionParsingContext expressionParsingContext = null;
                    if (link.SourceView != null)
                    {
                        expressionParsingContext = link.SourceView.expressionParsingContext;
                    }
                    var whereUnion = new Database.View.WhereUnion(link.LinkToOpen.RowWhere, null, null, null, null, m_ActiveMode.SchemaToDisplay, filteredTable, expressionParsingContext);
                    var indices    = whereUnion.GetMatchingIndices(link.SourceRow);
                    var newTab     = new Database.Operation.IndexedTable(table, new ArrayRange(indices));
                    OpenTable(tableRef, newTab, focus);
                }
                else
                {
                    OpenTable(tableRef, table, new Database.CellPosition(0, 0), focus);
                }
            }
        }
Exemplo n.º 16
0
                public ViewTable Build(BuildingData buildingData, ViewTable parent, long row, ViewSchema vs, Database.Schema baseSchema, Operation.ExpressionParsingContext parentExpressionParsingContext)
                {
                    // Check for usage error from data.
                    if (parent == null && String.IsNullOrEmpty(name))
                    {
                        DebugUtility.LogError("Table need a name");
                        return(null);
                    }

                    using (ScopeDebugContext.Func(() => { return("View '" + GetFullName() + "'"); }))
                    {
                        // Check for usage error from code.
                        DebugUtility.CheckCondition(parent == null || (parent.node == this.parent), "Parent ViewTable must points to the node's parent while building child node's ViewTable.");


                        ViewTable vTable = new ViewTable(vs, baseSchema, this, parentExpressionParsingContext);


                        // If has local select set, create it and add it to the expression parsing context hierarchy. see [Figure.1]
                        vTable.SetupLocalSelectSet(localSelectSet.Build(vTable, vs, baseSchema));

                        MetaTable metaTable = BuildOrGetMetaTable(parent, vTable);

                        if (buildingData.MetaTable == null)
                        {
                            buildingData.MetaTable = metaTable;
                        }

                        //declare columns
                        foreach (var colb in column)
                        {
                            MetaColumn metaColumn = metaTable.GetColumnByName(colb.name);

                            colb.BuildOrUpdateDeclaration(buildingData, vTable, ref metaColumn, vTable.ExpressionParsingContext);
                        }

                        if (data != null)
                        {
                            data.Build(buildingData, this, vTable, parent, parentExpressionParsingContext);
                        }

                        // Fix meta columns (that does not have a data type set) to their fallback value
                        foreach (var fb in buildingData.FallbackColumnType)
                        {
                            if (fb.Key.Type == null)
                            {
                                fb.Key.Type = fb.Value;
                            }
                        }

                        //Build missing column with default behavior
                        for (int i = 0; i != metaTable.GetColumnCount(); ++i)
                        {
                            var metaColumn = metaTable.GetColumnByIndex(i);
                            var column     = vTable.GetColumnByIndex(i);

                            if (column == null)
                            {
                                if (metaColumn.DefaultMergeAlgorithm != null)
                                {
                                    //when we have a merge algorithm, set the entries as the result of each group's merge value.
                                    column = ViewColumn.Builder.BuildColumnNodeMerge(vTable, metaColumn, parentExpressionParsingContext);
                                }

                                vTable.SetColumn(metaColumn, column);
                            }
                        }

                        if (data != null && data.type == Data.DataType.Select && vTable.dataSelectSet.IsManyToMany())
                        {
                            DebugUtility.LogError("Cannot build a view using a many-to-many select statement. Specify a row value for your select statement where condition(s).");
                            MemoryProfilerAnalytics.AddMetaDatatoEvent <MemoryProfilerAnalytics.LoadViewXMLEvent>(7);
                        }

                        return(vTable);
                    }
                }
Exemplo n.º 17
0
                public ViewTable Build(ViewTable parent, long row, ViewSchema vs, Database.Schema baseSchema, Operation.ExpressionParsingContext parentExpressionParsingContext)
                {
                    // Check for usage error from data.
                    if (parent == null && String.IsNullOrEmpty(name))
                    {
                        DebugUtility.LogError(FormatErrorContextInfo(vs) + ": Table need a name");
                        return(null);
                    }
                    using (ScopeDebugContext.Func(() => { return("View '" + GetFullName() + "'"); }))
                    {
                        // Check for usage error from code.
                        DebugUtility.CheckCondition(parent == null || (parent.node == this.parent), FormatErrorContextInfo(vs) + ": Parent ViewTable must points to the node's parent while building child node's ViewTable.");

                        if (data == null)
                        {
                            //no data
                            return(null);
                        }

                        ViewTable vTable = new ViewTable(vs, baseSchema);
                        vTable.node = this;
                        vTable.parentExpressionParsingContext = parentExpressionParsingContext;
                        vTable.expressionParsingContext       = parentExpressionParsingContext;

                        // If has local select set, create it and add it to the expression parsing context hierarchy. see [Figure.1]
                        vTable.localSelectSet = localSelectSet.Build(vTable, vs, baseSchema);
                        if (vTable.localSelectSet != null)
                        {
                            vTable.expressionParsingContext = new Operation.ExpressionParsingContext(vTable.expressionParsingContext, vTable.localSelectSet);
                        }

                        MetaTable metaTable = BuildOrGetMetaTable(parent, vTable);

                        //declare columns
                        foreach (var colb in column)
                        {
                            MetaColumn metaColumn    = metaTable.GetColumnByName(colb.name);
                            bool       hadMetaColumn = metaColumn != null;

                            colb.BuildOrUpdateDeclaration(ref metaColumn);

                            // add the metacolum to the metatable if it just got created
                            if (!hadMetaColumn)
                            {
                                metaTable.AddColumn(metaColumn);
                            }
                        }

                        data.Build(this, vTable, parent, vs, baseSchema, parentExpressionParsingContext, metaTable);


                        //Build missing column with default behavior
                        for (int i = 0; i != metaTable.GetColumnCount(); ++i)
                        {
                            var metaColumn = metaTable.GetColumnByIndex(i);
                            var column     = vTable.GetColumnByIndex(i);

                            if (column == null)
                            {
                                if (metaColumn.DefaultMergeAlgorithm != null)
                                {
                                    //when we have a merge algorithm, set the entries as the result of each group's merge value.
                                    column = ViewColumn.Builder.BuildColumnNodeMerge(vTable, metaColumn, parentExpressionParsingContext);
                                }

                                vTable.SetColumn(metaColumn, column);
                            }
                        }

                        if (data.type == Data.DataType.Select && vTable.dataSelectSet.IsManyToMany())
                        {
                            DebugUtility.LogError("Cannot build the view table '" + vTable.GetName() + "' using a many-to-many select statement. Specify a row value for your select statement where condition(s).");
                            MemoryProfilerAnalytics.AddMetaDatatoEvent <MemoryProfilerAnalytics.LoadViewXMLEvent>(7);
                        }

                        return(vTable);
                    }
                }