Codota Logo
SqlImplementor$Context.withOrder
Code IndexAdd Codota to your IDE (free)

How to use
withOrder
method
in
org.apache.calcite.rel.rel2sql.SqlImplementor$Context

Best Java code snippets using org.apache.calcite.rel.rel2sql.SqlImplementor$Context.withOrder (Showing top 1 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: org.apache.calcite/calcite-core

/** Converts a call to an aggregate function to an expression. */
public SqlNode toSql(AggregateCall aggCall) {
 final SqlOperator op = aggCall.getAggregation();
 final List<SqlNode> operandList = Expressions.list();
 for (int arg : aggCall.getArgList()) {
  operandList.add(field(arg));
 }
 final SqlLiteral qualifier =
   aggCall.isDistinct() ? SqlSelectKeyword.DISTINCT.symbol(POS) : null;
 final SqlNode[] operands = operandList.toArray(new SqlNode[0]);
 List<SqlNode> orderByList = Expressions.list();
 for (RelFieldCollation field : aggCall.collation.getFieldCollations()) {
  addOrderItem(orderByList, field);
 }
 SqlNodeList orderList = new SqlNodeList(orderByList, POS);
 if (op instanceof SqlSumEmptyIsZeroAggFunction) {
  final SqlNode node =
    withOrder(
      SqlStdOperatorTable.SUM.createCall(qualifier, POS, operands),
      orderList);
  return SqlStdOperatorTable.COALESCE.createCall(POS, node,
    SqlLiteral.createExactNumeric("0", POS));
 } else {
  return withOrder(op.createCall(qualifier, POS, operands), orderList);
 }
}
org.apache.calcite.rel.rel2sqlSqlImplementor$ContextwithOrder

Javadoc

Wraps a call in a SqlKind#WITHIN_GROUP call, if orderList is non-empty.

Popular methods of SqlImplementor$Context

  • toSql
  • createLeftCall
  • createSqlWindowBound
  • field
  • implementor
  • addOrderItem
  • createOverCall
  • getAliasContext

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setScale (BigDecimal)
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now