Package org.apache.calcite.util
Class RelToSqlConverterUtil
java.lang.Object
org.apache.calcite.util.RelToSqlConverterUtil
Utilities used by multiple dialect for RelToSql conversion.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SqlCharStringLiteral
createRegexPatternLiteral
(SqlNode call, SqlLiteral trimFlag) Creates regex pattern based on the TRIM flag.static SqlSpecialOperator
specialOperatorByName
(String opName) Returns aSqlSpecialOperator
with given operator name, mainly used for unparse override.static void
unparseHiveTrim
(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec) For usage of TRIM, LTRIM and RTRIM in Hive, see Hive UDF usage.
-
Constructor Details
-
RelToSqlConverterUtil
public RelToSqlConverterUtil()
-
-
Method Details
-
unparseHiveTrim
For usage of TRIM, LTRIM and RTRIM in Hive, see Hive UDF usage. -
createRegexPatternLiteral
Creates regex pattern based on the TRIM flag.- Parameters:
call
- SqlCall contains the values that need to be trimmedtrimFlag
- the trimFlag, either BOTH, LEADING or TRAILING- Returns:
- the regex pattern of the character to be trimmed
-
specialOperatorByName
Returns aSqlSpecialOperator
with given operator name, mainly used for unparse override.
-