You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by zh...@apache.org on 2025/09/06 11:59:03 UTC
(calcite) 07/09: Revert "Add test"
This is an automated email from the ASF dual-hosted git repository.
zhenchen pushed a commit to branch revert-4501-calcite-7141
in repository https://gitbox.apache.org/repos/asf/calcite.git
commit a56d5a2715ddf0d9e942db896d0e7c0e423e17c1
Author: Zhen Chen <cz...@163.com>
AuthorDate: Sat Sep 6 19:58:47 2025 +0800
Revert "Add test"
This reverts commit 452cff9c549ab4d7ea3c0679ed9c16b836bb7114.
---
.../apache/calcite/sql/type/FunctionSqlType.java | 3 --
.../calcite/sql/type/FunctionSqlTypeTest.java | 52 ----------------------
2 files changed, 55 deletions(-)
diff --git a/core/src/main/java/org/apache/calcite/sql/type/FunctionSqlType.java b/core/src/main/java/org/apache/calcite/sql/type/FunctionSqlType.java
index b71dbe1ef2..4633c3c88f 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/FunctionSqlType.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/FunctionSqlType.java
@@ -35,9 +35,6 @@ public FunctionSqlType(
RelDataType parameterType, RelDataType returnType) {
super(SqlTypeName.FUNCTION, true, null);
this.parameterType = requireNonNull(parameterType, "parameterType");
- if (!parameterType.isStruct()) {
- throw new IllegalArgumentException("paramType must be a struct");
- }
this.returnType = requireNonNull(returnType, "returnType");
computeDigest();
}
diff --git a/core/src/test/java/org/apache/calcite/sql/type/FunctionSqlTypeTest.java b/core/src/test/java/org/apache/calcite/sql/type/FunctionSqlTypeTest.java
deleted file mode 100644
index 3f780b3ecf..0000000000
--- a/core/src/test/java/org/apache/calcite/sql/type/FunctionSqlTypeTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.calcite.sql.type;
-
-import org.apache.calcite.rel.type.RelDataType;
-import org.apache.calcite.rel.type.RelDataTypeFactory;
-import org.apache.calcite.rel.type.RelDataTypeSystem;
-
-import com.google.common.collect.ImmutableList;
-
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-/**
- * Tests for {@link FunctionSqlType}.
- */
-public class FunctionSqlTypeTest {
- final RelDataTypeFactory sqlTypeFactory =
- new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT);
-
- final RelDataType parameterType =
- sqlTypeFactory.createStructType(
- ImmutableList.of(sqlTypeFactory.createSqlType(SqlTypeName.BOOLEAN)),
- ImmutableList.of("field1"));
- final RelDataType returnType = sqlTypeFactory.createSqlType(SqlTypeName.BOOLEAN);
- final FunctionSqlType functionSqlType =
- new FunctionSqlType(parameterType, returnType);
-
- @Test void testGetParamType() {
- assertEquals(parameterType, functionSqlType.getParameterType());
- }
-
- @Test void testGetReturnType() {
- assertEquals(returnType, functionSqlType.getReturnType());
- }
-
-}