Class RelToSqlConverterUtil


public abstract class RelToSqlConverterUtil extends Object
Utilities used by multiple dialect for RelToSql conversion.
  • Constructor Details

    • RelToSqlConverterUtil

      public RelToSqlConverterUtil()
  • Method Details

    • unparseHiveTrim

      public static void unparseHiveTrim(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec)
      For usage of TRIM, LTRIM and RTRIM in Hive, see Hive UDF usage.
    • createRegexPatternLiteral

      public static SqlCharStringLiteral createRegexPatternLiteral(SqlNode call, SqlLiteral trimFlag)
      Creates regex pattern based on the TRIM flag.
      call - SqlCall contains the values that need to be trimmed
      trimFlag - the trimFlag, either BOTH, LEADING or TRAILING
      the regex pattern of the character to be trimmed
    • specialOperatorByName

      public static SqlSpecialOperator specialOperatorByName(String opName)
      Returns a SqlSpecialOperator with given operator name, mainly used for unparse override.