Tabnine Logo
OperandTypes.sequence
Code IndexAdd Tabnine to your IDE (free)

How to use
sequence
method
in
org.apache.calcite.sql.type.OperandTypes

Best Java code snippets using org.apache.calcite.sql.type.OperandTypes.sequence (Showing top 10 results out of 315)

origin: apache/hive

private HiveFloorDate(String name) {
 super(name, SqlKind.FLOOR, ReturnTypes.ARG0_OR_EXACT_NO_SCALE, null,
   OperandTypes.sequence(
     "'" + SqlKind.FLOOR + "(<DATE> TO <TIME_UNIT>)'\n"
     + "'" + SqlKind.FLOOR + "(<TIME> TO <TIME_UNIT>)'\n"
     + "'" + SqlKind.FLOOR + "(<TIMESTAMP> TO <TIME_UNIT>)'",
     OperandTypes.DATETIME,
     OperandTypes.ANY),
   SqlFunctionCategory.NUMERIC);
}
origin: apache/drill

private HiveFloorDate(String name) {
 super(name, SqlKind.FLOOR, ReturnTypes.ARG0_OR_EXACT_NO_SCALE, null,
   OperandTypes.sequence(
     "'" + SqlKind.FLOOR + "(<DATE> TO <TIME_UNIT>)'\n"
     + "'" + SqlKind.FLOOR + "(<TIME> TO <TIME_UNIT>)'\n"
     + "'" + SqlKind.FLOOR + "(<TIMESTAMP> TO <TIME_UNIT>)'",
     OperandTypes.DATETIME,
     OperandTypes.ANY),
   SqlFunctionCategory.NUMERIC);
}
origin: apache/incubator-druid

 QuantileSqlAggFunction()
 {
  super(
    NAME,
    null,
    SqlKind.OTHER_FUNCTION,
    ReturnTypes.explicit(SqlTypeName.DOUBLE),
    null,
    OperandTypes.or(
      OperandTypes.and(
        OperandTypes.sequence(SIGNATURE1, OperandTypes.ANY, OperandTypes.LITERAL),
        OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.NUMERIC)
      ),
      OperandTypes.and(
        OperandTypes.sequence(SIGNATURE2, OperandTypes.ANY, OperandTypes.LITERAL, OperandTypes.LITERAL),
        OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.NUMERIC, SqlTypeFamily.EXACT_NUMERIC)
      )
    ),
    SqlFunctionCategory.NUMERIC,
    false,
    false
  );
 }
}
origin: org.apache.calcite/calcite-core

SqlOverlapsOperator(SqlKind kind) {
 super(kind.sql, kind, 30, true, ReturnTypes.BOOLEAN_NULLABLE,
   InferTypes.FIRST_KNOWN,
   OperandTypes.sequence("'<PERIOD> " + kind.sql + " <PERIOD>'",
     OperandTypes.PERIOD, OperandTypes.PERIOD));
}
origin: Qihoo360/Quicksql

SqlOverlapsOperator(SqlKind kind) {
 super(kind.sql, kind, 30, true, ReturnTypes.BOOLEAN_NULLABLE,
   InferTypes.FIRST_KNOWN,
   OperandTypes.sequence("'<PERIOD> " + kind.sql + " <PERIOD>'",
     OperandTypes.PERIOD, OperandTypes.PERIOD));
}
origin: Qihoo360/Quicksql

public SqlFloorFunction(SqlKind kind) {
 super(kind.name(), kind, ReturnTypes.ARG0_OR_EXACT_NO_SCALE, null,
   OperandTypes.or(OperandTypes.NUMERIC_OR_INTERVAL,
     OperandTypes.sequence(
       "'" + kind + "(<DATE> TO <TIME_UNIT>)'\n"
       + "'" + kind + "(<TIME> TO <TIME_UNIT>)'\n"
       + "'" + kind + "(<TIMESTAMP> TO <TIME_UNIT>)'",
       OperandTypes.DATETIME,
       OperandTypes.ANY)),
   SqlFunctionCategory.NUMERIC);
 Preconditions.checkArgument(kind == SqlKind.FLOOR || kind == SqlKind.CEIL);
}
origin: org.apache.calcite/calcite-core

public SqlFloorFunction(SqlKind kind) {
 super(kind.name(), kind, ReturnTypes.ARG0_OR_EXACT_NO_SCALE, null,
   OperandTypes.or(OperandTypes.NUMERIC_OR_INTERVAL,
     OperandTypes.sequence(
       "'" + kind + "(<DATE> TO <TIME_UNIT>)'\n"
       + "'" + kind + "(<TIME> TO <TIME_UNIT>)'\n"
       + "'" + kind + "(<TIMESTAMP> TO <TIME_UNIT>)'",
       OperandTypes.DATETIME,
       OperandTypes.ANY)),
   SqlFunctionCategory.NUMERIC);
 Preconditions.checkArgument(kind == SqlKind.FLOOR || kind == SqlKind.CEIL);
}
origin: io.druid.extensions/druid-histogram

 QuantileSqlAggFunction()
 {
  super(
    NAME,
    null,
    SqlKind.OTHER_FUNCTION,
    ReturnTypes.explicit(SqlTypeName.DOUBLE),
    null,
    OperandTypes.or(
      OperandTypes.and(
        OperandTypes.sequence(SIGNATURE1, OperandTypes.ANY, OperandTypes.LITERAL),
        OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.NUMERIC)
      ),
      OperandTypes.and(
        OperandTypes.sequence(SIGNATURE2, OperandTypes.ANY, OperandTypes.LITERAL, OperandTypes.LITERAL),
        OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.NUMERIC, SqlTypeFamily.EXACT_NUMERIC)
      )
    ),
    SqlFunctionCategory.NUMERIC,
    false,
    false
  );
 }
}
origin: org.apache.druid.extensions/druid-histogram

 QuantileSqlAggFunction()
 {
  super(
    NAME,
    null,
    SqlKind.OTHER_FUNCTION,
    ReturnTypes.explicit(SqlTypeName.DOUBLE),
    null,
    OperandTypes.or(
      OperandTypes.and(
        OperandTypes.sequence(SIGNATURE1, OperandTypes.ANY, OperandTypes.LITERAL),
        OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.NUMERIC)
      ),
      OperandTypes.and(
        OperandTypes.sequence(SIGNATURE2, OperandTypes.ANY, OperandTypes.LITERAL, OperandTypes.LITERAL),
        OperandTypes.family(SqlTypeFamily.ANY, SqlTypeFamily.NUMERIC, SqlTypeFamily.EXACT_NUMERIC)
      )
    ),
    SqlFunctionCategory.NUMERIC,
    false,
    false
  );
 }
}
origin: dremio/dremio-oss

public SqlDatePartOperator() {
 super(
   "DATE_PART",
   SqlKind.OTHER_FUNCTION,
   ReturnTypes.BIGINT_NULLABLE,
   null,
   OperandTypes.sequence(
     "<PERIOD LITERAL>, <DATE or TIMESTAMP or INTERVAL>",
     new EnumeratedListChecker(VALID_PERIODS.keySet()),
     OperandTypes.or(
       OperandTypes.family(SqlTypeFamily.DATE),
       OperandTypes.family(SqlTypeFamily.TIMESTAMP),
       OperandTypes.family(SqlTypeFamily.DATETIME),
       OperandTypes.family(SqlTypeFamily.DATETIME_INTERVAL),
       OperandTypes.family(SqlTypeFamily.INTERVAL_DAY_TIME),
       OperandTypes.family(SqlTypeFamily.INTERVAL_YEAR_MONTH))
     ),
     SqlFunctionCategory.SYSTEM);
}
org.apache.calcite.sql.typeOperandTypessequence

Javadoc

Creates an operand checker from a sequence of single-operand checkers.

Popular methods of OperandTypes

  • family
    Creates a checker that passes if each operand is a member of a corresponding family.
  • or
    Creates a single-operand checker that passes if any one of the rules passes.
  • and
    Creates a single-operand checker that passes if all of the rules pass.
  • repeat
    Creates a checker that passes if all of the rules pass for each operand, using a given operand count

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ImageIO (javax.imageio)
  • Github Copilot alternatives
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