Class RequestUtils


  • public class RequestUtils
    extends Object
    • Method Detail

      • setOptions

        public static void setOptions​(SqlNodeAndOptions sqlNodeAndOptions,
                                      com.fasterxml.jackson.databind.JsonNode jsonRequest)
        Sets extra options for the given query.
      • getIdentifierExpression

        public static Expression getIdentifierExpression​(String identifier)
      • getLiteralExpression

        public static Expression getLiteralExpression​(org.apache.calcite.sql.SqlLiteral node)
      • createNewLiteralExpression

        public static Expression createNewLiteralExpression()
      • getLiteralExpression

        public static Expression getLiteralExpression​(boolean value)
      • getLiteralExpression

        public static Expression getLiteralExpression​(long value)
      • getLiteralExpression

        public static Expression getLiteralExpression​(double value)
      • getLiteralExpression

        public static Expression getLiteralExpression​(String value)
      • getLiteralExpression

        public static Expression getLiteralExpression​(byte[] value)
      • getLiteralExpression

        public static Expression getLiteralExpression​(Object object)
      • getFunctionExpression

        public static Expression getFunctionExpression​(String canonicalName)
      • canonicalizeFunctionName

        public static String canonicalizeFunctionName​(String functionName)
        Converts the function name into its canonical form.
      • canonicalizeFunctionNamePreservingSpecialKey

        public static String canonicalizeFunctionNamePreservingSpecialKey​(String functionName)
        Converts the function name into its canonical form, but preserving the special keys. - Keep FilterKind.name() as is because we need to read the FilterKind via FilterKind.valueOf(). - Keep ST_Distance as is because we use exact match when applying geo-spatial index up to release 0.10.0. TODO: Remove the ST_Distance special handling after releasing 0.11.0.
      • getOptionsFromJson

        public static Map<String,​String> getOptionsFromJson​(com.fasterxml.jackson.databind.JsonNode request,
                                                                  String optionsKey)