tanclary commented on code in PR #3677:
URL: https://github.com/apache/calcite/pull/3677#discussion_r1523651994
##########
core/src/main/java/org/apache/calcite/rex/RexBuilder.java:
##########
@@ -826,12 +852,31 @@ public RexNode makeAbstractCast(RelDataType type, RexNode
exp) {
* @return Call to CAST operator
*/
public RexNode makeAbstractCast(RelDataType type, RexNode exp, boolean safe)
{
- SqlOperator operator =
+ final SqlOperator operator =
safe ? SqlLibraryOperators.SAFE_CAST
: SqlStdOperatorTable.CAST;
return new RexCall(type, operator, ImmutableList.of(exp));
}
+ /**
+ * Creates a call to CAST or SAFE_CAST operator with a FORMAT clause.
+ *
+ * @param type Type to cast to
+ * @param exp Expression being cast
+ * @param safe Whether to return NULL if cast fails
+ * @param format Conversion format for target type
+ * @return Call to CAST operator
+ */
+ public RexNode makeAbstractCast(RelDataType type, RexNode exp, boolean safe,
RexLiteral format) {
Review Comment:
oh duh
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]