001/* 002// This software is subject to the terms of the Eclipse Public License v1.0 003// Agreement, available at the following URL: 004// http://www.eclipse.org/legal/epl-v10.html. 005// You must accept the terms of that agreement to use this software. 006// 007// Copyright (C) 2008-2011 Pentaho and others 008// All Rights Reserved. 009*/ 010package mondrian.olap.fun; 011 012import mondrian.calc.Calc; 013import mondrian.calc.ExpCompiler; 014import mondrian.mdx.ResolvedFunCall; 015import mondrian.olap.FunDef; 016 017/** 018 * Definition of the <code>Unorder</code> MDX function. 019 * 020 * @author jhyde 021 * @since Sep 06, 2008 022 */ 023class UnorderFunDef extends FunDefBase { 024 025 static final ReflectiveMultiResolver Resolver = 026 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