public override Table CreateGroupTable(long groupIndex) { if (IsGroupDegenerate(groupIndex)) { // if sub table is an expand table, act as pass-through if (m_expandTable != null) { var i = m_Groups[groupIndex].m_GroupIndice[0]; return(m_expandTable.CreateGroupTable(i)); } } if (m_createGroupTable != null) { return(m_createGroupTable(this, m_Groups[groupIndex], groupIndex)); } int subGroupColumn = m_GroupedColumnFirst + 1; if (subGroupColumn < m_GroupedColumnLast) { GroupedTable subTable = new GroupedTable(m_table, m_Groups[groupIndex].m_GroupIndice, subGroupColumn, m_GroupedColumnLast, m_ColumnOrder, m_SortOrder); return(subTable); } else if (subGroupColumn < m_ColumnOrder.Length) { //create a sorted table only SortedTable subTable = new SortedTable(m_table, m_ColumnOrder, m_SortOrder, subGroupColumn, m_Groups[groupIndex].m_GroupIndice); return(subTable); } else { //create indexed table IndexedTable subTable = new IndexedTable(m_table, m_Groups[groupIndex].m_GroupIndice); return(subTable); } }
public void Initialize(GroupedTable table, Column column, int columnIndex, Grouping.IMergeAlgorithm algo, bool isGroup) { base.Initialize(table, column, columnIndex); m_GroupTable = table; algorithm = algo; m_IsGroupKey = isGroup; m_GroupComputed = new bool[table.m_Groups.Length]; m_GroupData = new DataT[table.m_Groups.Length]; }