Java Code Examples for org.apache.calcite.sql.SqlJdbcFunctionCall

The following examples show how to use org.apache.calcite.sql.SqlJdbcFunctionCall. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: quark   Source File: QuarkMetaImpl.java    License: Apache License 2.0 6 votes vote down vote up
private ImmutableMap.Builder<DatabaseProperty, Object> addProperty(
    ImmutableMap.Builder<DatabaseProperty, Object> builder,
    DatabaseProperty p) {
  switch (p) {
    case GET_S_Q_L_KEYWORDS:
      return builder.put(p,
          SqlParser.create("").getMetadata().getJdbcKeywords());
    case GET_NUMERIC_FUNCTIONS:
      return builder.put(p, SqlJdbcFunctionCall.getNumericFunctions());
    case GET_STRING_FUNCTIONS:
      return builder.put(p, SqlJdbcFunctionCall.getStringFunctions());
    case GET_SYSTEM_FUNCTIONS:
      return builder.put(p, SqlJdbcFunctionCall.getSystemFunctions());
    case GET_TIME_DATE_FUNCTIONS:
      return builder.put(p, SqlJdbcFunctionCall.getTimeDateFunctions());
    default:
      return builder;
  }
}
 
Example 2
Source Project: calcite   Source File: CalciteMetaImpl.java    License: Apache License 2.0 6 votes vote down vote up
private ImmutableMap.Builder<DatabaseProperty, Object> addProperty(
    ImmutableMap.Builder<DatabaseProperty, Object> builder,
    DatabaseProperty p) {
  switch (p) {
  case GET_S_Q_L_KEYWORDS:
    return builder.put(p,
        SqlParser.create("").getMetadata().getJdbcKeywords());
  case GET_NUMERIC_FUNCTIONS:
    return builder.put(p, SqlJdbcFunctionCall.getNumericFunctions());
  case GET_STRING_FUNCTIONS:
    return builder.put(p, SqlJdbcFunctionCall.getStringFunctions());
  case GET_SYSTEM_FUNCTIONS:
    return builder.put(p, SqlJdbcFunctionCall.getSystemFunctions());
  case GET_TIME_DATE_FUNCTIONS:
    return builder.put(p, SqlJdbcFunctionCall.getTimeDateFunctions());
  default:
    return builder;
  }
}
 
Example 3
Source Project: Bats   Source File: StandardConvertletTable.java    License: Apache License 2.0 5 votes vote down vote up
public RexNode convertJdbc(
    SqlRexContext cx,
    SqlJdbcFunctionCall op,
    SqlCall call) {
  // Yuck!! The function definition contains arguments!
  // TODO: adopt a more conventional definition/instance structure
  final SqlCall convertedCall = op.getLookupCall();
  return cx.convertExpression(convertedCall);
}
 
Example 4
Source Project: calcite   Source File: StandardConvertletTable.java    License: Apache License 2.0 5 votes vote down vote up
public RexNode convertJdbc(
    SqlRexContext cx,
    SqlJdbcFunctionCall op,
    SqlCall call) {
  // Yuck!! The function definition contains arguments!
  // TODO: adopt a more conventional definition/instance structure
  final SqlCall convertedCall = op.getLookupCall();
  return cx.convertExpression(convertedCall);
}