public abstract class MultiResolver extends FunUtil implements Resolver
MultiResolver
considers several overloadings of the same
function. If one of these overloadings matches the actual arguments, it
calls the factory method createFunDef(mondrian.olap.Exp[], mondrian.olap.FunDef)
.FunUtil.DescendingValueComparator, FunUtil.ObjIntPair<T>, FunUtil.OrderKey
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
Resolver.Conversion
BooleanNull, DoubleEmpty, DoubleNull, IntegerNull, NullMember
DEBUG, EmptyValue, IBM_JVM, JdbcVersion, JVM_INSTANCE_UUID, nl, nullValue, Retrowoven
Modifier | Constructor and Description |
---|---|
protected |
MultiResolver(String name,
String signature,
String description,
String[] signatures)
Creates a
MultiResolver . |
Modifier and Type | Method and Description |
---|---|
protected abstract FunDef |
createFunDef(Exp[] args,
FunDef dummyFunDef) |
String |
getDescription()
Returns the description of the function or operator.
|
FunDef |
getFunDef()
Returns a representative example of the function which this Resolver
can produce, for purposes of describing the function set.
|
String |
getName()
Returns the name of the function or operator.
|
String[] |
getReservedWords()
Returns an array of symbolic constants which can appear as arguments
to this function.
|
String |
getSignature()
Returns a string describing the syntax of this function, for example
|
String[] |
getSignatures() |
Syntax |
getSyntax()
Returns the syntax with which the function or operator was invoked.
|
boolean |
requiresExpression(int k)
Returns whether a particular argument must be a scalar expression.
|
FunDef |
resolve(Exp[] args,
Validator validator,
List<Resolver.Conversion> conversions)
Given a particular set of arguments the function is applied to, returns
the correct overloaded form of the function.
|
avg, box, box, checkIterListResultStyles, checkListResultStyles, compareHierarchically, compareSiblingMembers, compareValues, compareValues, count, decodeCategory, decodeParameterCategories, decodeReturnCategory, decodeSyntacticType, getDimensionDefaultHierarchy, getNonEmptyMemberChildren, getNonEmptyMemberChildrenWithDetails, hierarchizeMemberList, hierarchizeTupleList, makeNullTuple, max, min, newEvalException, newEvalException, newEvalException, partiallySortMembers, partiallySortTuples, quartile, resolveFunArgs, sortTuples, stablePartialSort, stablePartialSort, stablePartialSortArray, stablePartialSortJulian, stablePartialSortMarc, stablePartialSortPedro, sum, sumDouble, sumDouble, tupleContainsNullMember, tupleContainsNullMember, worthCaching
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, falseFunctor, filter, flatList, flatList, flatListCopy, generateUuidString, genericArray, getAnnotation, getClosestResource, getDimensionCube, getErrorMessage, getErrorMessage, getExecutorService, getFirstDescendantOnLevel, getMatchingCause, getMemberOrdinalInParent, getMembersToHierarchyMap, 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, 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, replace, replace, replaceProperties, safeGet, singleQuoteString, singleQuoteString, sort, sort, threadLocalRemove, toMap, toNullValuesMap, toOlap4j, toOlap4j, toOlap4j, toURL, trueFunctor, unexpected, uniquify, unparse, unparse, wildcardToRegexp
addChild, addChild, addChildren, addElement, concatenate, createDefaultParser, discard, discard, discard, discard, discard, discard, discard, discard, discard, getFirstInstance, wrapperToXml
protected MultiResolver(String name, String signature, String description, String[] signatures)
MultiResolver
.name
- Name of function or operatorsignature
- Signature of function or operatordescription
- Description of function or operatorsignatures
- Array of possible signatures, each of which is an
encoding of the syntactic type, return type, and parameter
types of this operator. The "Members" operator has a syntactic
type "pxd" which means "an operator with
property
syntax (p) which returns a set
(x) and takes a dimension (d) as its argument".
See FunUtil.decodeSyntacticType(String)
,
FunUtil.decodeReturnCategory(String)
,
FunUtil.decodeParameterCategories(String)
.public String getName()
Resolver
public String getDescription()
Resolver
getDescription
in interface Resolver
public String getSignature()
Resolver
StrToSet()
getSignature
in interface Resolver
public Syntax getSyntax()
Resolver
public String[] getReservedWords()
Resolver
For example, the DrilldownMember
may take the symbol
RECURSIVE
as an argument. Most functions do not define
any symbolic constants.
getReservedWords
in interface Resolver
public String[] getSignatures()
public FunDef getFunDef()
Resolver
public FunDef resolve(Exp[] args, Validator validator, List<Resolver.Conversion> conversions)
Resolver
The method adds an item to conversions
every
time it performs an implicit type-conversion. If there are several
candidate functions with the same signature, the validator will choose
the one which used the fewest implicit conversions.
resolve
in interface Resolver
args
- Expressions which this function call is applied to.validator
- Validatorconversions
- List of implicit conversions performed (out)public boolean requiresExpression(int k)
Resolver
false
if any of the variants of this resolver
allows a set as its k
th argument; true otherwise.requiresExpression
in interface Resolver
Copyright © 2019 Hitachi Vantara. All rights reserved.