NobiGo commented on code in PR #4000:
URL: https://github.com/apache/calcite/pull/4000#discussion_r1792826716


##########
core/src/main/java/org/apache/calcite/tools/RelBuilder.java:
##########
@@ -2886,6 +2886,36 @@ private static boolean isGroupId(AggCall c) {
     return ((AggCallPlus) c).op().kind == SqlKind.GROUP_ID;
   }
 
+  /** Given a list of literals and a target row type, make the literals
+   * respectively match the fields types of the row.
+   *
+   * @param cluster  Cluster
+   * @param rowType  Type expected for values
+   * @param values   A list of literals that should match the rowType */
+  private static List<RexLiteral> convertLiteralTypes(RelOptCluster cluster,
+      RelDataType rowType, List<RexLiteral> values) {
+    assert values.size() == rowType.getFieldCount();
+    RexExecutor executor = cluster.getPlanner().getExecutor();
+    if (executor == null) {

Review Comment:
   Maybe we can improve it by `RexExecutor rexImpl =
           Util.first(cluster.getPlanner().getExecutor(), RexUtil.EXECUTOR);`



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