Package mondrian.olap.fun
Class AbstractAggregateFunDef
java.lang.Object
org.eigenbase.xom.XMLUtil
org.eigenbase.xom.XOMUtil
mondrian.olap.Util
mondrian.olap.fun.FunUtil
mondrian.olap.fun.FunDefBase
mondrian.olap.fun.AbstractAggregateFunDef
- All Implemented Interfaces:
FunDef
- Direct Known Subclasses:
AggregateFunDef,NthQuartileFunDef
Abstract base class for all aggregate functions (
Aggregate,
Sum, Avg, et cetera).- Since:
- 2005/8/14
- Author:
- jhyde
-
Nested Class Summary
Nested classes/interfaces inherited from class mondrian.olap.fun.FunUtil
FunUtil.DescendingValueComparatorNested classes/interfaces inherited from class mondrian.olap.Util
Util.AbstractFlatList<T>, Util.ByteMatcher, Util.ErrorCellValue, Util.Flat2List<T>, Util.Flat3List<T>, Util.Functor1<RT,PT>, Util.GcIterator<T>, Util.MemoryInfo, Util.PropertyList, Util.SqlNullSafeComparator -
Field Summary
Fields inherited from class mondrian.olap.fun.FunDefBase
flags, parameterCategories, returnCategoryFields inherited from class mondrian.olap.fun.FunUtil
BooleanNull, DoubleEmpty, DoubleNull, IntegerNull, NullMemberFields inherited from class mondrian.olap.Util
DEBUG, EmptyValue, IBM_JVM, JdbcVersion, JVM_INSTANCE_UUID, nl, nullValue, Retrowoven -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TupleIterableevaluateCurrentIterable(IterCalc iterCalc, Evaluator evaluator) protected static TupleListevaluateCurrentList(ListCalc listCalc, Evaluator evaluator) Evaluates the list of members or tuples used in computing the aggregate.static TupleListprocessUnrelatedDimensions(TupleList tuplesForAggregation, Evaluator evaluator) Pushes unrelated dimensions to the top level member from the given list of tuples if the ignoreUnrelatedDimensions property is set on the base cube usage in the virtual cube.protected ExpvalidateArg(Validator validator, Exp[] args, int i, int category) Validates an argument to a call to this function.Methods inherited from class mondrian.olap.fun.FunDefBase
compileCall, createCall, getDescription, getName, getParameterCategories, getResultType, getReturnCategory, getSignature, getSyntax, unparseMethods inherited from class mondrian.olap.fun.FunUtil
avg, box, box, checkIterListResultStyles, checkListResultStyles, compareHierarchically, compareSiblingMembers, compareValues, compareValues, count, decodeCategory, decodeParameterCategories, decodeReturnCategory, decodeSyntacticType, getDimensionDefaultHierarchy, getNonEmptyMemberChildren, getNonEmptyMemberChildrenWithDetails, isAncestorOf, makeNullTuple, max, min, newEvalException, newEvalException, newEvalException, quartile, resolveFunArgs, sum, sumDouble, sumDouble, tupleContainsNullMember, tupleContainsNullMember, worthCachingMethods inherited from class mondrian.olap.Util
addAppender, addDatabaseTime, addLevelCalculatedMembers, append, appendArrays, areOccurencesEqual, assertPostcondition, assertPostcondition, assertPrecondition, assertPrecondition, assertTrue, assertTrue, badValue, binarySearch, bitSetBetween, camelToUpper, canCast, cancelStatement, caseSensitiveCompareName, cast, cast, castToIterable, checkCJResultLimit, close, commaList, compare, compareIntegers, compareKey, compareName, compileScript, convert, convert, convertOlap4jConnectStringToNativeMondrian, convertStackToString, copyOf, copyOf, copyOf, copyOf, copyOf, createExpr, createRandom, createRootRole, createSimpleValidator, createUdf, dbTimeMillis, deprecated, deprecated, digestMd5, digestSha256, equal, equalName, equals, equals, explain, falseFunctor, filter, flatList, flatList, flatListCopy, generateUuidString, genericArray, getAnnotation, getClosestResource, getDimensionCube, getErrorMessage, getErrorMessage, getExecutorService, getFirstDescendantOnLevel, getMatchingCause, getMemberOrdinalInParent, getMemoryInfo, getScheduledExecutorService, hash, hash, hashArray, identityFunctor, implode, intersect, isBlank, isEmpty, isNull, isSorted, isValidProperty, last, lookup, lookup, lookup, lookup, lookup, lookupCompound, lookupCompound, lookupHierarchyLevel, lookupHierarchyRootMember, lookupHierarchyRootMember, lookupProperty, makeAppender, makeBigDecimalFromDouble, makeFqName, makeFqName, makeFqName, matches, matches, mdxEncodeString, needToImplement, newElementNotFoundException, newError, newError, newIdentityHashSet, newIdentityHashSetFake, newInternal, newInternal, newTimer, nonDbTimeMillis, normalizeName, only, parseCommaList, parseConnectString, parseIdentifier, parseInterval, parseLocale, printMemory, printMemory, quoteForMdx, quoteForMdx, quoteJavaString, quoteMdxIdentifier, quoteMdxIdentifier, quoteMdxIdentifier, quoteMdxIdentifier, quotePattern, readFully, readFully, readURL, readURL, readURL, readVirtualFile, readVirtualFileAsString, removeAppender, replace, replace, replaceProperties, safeGet, setLevel, singleQuoteString, singleQuoteString, sort, sort, threadLocalRemove, toMap, toNullValuesMap, toOlap4j, toOlap4j, toOlap4j, toURL, trueFunctor, unexpected, uniquify, unparse, unparse, wildcardToRegexpMethods inherited from class org.eigenbase.xom.XOMUtil
addChild, addChild, addChildren, addElement, concatenate, createDefaultParser, discard, discard, discard, discard, discard, discard, discard, discard, discard, getFirstInstance, wrapperToXmlMethods inherited from class org.eigenbase.xom.XMLUtil
getFirstTagName, printAtt, printAtt, printAtt, printAtt, printPCDATA, printPCDATA, printPCDATA, quoteAtt, quoteAtt, quoteAtt, quoteAtt, quotePCDATA, stringEncodeXML, stringHasXMLSpecials
-
Constructor Details
-
AbstractAggregateFunDef
-
-
Method Details
-
validateArg
Description copied from class:FunDefBaseValidates an argument to a call to this function.The default implementation of this method adds an implicit conversion to the correct type. Derived classes may override.
- Overrides:
validateArgin classFunDefBase- Parameters:
validator- Validatorargs- Arguments to this functioni- Ordinal of argumentcategory- Expectedcategoryof argument- Returns:
- Validated argument
-
evaluateCurrentList
Evaluates the list of members or tuples used in computing the aggregate. If the measure for aggregation has to ignore unrelated dimensions this method will push unrelated dimension members to top level member. This behaviour is driven by the ignoreUnrelatedDimensions property on a base cube usage specified in the virtual cube.Keeps track of the number of iterations that will be required to iterate over the members or tuples needed to compute the aggregate within the current context. In doing so, also determines if the cross product of all iterations across all parent evaluation contexts will exceed the limit set in the properties file.- Parameters:
listCalc- calculator used to evaluate the member listevaluator- current evaluation context- Returns:
- list of evaluated members or tuples
-
evaluateCurrentIterable
-