public abstract class UnaryNumericSPARQLAggregationFunctionSymbolImpl extends SPARQLFunctionSymbolImpl implements SPARQLAggregationFunctionSymbol
SPARQLAggregationFunctionSymbol.AggregationSimplificationFunctionSymbol.FunctionalTermNullability| Constructor and Description |
|---|
UnaryNumericSPARQLAggregationFunctionSymbolImpl(String name,
String officialName,
boolean isDistinct,
RDFTermType rootRdfTermType,
String defaultAggVariableName) |
| Modifier and Type | Method and Description |
|---|---|
protected ImmutableTerm |
buildTermAfterEvaluation(com.google.common.collect.ImmutableList<ImmutableTerm> newTerms,
TermFactory termFactory,
VariableNullability variableNullability)
By default, just build a new functional term.
|
boolean |
canBePostProcessed(com.google.common.collect.ImmutableList<? extends ImmutableTerm> arguments)
1.
|
protected abstract ImmutableFunctionalTerm |
createAggregate(ConcreteNumericRDFDatatype rdfType,
ImmutableTerm dbTerm,
TermFactory termFactory) |
protected DefinitionPushDownRequest |
createNonNumericRequest(ImmutableTerm subTermTypeTerm,
Variable nonNumericVariable,
com.google.common.collect.ImmutableSet<RDFTermType> nonNumericTypes,
TermFactory termFactory) |
Optional<SPARQLAggregationFunctionSymbol.AggregationSimplification> |
decomposeIntoDBAggregation(com.google.common.collect.ImmutableList<? extends ImmutableTerm> subTerms,
com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableSet<RDFTermType>> possibleRDFTypes,
boolean hasGroupBy,
VariableNullability variableNullability,
VariableGenerator variableGenerator,
TermFactory termFactory) |
protected abstract SPARQLAggregationFunctionSymbol.AggregationSimplification |
decomposeMultityped(ImmutableTerm subTerm,
com.google.common.collect.ImmutableSet<RDFTermType> subTermPossibleTypes,
boolean hasGroupBy,
VariableNullability variableNullability,
VariableGenerator variableGenerator,
TermFactory termFactory) |
protected SPARQLAggregationFunctionSymbol.AggregationSimplification |
decomposeUnityped(ImmutableTerm subTerm,
RDFTermType subTermType,
boolean hasGroupBy,
VariableNullability variableNullability,
VariableGenerator variableGenerator,
TermFactory termFactory) |
protected com.google.common.collect.ImmutableSet<RDFTermType> |
extractNonNumericTypes(com.google.common.collect.ImmutableSet<RDFTermType> subTermPossibleTypes) |
Optional<TermTypeInference> |
inferType(com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms)
Too complex to be implemented (for the moment)
|
protected abstract ConcreteNumericRDFDatatype |
inferTypeWhenNonEmpty(ConcreteNumericRDFDatatype inputNumericDatatype,
TypeFactory typeFactory) |
boolean |
isAggregation()
By default, assume it is not an aggregation function symbol
To be overridden when needed
|
boolean |
isAlwaysInjectiveInTheAbsenceOfNonInjectiveFunctionalTerms()
When the function symbol is, in the absence of non-injective functional sub-terms, sometimes but not always injective,
please override isInjective(...)
|
boolean |
isDistinct() |
boolean |
isNullable(com.google.common.collect.ImmutableSet<Integer> nullableIndexes)
Nullable due to typing errors
|
protected boolean |
tolerateNulls()
Returns true if is not guaranteed to return NULL when one argument is NULL.
|
getIRI, getOfficialNameextractLexicalTerm, extractRDFTermTypeTerm, isRDFFunctionalTerm, mayReturnNullWithoutNullArgumentsanalyzeInjectivity, canBeSafelyDecomposedIntoConjunction, decomposeInjectiveTopFunctionalTerm, enableIfElseNullLifting, evaluateIsNotNull, evaluateNullability, evaluateStrictEq, evaluateStrictEqWithFunctionalTerm, evaluateStrictEqWithNonNullConstant, getExpectedBaseType, getExpectedBaseTypes, isDeterministic, isInjective, proposeProvenanceVariables, simplify, simplifyAsGuaranteedToBeNonNull, transformIntoRegularArguments, tryToLiftMagicNumbersclone, equals, getArity, getName, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetIRI, getOfficialNameevaluateEmptyBaganalyzeInjectivity, evaluateIsNotNull, evaluateNullability, evaluateStrictEq, getExpectedBaseType, isDeterministic, proposeProvenanceVariables, simplify, simplifyAsGuaranteedToBeNonNullpublic UnaryNumericSPARQLAggregationFunctionSymbolImpl(String name, String officialName, boolean isDistinct, RDFTermType rootRdfTermType, String defaultAggVariableName)
public boolean isDistinct()
public boolean isAggregation()
FunctionSymbolImplisAggregation in interface FunctionSymbolisAggregation in class FunctionSymbolImplprotected boolean tolerateNulls()
FunctionSymbolImpltolerateNulls in class FunctionSymbolImplpublic boolean isAlwaysInjectiveInTheAbsenceOfNonInjectiveFunctionalTerms()
FunctionSymbolImplisAlwaysInjectiveInTheAbsenceOfNonInjectiveFunctionalTerms in class FunctionSymbolImplpublic Optional<TermTypeInference> inferType(com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms)
inferType in interface FunctionSymbolpublic boolean canBePostProcessed(com.google.common.collect.ImmutableList<? extends ImmutableTerm> arguments)
FunctionSymbolcanBePostProcessed in interface FunctionSymbolpublic boolean isNullable(com.google.common.collect.ImmutableSet<Integer> nullableIndexes)
isNullable in interface FunctionSymbolisNullable in class FunctionSymbolImplprotected ImmutableTerm buildTermAfterEvaluation(com.google.common.collect.ImmutableList<ImmutableTerm> newTerms, TermFactory termFactory, VariableNullability variableNullability)
FunctionSymbolImplbuildTermAfterEvaluation in class FunctionSymbolImplpublic Optional<SPARQLAggregationFunctionSymbol.AggregationSimplification> decomposeIntoDBAggregation(com.google.common.collect.ImmutableList<? extends ImmutableTerm> subTerms, com.google.common.collect.ImmutableList<com.google.common.collect.ImmutableSet<RDFTermType>> possibleRDFTypes, boolean hasGroupBy, VariableNullability variableNullability, VariableGenerator variableGenerator, TermFactory termFactory)
decomposeIntoDBAggregation in interface SPARQLAggregationFunctionSymbolprotected SPARQLAggregationFunctionSymbol.AggregationSimplification decomposeUnityped(ImmutableTerm subTerm, RDFTermType subTermType, boolean hasGroupBy, VariableNullability variableNullability, VariableGenerator variableGenerator, TermFactory termFactory)
protected abstract ConcreteNumericRDFDatatype inferTypeWhenNonEmpty(ConcreteNumericRDFDatatype inputNumericDatatype, TypeFactory typeFactory)
protected abstract SPARQLAggregationFunctionSymbol.AggregationSimplification decomposeMultityped(ImmutableTerm subTerm, com.google.common.collect.ImmutableSet<RDFTermType> subTermPossibleTypes, boolean hasGroupBy, VariableNullability variableNullability, VariableGenerator variableGenerator, TermFactory termFactory)
protected abstract ImmutableFunctionalTerm createAggregate(ConcreteNumericRDFDatatype rdfType, ImmutableTerm dbTerm, TermFactory termFactory)
protected DefinitionPushDownRequest createNonNumericRequest(ImmutableTerm subTermTypeTerm, Variable nonNumericVariable, com.google.common.collect.ImmutableSet<RDFTermType> nonNumericTypes, TermFactory termFactory)
protected com.google.common.collect.ImmutableSet<RDFTermType> extractNonNumericTypes(com.google.common.collect.ImmutableSet<RDFTermType> subTermPossibleTypes)
Copyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.