摘要 |
Disclosed are an apparatus, system, and method for generating a post-order set of members referenced by an MDX query statement invoking a post-order function. The apparatus includes an input module that receives the MDX expression specifying the relevant data set. A pre-order module generates a set of the members in pre-order organization. An initialization module generates an empty post-order set and inserts the first member of the pre-order set into the post-order set. An ancestor module determines whether the next member in the pre-order set has an ancestor in the post-order set and the location of the closest ancestor of the member if it exists. An insertion module then inserts the member immediately before the closest ancestor if the ancestor exists, or puts it in the rightmost position of the post-order set if an ancestor does not exist. An iteration module invokes the ancestor and insertion modules for each member of the pre-order set until the post-order set is filled.
|