Package org.apache.calcite.sql.fun
Class SqlBitOpAggFunction
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlFunction
org.apache.calcite.sql.SqlAggFunction
org.apache.calcite.sql.fun.SqlBitOpAggFunction
Definition of the
BIT_AND
and BIT_OR
aggregate functions,
returning the bitwise AND/OR of all non-null input values, or null if none.
INTEGER and BINARY types are supported: tinyint, smallint, int, bigint, binary, varbinary
-
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
Constructor Summary
ConstructorDescriptionSqlBitOpAggFunction
(String name, SqlKind kind) Creates a SqlBitOpAggFunction from a name and SqlKind.SqlBitOpAggFunction
(SqlKind kind) Creates a SqlBitOpAggFunction from a SqlKind. -
Method Summary
Modifier and TypeMethodDescriptionReturns whether this aggregate function allows theDISTINCT
keyword.<T> @Nullable T
Finds an instance of an interface implemented by this object, or returns null if this object does not support that interface.Methods inherited from class org.apache.calcite.sql.SqlAggFunction
allowsFilter, allowsNullTreatment, getParameterTypes, getReturnType, getRollup, isAggregator, isPercentile, isQuantifierAllowed, requiresGroupOrder, requiresOrder, requiresOver, validateCall
Methods inherited from class org.apache.calcite.sql.SqlFunction
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, unparse, validateQuantifier
Methods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, deriveOperandType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperands
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.calcite.schema.Wrapper
maybeUnwrap, unwrapOrThrow
-
Constructor Details
-
SqlBitOpAggFunction
Creates a SqlBitOpAggFunction from a SqlKind. -
SqlBitOpAggFunction
Creates a SqlBitOpAggFunction from a name and SqlKind.
-
-
Method Details
-
unwrap
Description copied from interface:Wrapper
Finds an instance of an interface implemented by this object, or returns null if this object does not support that interface.- Specified by:
unwrap
in interfaceWrapper
- Overrides:
unwrap
in classSqlAggFunction
-
getDistinctOptionality
Description copied from class:SqlAggFunction
Returns whether this aggregate function allows theDISTINCT
keyword.The default implementation returns
Optionality.OPTIONAL
, which is appropriate for most aggregate functions, includingSUM
andCOUNT
.Some aggregate functions, for example
MIN
, produce the same result with or withoutDISTINCT
, and therefore returnOptionality.IGNORED
to indicate this. For such functions, Calcite will probably removeDISTINCT
while optimizing the query.- Overrides:
getDistinctOptionality
in classSqlAggFunction
-