congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AssignableOperandTypeChecker
Code IndexAdd Tabnine to your IDE (free)

How to use
AssignableOperandTypeChecker
in
org.apache.calcite.sql.type

Best Java code snippets using org.apache.calcite.sql.type.AssignableOperandTypeChecker (Showing top 3 results out of 315)

origin: apache/flink

public CalciteException handleUnresolvedFunction(SqlCall call,
  SqlFunction unresolvedFunction, List<RelDataType> argTypes,
  List<String> argNames) {
  // For builtins, we can give a better error message
  final List<SqlOperator> overloads = new ArrayList<>();
  opTab.lookupOperatorOverloads(unresolvedFunction.getNameAsId(), null,
    SqlSyntax.FUNCTION, overloads);
  if (overloads.size() == 1) {
    SqlFunction fun = (SqlFunction) overloads.get(0);
    if ((fun.getSqlIdentifier() == null)
      && (fun.getSyntax() != SqlSyntax.FUNCTION_ID)) {
      final int expectedArgCount =
        fun.getOperandCountRange().getMin();
      throw newValidationError(call,
        RESOURCE.invalidArgCount(call.getOperator().getName(),
          expectedArgCount));
    }
  }
  AssignableOperandTypeChecker typeChecking =
    new AssignableOperandTypeChecker(argTypes, argNames);
  String signature =
    typeChecking.getAllowedSignatures(
      unresolvedFunction,
      unresolvedFunction.getName());
  throw newValidationError(call,
    RESOURCE.validatorUnknownFunction(signature));
}
origin: Qihoo360/Quicksql

public CalciteException handleUnresolvedFunction(SqlCall call,
  SqlFunction unresolvedFunction, List<RelDataType> argTypes,
  List<String> argNames) {
 // For builtins, we can give a better error message
 final List<SqlOperator> overloads = new ArrayList<>();
 opTab.lookupOperatorOverloads(unresolvedFunction.getNameAsId(), null,
   SqlSyntax.FUNCTION, overloads);
 if (overloads.size() == 1) {
  SqlFunction fun = (SqlFunction) overloads.get(0);
  if ((fun.getSqlIdentifier() == null)
    && (fun.getSyntax() != SqlSyntax.FUNCTION_ID)) {
   final int expectedArgCount =
     fun.getOperandCountRange().getMin();
   throw newValidationError(call,
     RESOURCE.invalidArgCount(call.getOperator().getName(),
       expectedArgCount));
  }
 }
 AssignableOperandTypeChecker typeChecking =
   new AssignableOperandTypeChecker(argTypes, argNames);
 String signature =
   typeChecking.getAllowedSignatures(
     unresolvedFunction,
     unresolvedFunction.getName());
 throw newValidationError(call,
   RESOURCE.validatorUnknownFunction(signature));
}
origin: org.apache.calcite/calcite-core

public CalciteException handleUnresolvedFunction(SqlCall call,
  SqlFunction unresolvedFunction, List<RelDataType> argTypes,
  List<String> argNames) {
 // For builtins, we can give a better error message
 final List<SqlOperator> overloads = new ArrayList<>();
 opTab.lookupOperatorOverloads(unresolvedFunction.getNameAsId(), null,
   SqlSyntax.FUNCTION, overloads);
 if (overloads.size() == 1) {
  SqlFunction fun = (SqlFunction) overloads.get(0);
  if ((fun.getSqlIdentifier() == null)
    && (fun.getSyntax() != SqlSyntax.FUNCTION_ID)) {
   final int expectedArgCount =
     fun.getOperandCountRange().getMin();
   throw newValidationError(call,
     RESOURCE.invalidArgCount(call.getOperator().getName(),
       expectedArgCount));
  }
 }
 AssignableOperandTypeChecker typeChecking =
   new AssignableOperandTypeChecker(argTypes, argNames);
 String signature =
   typeChecking.getAllowedSignatures(
     unresolvedFunction,
     unresolvedFunction.getName());
 throw newValidationError(call,
   RESOURCE.validatorUnknownFunction(signature));
}
org.apache.calcite.sql.typeAssignableOperandTypeChecker

Javadoc

AssignableOperandTypeChecker implements SqlOperandTypeChecker by verifying that the type of each argument is assignable to a predefined set of parameter types (under the SQL definition of "assignable").

Most used methods

  • <init>
    Instantiates this strategy with a specific set of parameter types.
  • getAllowedSignatures

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now