001    /*
002    // $Id: //open/mondrian/src/main/mondrian/olap/fun/UnorderFunDef.java#1 $
003    // This software is subject to the terms of the Common Public License
004    // Agreement, available at the following URL:
005    // http://www.opensource.org/licenses/cpl.html.
006    // Copyright (C) 2008-2008 Julian Hyde and others
007    // All Rights Reserved.
008    // You must accept the terms of that agreement to use this software.
009    */
010    package mondrian.olap.fun;
011    
012    import mondrian.calc.Calc;
013    import mondrian.calc.ExpCompiler;
014    import mondrian.mdx.ResolvedFunCall;
015    import mondrian.olap.FunDef;
016    
017    /**
018     * Definition of the <code>Unorder</code> MDX function.
019     *
020     * @author jhyde
021     * @version $Id: //open/mondrian/src/main/mondrian/olap/fun/UnorderFunDef.java#1 $
022     * @since Sep 06, 2008
023     */
024    class UnorderFunDef extends FunDefBase {
025    
026        static final ReflectiveMultiResolver Resolver = new ReflectiveMultiResolver(
027                "Unorder",
028                "Unorder(<Set>)",
029                "Removes any enforced ordering from a specified set.",
030                new String[]{"fxx"},
031                UnorderFunDef.class);
032    
033        public UnorderFunDef(FunDef dummyFunDef) {
034            super(dummyFunDef);
035        }
036    
037        public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) {
038            // Currently Unorder has no effect. In future, we may use the function
039            // as a marker to weaken the ordering required from an expression and
040            // therefore allow the compiler to use a more efficient implementation
041            // that does not return a strict order.
042            return compiler.compile(call.getArg(0));
043        }
044    }
045    
046    // End UnorderFunDef.java