xiedeyantu commented on code in PR #4501:
URL: https://github.com/apache/calcite/pull/4501#discussion_r2300900882


##########
core/src/main/java/org/apache/calcite/sql/type/FunctionSqlType.java:
##########
@@ -25,16 +25,26 @@
 
 /**
  * Function type.
- * The type of lambda expression can be represented by a function type.
+ *
+ * <p>The type of lambda expression can be represented by a function type.
  */
 public class FunctionSqlType extends AbstractSqlType {
   private final RelDataType parameterType;
   private final RelDataType returnType;
 
+  /**
+   * Constructs a new function SQL type. This should only be called from a 
factory method.
+   *
+   * @param parameterType a struct type wrapping function's input parameter 
types.
+   * @param returnType function's return type.
+   */
   public FunctionSqlType(
       RelDataType parameterType, RelDataType returnType) {
     super(SqlTypeName.FUNCTION, true, null);
     this.parameterType = requireNonNull(parameterType, "parameterType");
+    if (!parameterType.isStruct()) {
+      throw new IllegalArgumentException("parameterType must be a struct");

Review Comment:
   parameterType -> ParameterType



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