soumyakanti3578 commented on code in PR #5196: URL: https://github.com/apache/hive/pull/5196#discussion_r1934829425
########## ql/src/java/org/apache/hadoop/hive/ql/parse/type/HiveFunctionHelper.java: ########## @@ -322,18 +324,24 @@ public RexNode getExpression(String functionText, FunctionInfo fi, // unix_timestamp(args) -> to_unix_timestamp(args) calciteOp = HiveToUnixTimestampSqlOperator.INSTANCE; } - expr = rexBuilder.makeCall(returnType, calciteOp, inputs); + expr = getExpression(returnType, calciteOp, inputs); } if (expr instanceof RexCall && !expr.isA(SqlKind.CAST)) { RexCall call = (RexCall) expr; expr = rexBuilder.makeCall(returnType, call.getOperator(), RexUtil.flatten(call.getOperands(), call.getOperator())); } - return expr; } + private RexNode getExpression(RelDataType returnType, SqlOperator calciteOp, List<RexNode> inputs) { + if (calciteOp.getKind() == SqlKind.IN) { + return rexBuilder.makeIn(inputs.get(0), inputs.subList(1, inputs.size())); + } + return rexBuilder.makeCall(returnType, calciteOp, inputs); + } + Review Comment: Yes, makes sense. I will update this. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org