Class SqlSessionTableFunction

java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlFunction
org.apache.calcite.sql.SqlWindowTableFunction
org.apache.flink.table.planner.functions.sql.SqlWindowTableFunction
org.apache.flink.table.planner.functions.sql.SqlSessionTableFunction
All Implemented Interfaces:
org.apache.calcite.sql.SqlTableFunction

public class SqlSessionTableFunction extends SqlWindowTableFunction
SqlSessionTableFunction implements an operator for per-key sessionization. It allows four parameters:
  1. table as data source
  2. a descriptor to provide a watermarked column name from the input table
  3. a descriptor to provide a column as key, on which sessionization will be applied, optional
  4. an interval parameter to specify a inactive activity gap to break sessions

Mainly copy from SqlSessionTableFunction. FLINK modifications are the following:

  1. Add some attributes required for PTF.
  2. Invalid the deprecated syntax in calcite about 'partition by' in window tvf like: (TABLE table_name, DESCRIPTOR(timecol), DESCRIPTOR(key) optional, datetime interval)
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.flink.table.planner.functions.sql.SqlWindowTableFunction

    SqlWindowTableFunction.AbstractOperandMetadata
  • Field Summary

    Fields inherited from class org.apache.flink.table.planner.functions.sql.SqlWindowTableFunction

    ARG0_TABLE_FUNCTION_WINDOWING, GAP, PARAM_STEP

    Fields inherited from class org.apache.calcite.sql.SqlWindowTableFunction

    PARAM_DATA, PARAM_KEY, PARAM_OFFSET, PARAM_SIZE, PARAM_SLIDE, PARAM_TIMECOL

    Fields inherited from class org.apache.calcite.sql.SqlOperator

    kind, MDX_PRECEDENCE, NL
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.apache.calcite.sql.TableCharacteristic
    tableCharacteristic(int ordinal)
     

    Methods inherited from class org.apache.flink.table.planner.functions.sql.SqlWindowTableFunction

    argumentMustBeScalar, getOperandTypeChecker, getRowTypeInference, inferRowType, validateCall

    Methods inherited from class org.apache.calcite.sql.SqlFunction

    deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateQuantifier

    Methods 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, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, 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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SqlSessionTableFunction

      public SqlSessionTableFunction()
  • Method Details

    • tableCharacteristic

      public @Nullable org.apache.calcite.sql.TableCharacteristic tableCharacteristic(int ordinal)