Package org.apache.calcite.test
Class MockSqlOperatorTable.SimilarlityTableFunction
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlFunction
org.apache.calcite.test.MockSqlOperatorTable.SimilarlityTableFunction
- All Implemented Interfaces:
SqlTableFunction
- Enclosing class:
MockSqlOperatorTable
public static class MockSqlOperatorTable.SimilarlityTableFunction
extends SqlFunction
implements SqlTableFunction
Similarity performs an analysis on two data sets, which are both tables
of two columns, treated as the x and y axes of a graph. It has two input
tables with set semantics.
-
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanargumentMustBeScalar(int ordinal) Returns whether theordinalth argument to this operator must be scalar (as opposed to a query).Returns the record type of the table yielded by this function when applied to given arguments.tableCharacteristic(int ordinal) Returns the table parameter characteristics forordinalth parameter to this table function.Methods inherited from class org.apache.calcite.sql.SqlFunction
deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifierMethods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, adjustType, allowsFraming, 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, getSqlCallFactory, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperands
-
Constructor Details
-
SimilarlityTableFunction
public SimilarlityTableFunction()
-
-
Method Details
-
getRowTypeInference
Description copied from interface:SqlTableFunctionReturns the record type of the table yielded by this function when applied to given arguments. Only literal arguments are passed, non-literal are replaced with default values (null, 0, false, etc).- Specified by:
getRowTypeInferencein interfaceSqlTableFunction- Returns:
- strategy to infer the row type of a call to this function
-
tableCharacteristic
Description copied from interface:SqlTableFunctionReturns the table parameter characteristics forordinalth parameter to this table function.Returns
nullif theordinalth argument is not table parameter or theordinalis smaller than 0 or theordinalis greater than or equals to the number of parameters.- Specified by:
tableCharacteristicin interfaceSqlTableFunction
-
argumentMustBeScalar
public boolean argumentMustBeScalar(int ordinal) Description copied from class:SqlOperatorReturns whether theordinalth argument to this operator must be scalar (as opposed to a query).If true (the default), the validator will attempt to convert the argument into a scalar sub-query, which must have one column and return at most one row.
Operators such as
SELECTandEXISTSoverride this method.- Overrides:
argumentMustBeScalarin classSqlOperator
-