Class SqlJsonArrayFunction


public class SqlJsonArrayFunction extends SqlFunction
The JSON_ARRAY function.
  • Constructor Details

    • SqlJsonArrayFunction

      public SqlJsonArrayFunction()
  • Method Details

    • getOperandCountRange

      public SqlOperandCountRange getOperandCountRange()
      Description copied from class: SqlOperator
      Returns a constraint on the number of operands expected by this operator. Subclasses may override this method; when they don't, the range is derived from the SqlOperandTypeChecker associated with this operator.
      Overrides:
      getOperandCountRange in class SqlOperator
      Returns:
      acceptable range
    • checkOperandCount

      protected void checkOperandCount(SqlValidator validator, @Nullable SqlOperandTypeChecker argType, SqlCall call)
      Overrides:
      checkOperandCount in class SqlOperator
    • createCall

      public SqlCall createCall(@Nullable SqlLiteral functionQualifier, SqlParserPos pos, @Nullable SqlNode... operands)
      Description copied from class: SqlOperator
      Creates a call to this operator with an array of operands.

      The position of the resulting call is the union of the pos and the positions of all of the operands.

      Overrides:
      createCall in class SqlOperator
      Parameters:
      functionQualifier - Function qualifier (e.g. "DISTINCT"), or null
      pos - Parser position of the identifier of the call
      operands - Array of operands
    • getSignatureTemplate

      public @Nullable String getSignatureTemplate(int operandsCount)
      Description copied from class: SqlOperator
      Returns a template describing how the operator signature is to be built. E.g for the binary + operator the template looks like "{1} {0} {2}" {0} is the operator, subsequent numbers are operands.
      Overrides:
      getSignatureTemplate in class SqlOperator
      Parameters:
      operandsCount - is used with functions that can take a variable number of operands
      Returns:
      signature template, or null to indicate that a default template will suffice
    • unparse

      public void unparse(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec)
      Description copied from class: SqlOperator
      Writes a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence.

      The default implementation of this method delegates to SqlSyntax.unparse(org.apache.calcite.sql.SqlWriter, org.apache.calcite.sql.SqlOperator, org.apache.calcite.sql.SqlCall, int, int).

      Overrides:
      unparse in class SqlFunction