HanumathRao commented on a change in pull request #1425: DRILL-6647: Update
Calcite version to 1.17.0
URL: https://github.com/apache/drill/pull/1425#discussion_r212065022
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillConvertletTable.java
##########
@@ -36,19 +37,36 @@
public static HashMap<SqlOperator, SqlRexConvertlet> map = new HashMap<>();
public static SqlRexConvertletTable INSTANCE = new DrillConvertletTable();
- private static SqlRexConvertlet sqrtConvertlet = new SqlRexConvertlet() {
- public RexNode convertCall(SqlRexContext cx, SqlCall call) {
- RexNode operand = cx.convertExpression(call.operand(0));
- return cx.getRexBuilder().makeCall(SqlStdOperatorTable.SQRT, operand);
+
+ private static final SqlRexConvertlet SQRT_CONVERTLET = (cx, call) -> {
+ RexNode operand = cx.convertExpression(call.operand(0));
+ return cx.getRexBuilder().makeCall(SqlStdOperatorTable.SQRT, operand);
+ };
+
+ // Rewrites COALESCE function into CASE WHEN IS NOT NULL operand1 THEN
operand1...
+ private static final SqlRexConvertlet COALESCE_CONVERTLET = (cx, call) -> {
+ if (call.operandCount() == 1) {
Review comment:
can you create a local variable something like argCount for
call.operandCount() and use it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services