Details
Description
The method projectNonColumnEquiConditions in HiveCalciteUtil will assign the type wrongly for newly created conditions. The problem is in this block:
RexNode cond = rexBuilder.makeCall(SqlStdOperatorTable.EQUALS, rexBuilder.makeInputRef(newLeftFields.get(i).getType(), newLeftOffset + i), rexBuilder.makeInputRef(newLeftFields.get(i).getType(), newRightOffset + i));
It looks like a code copy-paste mistake. In addition, index i is incorrect, as newLeftFields contains all the fields, not only the ones of the new condition.