ILuffZhe commented on code in PR #4108:
URL: https://github.com/apache/calcite/pull/4108#discussion_r1896499074


##########
core/src/main/java/org/apache/calcite/sql2rel/StandardConvertletTable.java:
##########
@@ -853,15 +854,35 @@ protected RexNode convertFloorCeil(SqlRexContext cx, 
SqlCall call) {
   protected RexNode convertCharset(
       @UnknownInitialization StandardConvertletTable this,
       SqlRexContext cx, SqlCall call) {
+    final RexBuilder rexBuilder = cx.getRexBuilder();
     final SqlParserPos pos = call.getParserPosition();
     final SqlNode expr = call.operand(0);
-    final String srcCharset = call.operand(1).toString();
-    final String destCharset = call.operand(2).toString();
-    final RexBuilder rexBuilder = cx.getRexBuilder();
-    return rexBuilder.makeCall(pos, SqlStdOperatorTable.CONVERT,
-        cx.convertExpression(expr),
-        rexBuilder.makeLiteral(srcCharset),
-        rexBuilder.makeLiteral(destCharset));
+    final SqlOperator op = call.getOperator();
+    final String srcCharset;
+    final String destCharset;
+    if (op == SqlStdOperatorTable.CONVERT) {

Review Comment:
   How about adding a SqlKind `ORACLE_CONVERT`, and we use `op.getKind()` here? 
Now they all have `CONVERT` SqlKind.



-- 
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]

Reply via email to