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

How to use
defaultNullDirection
method
in
org.apache.calcite.sql.SqlDialect

Best Java code snippets using org.apache.calcite.sql.SqlDialect.defaultNullDirection (Showing top 4 results out of 315)

origin: Qihoo360/Quicksql

/** Converts a collation to an ORDER BY item. */
public SqlNode toSql(RelFieldCollation collation) {
 SqlNode node = field(collation.getFieldIndex());
 switch (collation.getDirection()) {
 case DESCENDING:
 case STRICTLY_DESCENDING:
  node = SqlStdOperatorTable.DESC.createCall(POS, node);
 }
 if (collation.nullDirection != dialect.defaultNullDirection(collation.direction)) {
  switch (collation.nullDirection) {
  case FIRST:
   node = SqlStdOperatorTable.NULLS_FIRST.createCall(POS, node);
   break;
  case LAST:
   node = SqlStdOperatorTable.NULLS_LAST.createCall(POS, node);
   break;
  }
 }
 return node;
}
origin: org.apache.calcite/calcite-core

/** Converts a collation to an ORDER BY item. */
public SqlNode toSql(RelFieldCollation collation) {
 SqlNode node = field(collation.getFieldIndex());
 switch (collation.getDirection()) {
 case DESCENDING:
 case STRICTLY_DESCENDING:
  node = SqlStdOperatorTable.DESC.createCall(POS, node);
 }
 if (collation.nullDirection != dialect.defaultNullDirection(collation.direction)) {
  switch (collation.nullDirection) {
  case FIRST:
   node = SqlStdOperatorTable.NULLS_FIRST.createCall(POS, node);
   break;
  case LAST:
   node = SqlStdOperatorTable.NULLS_LAST.createCall(POS, node);
   break;
  }
 }
 return node;
}
origin: Qihoo360/Quicksql

private SqlNode toSql(RexProgram program, RexFieldCollation rfc) {
 SqlNode node = toSql(program, rfc.left);
 switch (rfc.getDirection()) {
 case DESCENDING:
 case STRICTLY_DESCENDING:
  node = SqlStdOperatorTable.DESC.createCall(POS, node);
 }
 if (rfc.getNullDirection()
     != dialect.defaultNullDirection(rfc.getDirection())) {
  switch (rfc.getNullDirection()) {
  case FIRST:
   node = SqlStdOperatorTable.NULLS_FIRST.createCall(POS, node);
   break;
  case LAST:
   node = SqlStdOperatorTable.NULLS_LAST.createCall(POS, node);
   break;
  }
 }
 return node;
}
origin: org.apache.calcite/calcite-core

private SqlNode toSql(RexProgram program, RexFieldCollation rfc) {
 SqlNode node = toSql(program, rfc.left);
 switch (rfc.getDirection()) {
 case DESCENDING:
 case STRICTLY_DESCENDING:
  node = SqlStdOperatorTable.DESC.createCall(POS, node);
 }
 if (rfc.getNullDirection()
     != dialect.defaultNullDirection(rfc.getDirection())) {
  switch (rfc.getNullDirection()) {
  case FIRST:
   node = SqlStdOperatorTable.NULLS_FIRST.createCall(POS, node);
   break;
  case LAST:
   node = SqlStdOperatorTable.NULLS_LAST.createCall(POS, node);
   break;
  }
 }
 return node;
}
org.apache.calcite.sqlSqlDialectdefaultNullDirection

Javadoc

Returns whether NULL values are sorted first or last, in this dialect, in an ORDER BY item of a given direction.

Popular methods of SqlDialect

  • quoteStringLiteral
    Converts a string into a string literal. For example, can't run becomes 'can''t run'.
  • unparseCall
  • <init>
    Creates a SqlDialect.
  • quoteIdentifier
    Quotes a multi-part identifier.
  • supportsAggregateFunction
  • supportsCharSet
    Returns whether the dialect supports character set names as part of a data type, for instance VARCHA
  • allowsAs
  • containsNonAscii
    Returns whether the string contains any characters outside the comfortable 7-bit ASCII range (32 thr
  • emulateNullDirection
    Returns the SqlNode for emulating the null direction for the given field or null if no emulation ne
  • getCalendarPolicy
  • getCastSpec
  • getDatabaseProduct
    Returns the database this dialect belongs to, SqlDialect.DatabaseProduct#UNKNOWN if not known, never
  • getCastSpec,
  • getDatabaseProduct,
  • getNullCollation,
  • hasImplicitTableAlias,
  • identifierNeedsToBeQuoted,
  • quoteStringLiteralUnicode,
  • quoteTimestampLiteral,
  • rewriteSingleValueExpr,
  • supportsAliasedValues

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Vim plugins
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