1. An apparatus for generating a post-ordered set from a pre-ordered set of data derived from a data cube in a database management system (DBMS) implementing an online analytical processing (OLAP) system, wherein the pre-ordered set is presented such that a dimension member will appear in a resulting ordered list before any of the dimension member's descendants and the post-ordered set is presented such that a dimension member will appear in the resulting ordered list after all of the dimension member's descendents, the apparatus comprising: a non-transitory computer readable storage medium; an input module configured to receive a multidimensional expression (MDX) query statement that invokes a post-order hierarchize function and that specifies a set of data from a data cube as a parameter of the post-order hierarchize function, wherein the set of data comprises one or more hierarchically-related members; a pre-order module configured to generate a pre-order set of the hierarchically-related members from the set of data by executing a pre-order hierarchize function on the set of data such that the pre-order set is organized in pre-order form; an initialization module configured to generate a post-order set and to insert a first member of the pre-order set into the post-order set in response to determining that the post-order set is empty; an ancestor module configured to determine whether a member of the pre-order set has an ancestor in the post-order set, the ancestor module further configured to determine a location in the post-order set of a closest ancestor of the member; an insertion module configured to, insert the member of the pre-order set into the post-order set, in a position immediately before the closest ancestor, in response to the ancestor module determining the location of the closest ancestor of the member; and insert the member of the pre-order set into a rightmost position of the post-order set in response to the ancestor module determining that the member has no ancestor in the post-order set; and an iteration module configured to invoke the ancestor module and the insertion module for every member of the pre-order set.
1. An apparatus for generating a post-ordered set from a pre-ordered set of data derived from a data cube in a database management system (DBMS) implementing an online analytical processing (OLAP) system, wherein the pre-ordered set is presented such that a dimension member will appear in a resulting ordered list before any of the dimension member's descendants and the post-ordered set is presented such that a dimension member will appear in the resulting ordered list after all of the dimension member's descendents, the apparatus comprising: a non-transitory computer readable storage medium; an input module configured to receive a multidimensional expression (MDX) query statement that invokes a post-order hierarchize function and that specifies a set of data from a data cube as a parameter of the post-order hierarchize function, wherein the set of data comprises one or more hierarchically-related members; a pre-order module configured to generate a pre-order set of the hierarchically-related members from the set of data by executing a pre-order hierarchize function on the set of data such that the pre-order set is organized in pre-order form; an initialization module configured to generate a post-order set and to insert a first member of the pre-order set into the post-order set in response to determining that the post-order set is empty; an ancestor module configured to determine whether a member of the pre-order set has an ancestor in the post-order set, the ancestor module further configured to determine a location in the post-order set of a closest ancestor of the member; an insertion module configured to, insert the member of the pre-order set into the post-order set, in a position immediately before the closest ancestor, in response to the ancestor module determining the location of the closest ancestor of the member; and insert the member of the pre-order set into a rightmost position of the post-order set in response to the ancestor module determining that the member has no ancestor in the post-order set; and an iteration module configured to invoke the ancestor module and the insertion module for every member of the pre-order set. 3. The apparatus of claim 1 , wherein the DBMS is a data warehouse and the OLAP system is one of a relational OLAP (ROLAP), a multidimensional OLAP (MOLAP), and a hybrid OLAP (HOLAP).