diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/OverWindowPartitionedOrdered.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/OverWindowPartitionedOrdered.java index d14dfff642b5a..34bf5359bab2c 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/OverWindowPartitionedOrdered.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/OverWindowPartitionedOrdered.java @@ -26,7 +26,7 @@ import java.util.List; import java.util.Optional; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedCall; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedCall; /** * Partially defined over window with (optional) partitioning and order. diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java index 97f06311125f1..40849aa52d86f 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableEnvironmentImpl.java @@ -46,7 +46,7 @@ import org.apache.flink.table.descriptors.StreamTableDescriptor; import org.apache.flink.table.descriptors.TableDescriptor; import org.apache.flink.table.expressions.TableReferenceExpression; -import org.apache.flink.table.expressions.lookups.TableReferenceLookup; +import org.apache.flink.table.expressions.resolver.lookups.TableReferenceLookup; import org.apache.flink.table.functions.ScalarFunction; import org.apache.flink.table.operations.CatalogQueryOperation; import org.apache.flink.table.operations.CatalogSinkModifyOperation; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableImpl.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableImpl.java index 87223b6ddc06d..79f8502b14841 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableImpl.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/TableImpl.java @@ -36,7 +36,7 @@ import org.apache.flink.table.catalog.FunctionLookup; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.expressions.ExpressionParser; -import org.apache.flink.table.expressions.LookupCallResolver; +import org.apache.flink.table.expressions.resolver.LookupCallResolver; import org.apache.flink.table.functions.TemporalTableFunction; import org.apache.flink.table.functions.TemporalTableFunctionImpl; import org.apache.flink.table.operations.JoinQueryOperation.JoinType; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/PlannerExpressionParser.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/delegation/PlannerExpressionParser.java similarity index 87% rename from flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/PlannerExpressionParser.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/delegation/PlannerExpressionParser.java index c347025afed4d..9985095e39f21 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/PlannerExpressionParser.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/delegation/PlannerExpressionParser.java @@ -16,17 +16,19 @@ * limitations under the License. */ -package org.apache.flink.table.expressions; +package org.apache.flink.table.delegation; import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.TableException; +import org.apache.flink.table.expressions.Expression; +import org.apache.flink.table.expressions.ExpressionParser; import java.lang.reflect.Constructor; import java.util.List; /** - * Parser for expressions inside a String. This parses exactly the same expressions that - * would be accepted by the Scala Expression DSL. + * Temporary utility for parsing expressions inside a String. This parses exactly the same expressions + * that would be accepted by the Scala Expression DSL. * *

{@link PlannerExpressionParser} is used by {@link ExpressionParser} to parse expressions. */ diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ExpressionParser.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ExpressionParser.java index d576cf5cf57e2..c097f688a208e 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ExpressionParser.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ExpressionParser.java @@ -19,6 +19,7 @@ package org.apache.flink.table.expressions; import org.apache.flink.annotation.Internal; +import org.apache.flink.table.delegation.PlannerExpressionParser; import java.util.List; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/ExpressionResolver.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/ExpressionResolver.java similarity index 92% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/ExpressionResolver.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/ExpressionResolver.java index ea45f3330d6d1..4c1e62d19dbb1 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/ExpressionResolver.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/ExpressionResolver.java @@ -16,17 +16,24 @@ * limitations under the License. */ -package org.apache.flink.table.expressions; +package org.apache.flink.table.expressions.resolver; import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.GroupWindow; import org.apache.flink.table.api.OverWindow; import org.apache.flink.table.api.TableException; import org.apache.flink.table.catalog.FunctionLookup; -import org.apache.flink.table.expressions.lookups.FieldReferenceLookup; -import org.apache.flink.table.expressions.lookups.TableReferenceLookup; -import org.apache.flink.table.expressions.rules.ResolverRule; -import org.apache.flink.table.expressions.rules.ResolverRules; +import org.apache.flink.table.expressions.CallExpression; +import org.apache.flink.table.expressions.Expression; +import org.apache.flink.table.expressions.LocalReferenceExpression; +import org.apache.flink.table.expressions.ResolvedExpression; +import org.apache.flink.table.expressions.UnresolvedReferenceExpression; +import org.apache.flink.table.expressions.ValueLiteralExpression; +import org.apache.flink.table.expressions.resolver.lookups.FieldReferenceLookup; +import org.apache.flink.table.expressions.resolver.lookups.TableReferenceLookup; +import org.apache.flink.table.expressions.resolver.rules.ResolverRule; +import org.apache.flink.table.expressions.resolver.rules.ResolverRules; +import org.apache.flink.table.expressions.utils.ApiExpressionDefaultVisitor; import org.apache.flink.table.functions.BuiltInFunctionDefinition; import org.apache.flink.table.functions.BuiltInFunctionDefinitions; import org.apache.flink.table.operations.QueryOperation; @@ -42,8 +49,8 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static org.apache.flink.table.expressions.ApiExpressionUtils.typeLiteral; -import static org.apache.flink.table.expressions.ApiExpressionUtils.valueLiteral; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.typeLiteral; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.valueLiteral; /** * Tries to resolve all unresolved expressions such as {@link UnresolvedReferenceExpression} diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/LocalOverWindow.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/LocalOverWindow.java similarity index 94% rename from flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/LocalOverWindow.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/LocalOverWindow.java index 45e1a7ac081dd..d7ed8131f0914 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/LocalOverWindow.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/LocalOverWindow.java @@ -16,9 +16,9 @@ * limitations under the License. */ -package org.apache.flink.table.expressions; +package org.apache.flink.table.expressions.resolver; -import org.apache.flink.annotation.Internal; +import org.apache.flink.table.expressions.Expression; import javax.annotation.Nullable; @@ -28,7 +28,6 @@ /** * Local over window created during expression resolution. */ -@Internal public final class LocalOverWindow { private Expression alias; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/LookupCallResolver.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/LookupCallResolver.java similarity index 87% rename from flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/LookupCallResolver.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/LookupCallResolver.java index 4a978ae56a1d9..1ad34e324a311 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/LookupCallResolver.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/LookupCallResolver.java @@ -16,11 +16,15 @@ * limitations under the License. */ -package org.apache.flink.table.expressions; +package org.apache.flink.table.expressions.resolver; import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.ValidationException; import org.apache.flink.table.catalog.FunctionLookup; +import org.apache.flink.table.expressions.Expression; +import org.apache.flink.table.expressions.LookupCallExpression; +import org.apache.flink.table.expressions.UnresolvedCallExpression; +import org.apache.flink.table.expressions.utils.ApiExpressionDefaultVisitor; import java.util.List; import java.util.stream.Collectors; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/lookups/FieldReferenceLookup.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/lookups/FieldReferenceLookup.java similarity index 98% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/lookups/FieldReferenceLookup.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/lookups/FieldReferenceLookup.java index 9ee13e6561058..d5aaa77bc7210 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/lookups/FieldReferenceLookup.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/lookups/FieldReferenceLookup.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.lookups; +package org.apache.flink.table.expressions.resolver.lookups; import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.TableSchema; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/lookups/TableReferenceLookup.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/lookups/TableReferenceLookup.java similarity index 95% rename from flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/lookups/TableReferenceLookup.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/lookups/TableReferenceLookup.java index 0d6112cf3b56c..bc3f9f1320407 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/lookups/TableReferenceLookup.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/lookups/TableReferenceLookup.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.lookups; +package org.apache.flink.table.expressions.resolver.lookups; import org.apache.flink.annotation.Internal; import org.apache.flink.table.expressions.TableReferenceExpression; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ExpandColumnFunctionsRule.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ExpandColumnFunctionsRule.java similarity index 96% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ExpandColumnFunctionsRule.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ExpandColumnFunctionsRule.java index b3fd2e716c445..bc206fe728c67 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ExpandColumnFunctionsRule.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ExpandColumnFunctionsRule.java @@ -16,16 +16,16 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.ValidationException; -import org.apache.flink.table.expressions.ApiExpressionDefaultVisitor; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.expressions.ExpressionUtils; import org.apache.flink.table.expressions.UnresolvedCallExpression; import org.apache.flink.table.expressions.UnresolvedReferenceExpression; import org.apache.flink.table.expressions.ValueLiteralExpression; +import org.apache.flink.table.expressions.utils.ApiExpressionDefaultVisitor; import org.apache.flink.table.functions.FunctionDefinition; import org.apache.flink.util.Preconditions; @@ -35,8 +35,8 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedCall; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedCall; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.AS; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.RANGE_TO; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.WITHOUT_COLUMNS; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/LookupCallByNameRule.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/LookupCallByNameRule.java similarity index 92% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/LookupCallByNameRule.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/LookupCallByNameRule.java index 0d7142a4303ed..163758f922e31 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/LookupCallByNameRule.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/LookupCallByNameRule.java @@ -16,11 +16,11 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; import org.apache.flink.table.expressions.Expression; -import org.apache.flink.table.expressions.LookupCallResolver; +import org.apache.flink.table.expressions.resolver.LookupCallResolver; import org.apache.flink.table.functions.FunctionDefinition; import java.util.List; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/OverWindowResolverRule.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/OverWindowResolverRule.java similarity index 94% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/OverWindowResolverRule.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/OverWindowResolverRule.java index 342043795adff..3340589ae2667 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/OverWindowResolverRule.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/OverWindowResolverRule.java @@ -16,15 +16,15 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.ValidationException; -import org.apache.flink.table.expressions.ApiExpressionDefaultVisitor; import org.apache.flink.table.expressions.Expression; -import org.apache.flink.table.expressions.LocalOverWindow; import org.apache.flink.table.expressions.UnresolvedCallExpression; import org.apache.flink.table.expressions.ValueLiteralExpression; +import org.apache.flink.table.expressions.resolver.LocalOverWindow; +import org.apache.flink.table.expressions.utils.ApiExpressionDefaultVisitor; import org.apache.flink.table.functions.BuiltInFunctionDefinitions; import org.apache.flink.table.functions.FunctionDefinition; import org.apache.flink.table.types.logical.LogicalType; @@ -34,7 +34,7 @@ import java.util.stream.Collectors; import static java.util.Arrays.asList; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedCall; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedCall; import static org.apache.flink.table.types.logical.LogicalTypeRoot.BIGINT; import static org.apache.flink.table.types.logical.LogicalTypeRoot.INTERVAL_DAY_TIME; import static org.apache.flink.table.types.logical.utils.LogicalTypeChecks.hasRoot; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/QualifyBuiltInFunctionsRule.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/QualifyBuiltInFunctionsRule.java similarity index 97% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/QualifyBuiltInFunctionsRule.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/QualifyBuiltInFunctionsRule.java index ffe51935ef8de..70b5e78e6ccff 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/QualifyBuiltInFunctionsRule.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/QualifyBuiltInFunctionsRule.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; import org.apache.flink.table.catalog.FunctionLookup; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ReferenceResolverRule.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ReferenceResolverRule.java similarity index 92% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ReferenceResolverRule.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ReferenceResolverRule.java index 89b351bc5a96d..3c5b142204d7c 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ReferenceResolverRule.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ReferenceResolverRule.java @@ -16,12 +16,13 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.ValidationException; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.expressions.FieldReferenceExpression; +import org.apache.flink.table.expressions.LocalReferenceExpression; import org.apache.flink.table.expressions.UnresolvedCallExpression; import org.apache.flink.table.expressions.UnresolvedReferenceExpression; @@ -29,13 +30,13 @@ import java.util.stream.Collectors; import static java.lang.String.format; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedCall; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedCall; /** * Resolves {@link UnresolvedReferenceExpression} to either * {@link org.apache.flink.table.expressions.FieldReferenceExpression}, * {@link org.apache.flink.table.expressions.TableReferenceExpression}, or - * {@link org.apache.flink.table.expressions.LocalReferenceExpression} in this order. + * {@link LocalReferenceExpression} in this order. */ @Internal final class ReferenceResolverRule implements ResolverRule { diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolveCallByArgumentsRule.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolveCallByArgumentsRule.java similarity index 99% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolveCallByArgumentsRule.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolveCallByArgumentsRule.java index 23aa7d4918e74..73429f497d4d0 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolveCallByArgumentsRule.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolveCallByArgumentsRule.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.TableException; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolveFlattenCallRule.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolveFlattenCallRule.java similarity index 96% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolveFlattenCallRule.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolveFlattenCallRule.java index 1d2a3941e54f3..53d7750c2b875 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolveFlattenCallRule.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolveFlattenCallRule.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeinfo.TypeInformation; @@ -32,7 +32,7 @@ import java.util.stream.IntStream; import static java.util.Collections.singletonList; -import static org.apache.flink.table.expressions.ApiExpressionUtils.valueLiteral; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.valueLiteral; import static org.apache.flink.table.types.utils.TypeConversions.fromDataTypeToLegacyInfo; import static org.apache.flink.table.types.utils.TypeConversions.fromLegacyInfoToDataType; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolverRule.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolverRule.java similarity index 87% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolverRule.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolverRule.java index 802b550cb9cb7..0a7fed0e19439 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolverRule.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolverRule.java @@ -16,16 +16,16 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; import org.apache.flink.table.catalog.FunctionLookup; import org.apache.flink.table.expressions.Expression; -import org.apache.flink.table.expressions.ExpressionResolver; -import org.apache.flink.table.expressions.LocalOverWindow; import org.apache.flink.table.expressions.LocalReferenceExpression; -import org.apache.flink.table.expressions.lookups.FieldReferenceLookup; -import org.apache.flink.table.expressions.lookups.TableReferenceLookup; +import org.apache.flink.table.expressions.resolver.ExpressionResolver; +import org.apache.flink.table.expressions.resolver.LocalOverWindow; +import org.apache.flink.table.expressions.resolver.lookups.FieldReferenceLookup; +import org.apache.flink.table.expressions.resolver.lookups.TableReferenceLookup; import org.apache.flink.table.functions.FunctionDefinition; import java.util.List; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolverRules.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolverRules.java similarity index 97% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolverRules.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolverRules.java index d68899ec0f8b7..915f6a53fa520 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/ResolverRules.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/ResolverRules.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; import org.apache.flink.table.expressions.UnresolvedReferenceExpression; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/RuleExpressionVisitor.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/RuleExpressionVisitor.java similarity index 84% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/RuleExpressionVisitor.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/RuleExpressionVisitor.java index 59a23380b582c..debd0ef6cba76 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/RuleExpressionVisitor.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/RuleExpressionVisitor.java @@ -16,11 +16,11 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; -import org.apache.flink.table.expressions.ApiExpressionDefaultVisitor; -import org.apache.flink.table.expressions.rules.ResolverRule.ResolutionContext; +import org.apache.flink.table.expressions.resolver.rules.ResolverRule.ResolutionContext; +import org.apache.flink.table.expressions.utils.ApiExpressionDefaultVisitor; /** * Utility class for {@link ResolverRule} specific visitor that unifies access to diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/StarReferenceFlatteningRule.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/StarReferenceFlatteningRule.java similarity index 97% rename from flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/StarReferenceFlatteningRule.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/StarReferenceFlatteningRule.java index 5283aed3fa672..5e58898af2cd8 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/expressions/rules/StarReferenceFlatteningRule.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/resolver/rules/StarReferenceFlatteningRule.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.flink.table.expressions.rules; +package org.apache.flink.table.expressions.resolver.rules; import org.apache.flink.annotation.Internal; import org.apache.flink.table.expressions.Expression; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ApiExpressionDefaultVisitor.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/utils/ApiExpressionDefaultVisitor.java similarity index 80% rename from flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ApiExpressionDefaultVisitor.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/utils/ApiExpressionDefaultVisitor.java index b31550d975d5e..3eb8467eaa64d 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ApiExpressionDefaultVisitor.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/utils/ApiExpressionDefaultVisitor.java @@ -16,9 +16,20 @@ * limitations under the License. */ -package org.apache.flink.table.expressions; +package org.apache.flink.table.expressions.utils; import org.apache.flink.annotation.Internal; +import org.apache.flink.table.expressions.ApiExpressionVisitor; +import org.apache.flink.table.expressions.CallExpression; +import org.apache.flink.table.expressions.Expression; +import org.apache.flink.table.expressions.FieldReferenceExpression; +import org.apache.flink.table.expressions.LocalReferenceExpression; +import org.apache.flink.table.expressions.LookupCallExpression; +import org.apache.flink.table.expressions.TableReferenceExpression; +import org.apache.flink.table.expressions.TypeLiteralExpression; +import org.apache.flink.table.expressions.UnresolvedCallExpression; +import org.apache.flink.table.expressions.UnresolvedReferenceExpression; +import org.apache.flink.table.expressions.ValueLiteralExpression; /** * A utility {@link ApiExpressionVisitor} that calls {@link #defaultMethod(Expression)} by default, diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ApiExpressionUtils.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/utils/ApiExpressionUtils.java similarity index 87% rename from flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ApiExpressionUtils.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/utils/ApiExpressionUtils.java index e6514194f3bef..f04878f337c8b 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ApiExpressionUtils.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/utils/ApiExpressionUtils.java @@ -16,12 +16,21 @@ * limitations under the License. */ -package org.apache.flink.table.expressions; +package org.apache.flink.table.expressions.utils; import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.DataTypes; import org.apache.flink.table.api.Table; import org.apache.flink.table.api.ValidationException; +import org.apache.flink.table.expressions.CallExpression; +import org.apache.flink.table.expressions.Expression; +import org.apache.flink.table.expressions.ExpressionUtils; +import org.apache.flink.table.expressions.LookupCallExpression; +import org.apache.flink.table.expressions.TableReferenceExpression; +import org.apache.flink.table.expressions.TypeLiteralExpression; +import org.apache.flink.table.expressions.UnresolvedCallExpression; +import org.apache.flink.table.expressions.UnresolvedReferenceExpression; +import org.apache.flink.table.expressions.ValueLiteralExpression; import org.apache.flink.table.functions.FunctionDefinition; import org.apache.flink.table.functions.FunctionKind; import org.apache.flink.table.types.DataType; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ResolvedExpressionDefaultVisitor.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/utils/ResolvedExpressionDefaultVisitor.java similarity index 76% rename from flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ResolvedExpressionDefaultVisitor.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/utils/ResolvedExpressionDefaultVisitor.java index 2aa25d8b8f869..785c6e6568238 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/ResolvedExpressionDefaultVisitor.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/expressions/utils/ResolvedExpressionDefaultVisitor.java @@ -16,9 +16,17 @@ * limitations under the License. */ -package org.apache.flink.table.expressions; +package org.apache.flink.table.expressions.utils; import org.apache.flink.annotation.Internal; +import org.apache.flink.table.expressions.CallExpression; +import org.apache.flink.table.expressions.FieldReferenceExpression; +import org.apache.flink.table.expressions.LocalReferenceExpression; +import org.apache.flink.table.expressions.ResolvedExpression; +import org.apache.flink.table.expressions.ResolvedExpressionVisitor; +import org.apache.flink.table.expressions.TableReferenceExpression; +import org.apache.flink.table.expressions.TypeLiteralExpression; +import org.apache.flink.table.expressions.ValueLiteralExpression; /** * A utility {@link ResolvedExpressionVisitor} that calls {@link #defaultMethod(ResolvedExpression)} diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/OperationExpressionsUtils.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/OperationExpressionsUtils.java index 7072a3f6b3ed1..8e9912bfb6b18 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/OperationExpressionsUtils.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/OperationExpressionsUtils.java @@ -19,7 +19,6 @@ package org.apache.flink.table.operations; import org.apache.flink.annotation.Internal; -import org.apache.flink.table.expressions.ApiExpressionDefaultVisitor; import org.apache.flink.table.expressions.CallExpression; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.expressions.FieldReferenceExpression; @@ -28,6 +27,7 @@ import org.apache.flink.table.expressions.ResolvedExpression; import org.apache.flink.table.expressions.TableReferenceExpression; import org.apache.flink.table.expressions.UnresolvedCallExpression; +import org.apache.flink.table.expressions.utils.ApiExpressionDefaultVisitor; import org.apache.flink.table.functions.BuiltInFunctionDefinitions; import org.apache.flink.table.functions.FunctionDefinition; @@ -37,11 +37,11 @@ import java.util.Optional; import java.util.stream.Collectors; -import static org.apache.flink.table.expressions.ApiExpressionUtils.isFunctionOfKind; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedCall; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; -import static org.apache.flink.table.expressions.ApiExpressionUtils.valueLiteral; import static org.apache.flink.table.expressions.ExpressionUtils.extractValue; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.isFunctionOfKind; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedCall; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.valueLiteral; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.AS; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.WINDOW_PROPERTIES; import static org.apache.flink.table.functions.FunctionKind.AGGREGATE; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/typeutils/FieldInfoUtils.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/typeutils/FieldInfoUtils.java index 321fb5006dc49..4877bc40a6b15 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/typeutils/FieldInfoUtils.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/typeutils/FieldInfoUtils.java @@ -28,11 +28,11 @@ import org.apache.flink.table.api.TableSchema; import org.apache.flink.table.api.Types; import org.apache.flink.table.api.ValidationException; -import org.apache.flink.table.expressions.ApiExpressionDefaultVisitor; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.expressions.ExpressionUtils; import org.apache.flink.table.expressions.UnresolvedCallExpression; import org.apache.flink.table.expressions.UnresolvedReferenceExpression; +import org.apache.flink.table.expressions.utils.ApiExpressionDefaultVisitor; import org.apache.flink.table.functions.BuiltInFunctionDefinitions; import org.apache.flink.table.types.AtomicDataType; import org.apache.flink.table.types.DataType; diff --git a/flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/operations/QueryOperationTest.java b/flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/operations/QueryOperationTest.java index b9374c650528b..7c28839079827 100644 --- a/flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/operations/QueryOperationTest.java +++ b/flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/operations/QueryOperationTest.java @@ -29,7 +29,7 @@ import java.util.Arrays; import java.util.Collections; -import static org.apache.flink.table.expressions.ApiExpressionUtils.intervalOfMillis; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.intervalOfMillis; import static org.junit.Assert.assertEquals; /** diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/expressions/ExpressionBuilder.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/expressions/ExpressionBuilder.java index 6fc7f6fa9728f..333d763887a76 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/expressions/ExpressionBuilder.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/expressions/ExpressionBuilder.java @@ -18,6 +18,7 @@ package org.apache.flink.table.expressions; +import org.apache.flink.table.expressions.utils.ApiExpressionUtils; import org.apache.flink.table.functions.FunctionDefinition; import org.apache.flink.table.types.DataType; diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/AvgAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/AvgAggFunction.java index ef656b7593820..815084368d220 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/AvgAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/AvgAggFunction.java @@ -27,7 +27,6 @@ import java.math.BigDecimal; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.div; import static org.apache.flink.table.expressions.ExpressionBuilder.equalTo; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; @@ -36,6 +35,7 @@ import static org.apache.flink.table.expressions.ExpressionBuilder.minus; import static org.apache.flink.table.expressions.ExpressionBuilder.nullOf; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in avg aggregate function. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/ConcatAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/ConcatAggFunction.java index ed32b7defc270..19cc878b2ae33 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/ConcatAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/ConcatAggFunction.java @@ -24,12 +24,12 @@ import org.apache.flink.table.expressions.UnresolvedReferenceExpression; import org.apache.flink.table.types.DataType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.concat; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.isNull; import static org.apache.flink.table.expressions.ExpressionBuilder.literal; import static org.apache.flink.table.expressions.ExpressionBuilder.nullOf; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in concat aggregate function. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/Count1AggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/Count1AggFunction.java index 975e1b65425f8..ca94f5ea076f3 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/Count1AggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/Count1AggFunction.java @@ -23,10 +23,10 @@ import org.apache.flink.table.expressions.UnresolvedReferenceExpression; import org.apache.flink.table.types.DataType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.literal; import static org.apache.flink.table.expressions.ExpressionBuilder.minus; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * This count1 aggregate function returns the count1 of values diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/CountAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/CountAggFunction.java index cb115c486570e..a5a563987bff5 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/CountAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/CountAggFunction.java @@ -23,12 +23,12 @@ import org.apache.flink.table.expressions.UnresolvedReferenceExpression; import org.apache.flink.table.types.DataType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.isNull; import static org.apache.flink.table.expressions.ExpressionBuilder.literal; import static org.apache.flink.table.expressions.ExpressionBuilder.minus; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in count aggregate function. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/DeclarativeAggregateFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/DeclarativeAggregateFunction.java index e68834024b5c5..04c10c1e6136e 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/DeclarativeAggregateFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/DeclarativeAggregateFunction.java @@ -29,7 +29,7 @@ import java.util.Set; import java.util.stream.Collectors; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * API for aggregation functions that are expressed in terms of expressions. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/IncrSumAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/IncrSumAggFunction.java index 29e3536cefe0b..97354327cafb1 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/IncrSumAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/IncrSumAggFunction.java @@ -26,7 +26,6 @@ import org.apache.flink.table.types.DataType; import org.apache.flink.table.types.logical.DecimalType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.isNull; import static org.apache.flink.table.expressions.ExpressionBuilder.lessThan; @@ -34,6 +33,7 @@ import static org.apache.flink.table.expressions.ExpressionBuilder.nullOf; import static org.apache.flink.table.expressions.ExpressionBuilder.or; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in IncrSum aggregate function, diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/IncrSumWithRetractAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/IncrSumWithRetractAggFunction.java index 8a85b0751da89..a6513be1af73b 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/IncrSumWithRetractAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/IncrSumWithRetractAggFunction.java @@ -25,7 +25,6 @@ import org.apache.flink.table.types.DataType; import org.apache.flink.table.types.logical.DecimalType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.equalTo; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.isNull; @@ -35,6 +34,7 @@ import static org.apache.flink.table.expressions.ExpressionBuilder.nullOf; import static org.apache.flink.table.expressions.ExpressionBuilder.or; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in IncrSum with retract aggregate function, diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/LeadLagAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/LeadLagAggFunction.java index 890677ce4e755..7b7c10715b9c3 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/LeadLagAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/LeadLagAggFunction.java @@ -26,10 +26,10 @@ import org.apache.flink.table.types.logical.DecimalType; import org.apache.flink.table.types.logical.TimeType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.cast; import static org.apache.flink.table.expressions.ExpressionBuilder.literal; import static org.apache.flink.table.expressions.ExpressionBuilder.typeLiteral; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * LEAD and LAG aggregate functions return the value of given expression evaluated at given offset. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/MaxAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/MaxAggFunction.java index 1e68247a84fb3..91ffa59b49291 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/MaxAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/MaxAggFunction.java @@ -25,11 +25,11 @@ import org.apache.flink.table.types.logical.DecimalType; import org.apache.flink.table.types.logical.TimeType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.greaterThan; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.isNull; import static org.apache.flink.table.expressions.ExpressionBuilder.nullOf; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in max aggregate function. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/MinAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/MinAggFunction.java index 6a85b0b73180a..7e5f27be2a086 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/MinAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/MinAggFunction.java @@ -25,11 +25,11 @@ import org.apache.flink.table.types.logical.DecimalType; import org.apache.flink.table.types.logical.TimeType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.isNull; import static org.apache.flink.table.expressions.ExpressionBuilder.lessThan; import static org.apache.flink.table.expressions.ExpressionBuilder.nullOf; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in min aggregate function. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RankAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RankAggFunction.java index 2d757681f02a1..9dfaf9630d380 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RankAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RankAggFunction.java @@ -27,13 +27,13 @@ import java.util.Arrays; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.and; import static org.apache.flink.table.expressions.ExpressionBuilder.equalTo; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.literal; import static org.apache.flink.table.expressions.ExpressionBuilder.not; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in rank aggregate function. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RankLikeAggFunctionBase.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RankLikeAggFunctionBase.java index 20541a3ae1670..39340edfa9775 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RankLikeAggFunctionBase.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RankLikeAggFunctionBase.java @@ -32,11 +32,11 @@ import java.util.Arrays; import java.util.Optional; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.equalTo; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.isNull; import static org.apache.flink.table.expressions.ExpressionBuilder.literal; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in rank like aggregate function, e.g. rank, dense_rank diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RowNumberAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RowNumberAggFunction.java index 72a887b048cc9..e539d93dd15cd 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RowNumberAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/RowNumberAggFunction.java @@ -24,9 +24,9 @@ import org.apache.flink.table.expressions.UnresolvedReferenceExpression; import org.apache.flink.table.types.DataType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.literal; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in row_number aggregate function. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SingleValueAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SingleValueAggFunction.java index 1b8662867acba..1bf82b035187e 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SingleValueAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SingleValueAggFunction.java @@ -25,7 +25,6 @@ import org.apache.flink.table.types.logical.DecimalType; import org.apache.flink.table.types.logical.TimeType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.equalTo; import static org.apache.flink.table.expressions.ExpressionBuilder.greaterThan; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; @@ -35,6 +34,7 @@ import static org.apache.flink.table.expressions.ExpressionBuilder.or; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; import static org.apache.flink.table.expressions.ExpressionBuilder.throwException; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * Base class for built-in single value aggregate function. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/Sum0AggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/Sum0AggFunction.java index 96dc41a2ae90c..2bfd909c4b042 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/Sum0AggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/Sum0AggFunction.java @@ -27,12 +27,12 @@ import java.math.BigDecimal; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.isNull; import static org.apache.flink.table.expressions.ExpressionBuilder.literal; import static org.apache.flink.table.expressions.ExpressionBuilder.minus; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in sum0 aggregate function. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SumAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SumAggFunction.java index 5fee0908800f2..1f1455a4a39a1 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SumAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SumAggFunction.java @@ -26,11 +26,11 @@ import org.apache.flink.table.types.DataType; import org.apache.flink.table.types.logical.DecimalType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.isNull; import static org.apache.flink.table.expressions.ExpressionBuilder.nullOf; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in sum aggregate function. diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SumWithRetractAggFunction.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SumWithRetractAggFunction.java index ecf6cd435f6a7..775c92fba5311 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SumWithRetractAggFunction.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/functions/aggfunctions/SumWithRetractAggFunction.java @@ -25,7 +25,6 @@ import org.apache.flink.table.types.DataType; import org.apache.flink.table.types.logical.DecimalType; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.expressions.ExpressionBuilder.equalTo; import static org.apache.flink.table.expressions.ExpressionBuilder.ifThenElse; import static org.apache.flink.table.expressions.ExpressionBuilder.isNull; @@ -33,6 +32,7 @@ import static org.apache.flink.table.expressions.ExpressionBuilder.minus; import static org.apache.flink.table.expressions.ExpressionBuilder.nullOf; import static org.apache.flink.table.expressions.ExpressionBuilder.plus; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; /** * built-in sum aggregate function with retraction. diff --git a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/DeclarativeAggCodeGen.scala b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/DeclarativeAggCodeGen.scala index 49f8ba1c8ba14..a3bf6e0431ae6 100644 --- a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/DeclarativeAggCodeGen.scala +++ b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/DeclarativeAggCodeGen.scala @@ -20,13 +20,13 @@ package org.apache.flink.table.codegen.agg import org.apache.flink.table.codegen.CodeGenUtils.primitiveTypeTermForType import org.apache.flink.table.codegen.agg.AggsHandlerCodeGenerator.DISTINCT_KEY_TERM import org.apache.flink.table.codegen.{CodeGeneratorContext, ExprCodeGenerator, GeneratedExpression} -import org.apache.flink.table.expressions.{ApiExpressionUtils, ResolvedDistinctKeyReference, _} +import org.apache.flink.table.expressions.{ResolvedDistinctKeyReference, _} import org.apache.flink.table.functions.aggfunctions.DeclarativeAggregateFunction import org.apache.flink.table.plan.util.AggregateInfo import org.apache.flink.table.types.LogicalTypeDataTypeConverter.fromDataTypeToLogicalType import org.apache.flink.table.types.logical.LogicalType - import org.apache.calcite.tools.RelBuilder +import org.apache.flink.table.expressions.utils.ApiExpressionUtils import scala.collection.JavaConverters._ diff --git a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/batch/AggCodeGenHelper.scala b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/batch/AggCodeGenHelper.scala index 58c5654a3e2d2..8e7d31de64fb9 100644 --- a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/batch/AggCodeGenHelper.scala +++ b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/batch/AggCodeGenHelper.scala @@ -28,7 +28,8 @@ import org.apache.flink.table.codegen.CodeGenUtils._ import org.apache.flink.table.codegen.OperatorCodeGenerator.STREAM_RECORD import org.apache.flink.table.codegen._ import org.apache.flink.table.dataformat.{BaseRow, GenericRow} -import org.apache.flink.table.expressions.{UnresolvedCallExpression, Expression, ExpressionVisitor, FieldReferenceExpression, ResolvedAggInputReference, ResolvedAggLocalReference, RexNodeConverter, TypeLiteralExpression, UnresolvedReferenceExpression, ValueLiteralExpression, _} +import org.apache.flink.table.expressions.utils.ApiExpressionUtils +import org.apache.flink.table.expressions.{Expression, ExpressionVisitor, FieldReferenceExpression, ResolvedAggInputReference, ResolvedAggLocalReference, RexNodeConverter, TypeLiteralExpression, UnresolvedCallExpression, UnresolvedReferenceExpression, ValueLiteralExpression, _} import org.apache.flink.table.functions.aggfunctions.DeclarativeAggregateFunction import org.apache.flink.table.functions.utils.UserDefinedFunctionUtils.{getAccumulatorTypeOfAggregateFunction, getAggUserDefinedInputTypes} import org.apache.flink.table.functions.{AggregateFunction, UserDefinedFunction} diff --git a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/batch/HashAggCodeGenHelper.scala b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/batch/HashAggCodeGenHelper.scala index ab343dbbfe09a..e2e9f83f8c70b 100644 --- a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/batch/HashAggCodeGenHelper.scala +++ b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/codegen/agg/batch/HashAggCodeGenHelper.scala @@ -27,7 +27,8 @@ import org.apache.flink.table.codegen._ import org.apache.flink.table.codegen.agg.batch.AggCodeGenHelper.buildAggregateArgsMapping import org.apache.flink.table.codegen.sort.SortCodeGenerator import org.apache.flink.table.dataformat.{BaseRow, BinaryRow, GenericRow, JoinedRow} -import org.apache.flink.table.expressions.{UnresolvedCallExpression, Expression, ExpressionVisitor, FieldReferenceExpression, ResolvedAggInputReference, RexNodeConverter, TypeLiteralExpression, UnresolvedReferenceExpression, ValueLiteralExpression, _} +import org.apache.flink.table.expressions.utils.ApiExpressionUtils +import org.apache.flink.table.expressions.{Expression, ExpressionVisitor, FieldReferenceExpression, ResolvedAggInputReference, RexNodeConverter, TypeLiteralExpression, UnresolvedCallExpression, UnresolvedReferenceExpression, ValueLiteralExpression, _} import org.apache.flink.table.functions.aggfunctions.DeclarativeAggregateFunction import org.apache.flink.table.functions.{AggregateFunction, UserDefinedFunction} import org.apache.flink.table.generated.{NormalizedKeyComputer, RecordComparator} diff --git a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/rules/logical/LogicalWindowAggregateRuleBase.scala b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/rules/logical/LogicalWindowAggregateRuleBase.scala index 2383da6737119..557f3c2d61f9d 100644 --- a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/rules/logical/LogicalWindowAggregateRuleBase.scala +++ b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/rules/logical/LogicalWindowAggregateRuleBase.scala @@ -19,7 +19,7 @@ package org.apache.flink.table.plan.rules.logical import org.apache.flink.table.api._ import org.apache.flink.table.calcite.FlinkRelBuilder.NamedWindowProperty -import org.apache.flink.table.expressions.ApiExpressionUtils.intervalOfMillis +import org.apache.flink.table.expressions.utils.ApiExpressionUtils.intervalOfMillis import org.apache.flink.table.expressions.{FieldReferenceExpression, WindowReference} import org.apache.flink.table.functions.sql.FlinkSqlOperatorTable import org.apache.flink.table.plan.logical.{LogicalWindow, SessionGroupWindow, SlidingGroupWindow, TumblingGroupWindow} diff --git a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/util/RexNodeExtractor.scala b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/util/RexNodeExtractor.scala index ec0a3d6c791dc..2f51b5b12da81 100644 --- a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/util/RexNodeExtractor.scala +++ b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/util/RexNodeExtractor.scala @@ -21,7 +21,7 @@ package org.apache.flink.table.plan.util import org.apache.flink.table.api.TableException import org.apache.flink.table.calcite.FlinkTypeFactory import org.apache.flink.table.catalog.{FunctionCatalog, FunctionLookup} -import org.apache.flink.table.expressions.ApiExpressionUtils._ +import org.apache.flink.table.expressions.utils.ApiExpressionUtils._ import org.apache.flink.table.expressions._ import org.apache.flink.table.functions.BuiltInFunctionDefinitions.{AND, CAST, OR} import org.apache.flink.table.types.LogicalTypeDataTypeConverter diff --git a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/TableSourceUtil.scala b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/TableSourceUtil.scala index 857ab92815c05..46fda8f5b008f 100644 --- a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/TableSourceUtil.scala +++ b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/TableSourceUtil.scala @@ -31,7 +31,7 @@ import org.apache.flink.api.common.typeinfo.TypeInformation import org.apache.flink.api.common.typeutils.CompositeType import org.apache.flink.table.api.{DataTypes, ValidationException} import org.apache.flink.table.calcite.FlinkTypeFactory -import org.apache.flink.table.expressions.ApiExpressionUtils.{unresolvedCall, typeLiteral} +import org.apache.flink.table.expressions.utils.ApiExpressionUtils.{unresolvedCall, typeLiteral} import org.apache.flink.table.expressions.{PlannerResolvedFieldReference, ResolvedFieldReference, RexNodeConverter} import org.apache.flink.table.functions.BuiltInFunctionDefinitions import org.apache.flink.table.types.LogicalTypeDataTypeConverter diff --git a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/tsextractors/ExistingField.scala b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/tsextractors/ExistingField.scala index b20936d503a71..540f79f97de92 100644 --- a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/tsextractors/ExistingField.scala +++ b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/tsextractors/ExistingField.scala @@ -23,7 +23,7 @@ import java.util import org.apache.flink.api.common.typeinfo.TypeInformation import org.apache.flink.table.api.{Types, ValidationException} import org.apache.flink.table.descriptors.Rowtime -import org.apache.flink.table.expressions.ApiExpressionUtils.{unresolvedCall, typeLiteral, valueLiteral} +import org.apache.flink.table.expressions.utils.ApiExpressionUtils.{unresolvedCall, typeLiteral, valueLiteral} import org.apache.flink.table.expressions._ import org.apache.flink.table.functions.BuiltInFunctionDefinitions import org.apache.flink.table.types.utils.TypeConversions.fromLegacyInfoToDataType diff --git a/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/metadata/FlinkRelMdHandlerTestBase.scala b/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/metadata/FlinkRelMdHandlerTestBase.scala index 0661f035648b7..94144b96ea063 100644 --- a/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/metadata/FlinkRelMdHandlerTestBase.scala +++ b/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/metadata/FlinkRelMdHandlerTestBase.scala @@ -22,7 +22,7 @@ import org.apache.flink.table.api.{TableConfig, TableException} import org.apache.flink.table.calcite.FlinkRelBuilder.NamedWindowProperty import org.apache.flink.table.calcite.{FlinkRelBuilder, FlinkTypeFactory} import org.apache.flink.table.catalog.FunctionCatalog -import org.apache.flink.table.expressions.ApiExpressionUtils.intervalOfMillis +import org.apache.flink.table.expressions.utils.ApiExpressionUtils.intervalOfMillis import org.apache.flink.table.expressions._ import org.apache.flink.table.functions.aggfunctions.SumAggFunction.DoubleSumAggFunction import org.apache.flink.table.functions.aggfunctions.{DenseRankAggFunction, RankAggFunction, RowNumberAggFunction} diff --git a/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/util/RexNodeExtractorTest.scala b/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/util/RexNodeExtractorTest.scala index 8751f80a39bcd..e4641afb37972 100644 --- a/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/util/RexNodeExtractorTest.scala +++ b/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/plan/util/RexNodeExtractorTest.scala @@ -20,7 +20,7 @@ package org.apache.flink.table.plan.util import org.apache.flink.table.api.Types import org.apache.flink.table.catalog.FunctionCatalog -import org.apache.flink.table.expressions.ApiExpressionUtils.{unresolvedCall, unresolvedRef, valueLiteral} +import org.apache.flink.table.expressions.utils.ApiExpressionUtils.{unresolvedCall, unresolvedRef, valueLiteral} import org.apache.flink.table.expressions.Expression import org.apache.flink.table.expressions.utils.Func1 import org.apache.flink.table.functions.AggregateFunctionDefinition diff --git a/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/util/testTableSources.scala b/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/util/testTableSources.scala index 251c977acfa9c..4c407f88c1689 100644 --- a/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/util/testTableSources.scala +++ b/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/util/testTableSources.scala @@ -23,7 +23,7 @@ import org.apache.flink.api.java.typeutils.RowTypeInfo import org.apache.flink.streaming.api.datastream.DataStream import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment import org.apache.flink.table.api.{TableSchema, Types} -import org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedCall +import org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedCall import org.apache.flink.table.expressions.{Expression, FieldReferenceExpression, UnresolvedCallExpression, ValueLiteralExpression} import org.apache.flink.table.functions.BuiltInFunctionDefinitions import org.apache.flink.table.functions.BuiltInFunctionDefinitions.AND diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/AggregateOperationFactory.java b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/AggregateOperationFactory.java index 2e45b2843a76b..3b62170940a74 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/AggregateOperationFactory.java +++ b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/AggregateOperationFactory.java @@ -35,14 +35,14 @@ import org.apache.flink.table.expressions.CallExpression; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.expressions.ExpressionBridge; -import org.apache.flink.table.expressions.ExpressionResolver; import org.apache.flink.table.expressions.ExpressionUtils; import org.apache.flink.table.expressions.FieldReferenceExpression; import org.apache.flink.table.expressions.PlannerExpression; import org.apache.flink.table.expressions.ResolvedExpression; -import org.apache.flink.table.expressions.ResolvedExpressionDefaultVisitor; import org.apache.flink.table.expressions.UnresolvedReferenceExpression; import org.apache.flink.table.expressions.ValueLiteralExpression; +import org.apache.flink.table.expressions.resolver.ExpressionResolver; +import org.apache.flink.table.expressions.utils.ResolvedExpressionDefaultVisitor; import org.apache.flink.table.functions.BuiltInFunctionDefinitions; import org.apache.flink.table.functions.FunctionDefinition; import org.apache.flink.table.functions.FunctionRequirement; @@ -64,7 +64,7 @@ import static java.util.Collections.singletonList; import static java.util.stream.Collectors.toList; import static org.apache.flink.api.common.typeinfo.BasicTypeInfo.LONG_TYPE_INFO; -import static org.apache.flink.table.expressions.ApiExpressionUtils.isFunctionOfKind; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.isFunctionOfKind; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.AS; import static org.apache.flink.table.functions.FunctionKind.AGGREGATE; import static org.apache.flink.table.functions.FunctionKind.TABLE_AGGREGATE; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/AliasOperationUtils.java b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/AliasOperationUtils.java index caac29206bc49..c73ca47fb179c 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/AliasOperationUtils.java +++ b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/AliasOperationUtils.java @@ -21,20 +21,20 @@ import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.TableSchema; import org.apache.flink.table.api.ValidationException; -import org.apache.flink.table.expressions.ApiExpressionDefaultVisitor; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.expressions.ExpressionUtils; import org.apache.flink.table.expressions.UnresolvedReferenceExpression; import org.apache.flink.table.expressions.ValueLiteralExpression; +import org.apache.flink.table.expressions.utils.ApiExpressionDefaultVisitor; import org.apache.flink.table.functions.BuiltInFunctionDefinitions; import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedCall; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; -import static org.apache.flink.table.expressions.ApiExpressionUtils.valueLiteral; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedCall; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.valueLiteral; /** * Utility class for creating valid alias expressions that can be later used as a projection. diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/CalculatedTableFactory.java b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/CalculatedTableFactory.java index 8fb0625a5a88b..2e10ee8dbe2b4 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/CalculatedTableFactory.java +++ b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/CalculatedTableFactory.java @@ -26,7 +26,7 @@ import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.expressions.ExpressionUtils; import org.apache.flink.table.expressions.ResolvedExpression; -import org.apache.flink.table.expressions.ResolvedExpressionDefaultVisitor; +import org.apache.flink.table.expressions.utils.ResolvedExpressionDefaultVisitor; import org.apache.flink.table.functions.FunctionDefinition; import org.apache.flink.table.functions.TableFunctionDefinition; import org.apache.flink.table.typeutils.FieldInfoUtils; @@ -36,7 +36,7 @@ import java.util.List; import static java.util.stream.Collectors.toList; -import static org.apache.flink.table.expressions.ApiExpressionUtils.isFunctionOfKind; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.isFunctionOfKind; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.AS; import static org.apache.flink.table.functions.FunctionKind.TABLE; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/ColumnOperationUtils.java b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/ColumnOperationUtils.java index eaa30240a1e3a..b84d33acabdb8 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/ColumnOperationUtils.java +++ b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/ColumnOperationUtils.java @@ -20,11 +20,11 @@ import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.ValidationException; -import org.apache.flink.table.expressions.ApiExpressionDefaultVisitor; -import org.apache.flink.table.expressions.ApiExpressionUtils; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.expressions.UnresolvedCallExpression; import org.apache.flink.table.expressions.UnresolvedReferenceExpression; +import org.apache.flink.table.expressions.utils.ApiExpressionDefaultVisitor; +import org.apache.flink.table.expressions.utils.ApiExpressionUtils; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -33,7 +33,7 @@ import java.util.stream.Collectors; import static java.lang.String.format; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedRef; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedRef; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.AS; import static org.apache.flink.table.operations.OperationExpressionsUtils.extractName; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/JoinOperationFactory.java b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/JoinOperationFactory.java index 7d0400e0716e0..45748db8676bd 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/JoinOperationFactory.java +++ b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/JoinOperationFactory.java @@ -28,7 +28,7 @@ import org.apache.flink.table.expressions.FieldReferenceExpression; import org.apache.flink.table.expressions.PlannerExpression; import org.apache.flink.table.expressions.ResolvedExpression; -import org.apache.flink.table.expressions.ResolvedExpressionDefaultVisitor; +import org.apache.flink.table.expressions.utils.ResolvedExpressionDefaultVisitor; import org.apache.flink.table.functions.BuiltInFunctionDefinitions; import org.apache.flink.table.operations.JoinQueryOperation.JoinType; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/OperationTreeBuilderFactory.java b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/OperationTreeBuilderFactory.java index c93c2fae405d9..5b5705a29cb32 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/OperationTreeBuilderFactory.java +++ b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/OperationTreeBuilderFactory.java @@ -23,7 +23,7 @@ import org.apache.flink.table.expressions.ExpressionBridge; import org.apache.flink.table.expressions.PlannerExpression; import org.apache.flink.table.expressions.PlannerExpressionConverter$; -import org.apache.flink.table.expressions.lookups.TableReferenceLookup; +import org.apache.flink.table.expressions.resolver.lookups.TableReferenceLookup; /** * Temporary solution for looking up the {@link OperationTreeBuilder}. The tree builder diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/ProjectionOperationFactory.java b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/ProjectionOperationFactory.java index fe6912e7dece1..f5f1687d53ef1 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/ProjectionOperationFactory.java +++ b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/ProjectionOperationFactory.java @@ -26,14 +26,14 @@ import org.apache.flink.table.expressions.CallExpression; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.expressions.ExpressionBridge; -import org.apache.flink.table.expressions.ExpressionResolver; import org.apache.flink.table.expressions.FieldReferenceExpression; import org.apache.flink.table.expressions.LocalReferenceExpression; import org.apache.flink.table.expressions.PlannerExpression; import org.apache.flink.table.expressions.ResolvedExpression; -import org.apache.flink.table.expressions.ResolvedExpressionDefaultVisitor; import org.apache.flink.table.expressions.TableReferenceExpression; import org.apache.flink.table.expressions.ValueLiteralExpression; +import org.apache.flink.table.expressions.resolver.ExpressionResolver; +import org.apache.flink.table.expressions.utils.ResolvedExpressionDefaultVisitor; import org.apache.flink.table.functions.BuiltInFunctionDefinitions; import org.apache.flink.table.functions.FunctionDefinition; import org.apache.flink.table.types.logical.LogicalType; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/SortOperationFactory.java b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/SortOperationFactory.java index 824463e675203..e2d86e80c78f6 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/SortOperationFactory.java +++ b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/SortOperationFactory.java @@ -21,9 +21,9 @@ import org.apache.flink.annotation.Internal; import org.apache.flink.table.api.ValidationException; import org.apache.flink.table.expressions.CallExpression; -import org.apache.flink.table.expressions.ExpressionResolver; import org.apache.flink.table.expressions.ResolvedExpression; -import org.apache.flink.table.expressions.ResolvedExpressionDefaultVisitor; +import org.apache.flink.table.expressions.resolver.ExpressionResolver; +import org.apache.flink.table.expressions.utils.ResolvedExpressionDefaultVisitor; import java.util.List; import java.util.stream.Collectors; diff --git a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/plan/QueryOperationConverter.java b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/plan/QueryOperationConverter.java index a6b5d306c26bf..798e83ef6ecd9 100644 --- a/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/plan/QueryOperationConverter.java +++ b/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/plan/QueryOperationConverter.java @@ -95,9 +95,9 @@ import static java.util.Arrays.asList; import static java.util.stream.Collectors.toList; -import static org.apache.flink.table.expressions.ApiExpressionUtils.isFunctionOfKind; -import static org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedCall; import static org.apache.flink.table.expressions.ExpressionUtils.extractValue; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.isFunctionOfKind; +import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedCall; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.AS; import static org.apache.flink.table.functions.FunctionKind.AGGREGATE; import static org.apache.flink.table.functions.FunctionKind.TABLE_AGGREGATE; diff --git a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/BatchTableEnvImpl.scala b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/BatchTableEnvImpl.scala index c1acd0a0facfb..b8425d7a5a95d 100644 --- a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/BatchTableEnvImpl.scala +++ b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/BatchTableEnvImpl.scala @@ -30,7 +30,8 @@ import org.apache.flink.table.calcite.{CalciteConfig, FlinkTypeFactory} import org.apache.flink.table.catalog.CatalogManager import org.apache.flink.table.descriptors.{BatchTableDescriptor, ConnectorDescriptor} import org.apache.flink.table.explain.PlanJsonParser -import org.apache.flink.table.expressions.{ApiExpressionDefaultVisitor, Expression, UnresolvedCallExpression} +import org.apache.flink.table.expressions.utils.ApiExpressionDefaultVisitor +import org.apache.flink.table.expressions.{Expression, UnresolvedCallExpression} import org.apache.flink.table.functions.BuiltInFunctionDefinitions.TIME_ATTRIBUTES import org.apache.flink.table.operations.DataSetQueryOperation import org.apache.flink.table.plan.BatchOptimizer diff --git a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/TableEnvImpl.scala b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/TableEnvImpl.scala index c52c0f0ea3b49..f82a68d0b1232 100644 --- a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/TableEnvImpl.scala +++ b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/internal/TableEnvImpl.scala @@ -30,7 +30,7 @@ import org.apache.flink.table.api._ import org.apache.flink.table.calcite.{FlinkPlannerImpl, FlinkRelBuilder} import org.apache.flink.table.catalog._ import org.apache.flink.table.expressions._ -import org.apache.flink.table.expressions.lookups.TableReferenceLookup +import org.apache.flink.table.expressions.resolver.lookups.TableReferenceLookup import org.apache.flink.table.factories.{TableFactoryService, TableFactoryUtil, TableSinkFactory} import org.apache.flink.table.functions.{AggregateFunction, ScalarFunction, TableFunction, UserDefinedAggregateFunction, _} import org.apache.flink.table.operations.{CatalogQueryOperation, PlannerQueryOperation, TableSourceQueryOperation, _} diff --git a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala index c25e4408d81ee..c84d5ded6deee 100644 --- a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala +++ b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala @@ -24,7 +24,7 @@ import java.time.{LocalDate, LocalDateTime} import org.apache.flink.api.common.typeinfo.{SqlTimeTypeInfo, TypeInformation} import org.apache.flink.table.api.{DataTypes, Over, Table, ValidationException} -import org.apache.flink.table.expressions.ApiExpressionUtils._ +import org.apache.flink.table.expressions.utils.ApiExpressionUtils._ import org.apache.flink.table.expressions._ import org.apache.flink.table.functions.BuiltInFunctionDefinitions.{RANGE_TO, WITH_COLUMNS, E => FDE, UUID => FDUUID, _} import org.apache.flink.table.functions.{ScalarFunction, TableFunction, UserDefinedAggregateFunction, UserFunctionsTypeHelper, _} diff --git a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/ExpressionBridge.scala b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/ExpressionBridge.scala index 4bf7b322d977f..7000bada15c4e 100644 --- a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/ExpressionBridge.scala +++ b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/ExpressionBridge.scala @@ -19,6 +19,7 @@ package org.apache.flink.table.expressions import org.apache.flink.table.catalog.FunctionLookup +import org.apache.flink.table.expressions.resolver.LookupCallResolver /** * Bridges between API [[Expression]]s (for both Java and Scala) and final expression stack. diff --git a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/PlannerExpressionParserImpl.scala b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/PlannerExpressionParserImpl.scala index 94e76b789844f..32161a3a7dfbf 100644 --- a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/PlannerExpressionParserImpl.scala +++ b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/PlannerExpressionParserImpl.scala @@ -22,7 +22,8 @@ import _root_.java.util.{List => JList} import org.apache.flink.api.common.typeinfo.{SqlTimeTypeInfo, TypeInformation} import org.apache.flink.table.api._ -import org.apache.flink.table.expressions.ApiExpressionUtils._ +import org.apache.flink.table.delegation.PlannerExpressionParser +import org.apache.flink.table.expressions.utils.ApiExpressionUtils._ import org.apache.flink.table.functions.BuiltInFunctionDefinitions import org.apache.flink.table.types.utils.TypeConversions.fromLegacyInfoToDataType diff --git a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/operations/OperationTreeBuilderImpl.scala b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/operations/OperationTreeBuilderImpl.scala index 0f826040a85e0..3fba57cfe34fc 100644 --- a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/operations/OperationTreeBuilderImpl.scala +++ b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/operations/OperationTreeBuilderImpl.scala @@ -22,10 +22,12 @@ import java.util.{Collections, Optional, List => JList} import org.apache.flink.table.api._ import org.apache.flink.table.catalog.FunctionLookup -import org.apache.flink.table.expressions.ApiExpressionUtils.{isFunctionOfKind, unresolvedCall, unresolvedRef, valueLiteral} -import org.apache.flink.table.expressions.ExpressionResolver.resolverFor +import org.apache.flink.table.expressions.utils.ApiExpressionUtils.{isFunctionOfKind, unresolvedCall, unresolvedRef, valueLiteral} +import org.apache.flink.table.expressions.resolver.ExpressionResolver.resolverFor import org.apache.flink.table.expressions._ -import org.apache.flink.table.expressions.lookups.TableReferenceLookup +import org.apache.flink.table.expressions.resolver.lookups.TableReferenceLookup +import org.apache.flink.table.expressions.resolver.{ExpressionResolver, LookupCallResolver} +import org.apache.flink.table.expressions.utils.{ApiExpressionDefaultVisitor, ApiExpressionUtils} import org.apache.flink.table.functions.FunctionKind.{SCALAR, TABLE} import org.apache.flink.table.functions.utils.UserDefinedFunctionUtils import org.apache.flink.table.functions.{AggregateFunctionDefinition, BuiltInFunctionDefinitions, TableFunctionDefinition} diff --git a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/util/RexProgramExtractor.scala b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/util/RexProgramExtractor.scala index 48f0a6f103bb4..998a731e6f8a3 100644 --- a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/util/RexProgramExtractor.scala +++ b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/plan/util/RexProgramExtractor.scala @@ -29,7 +29,7 @@ import org.apache.flink.api.common.typeinfo.{BasicTypeInfo, SqlTimeTypeInfo} import org.apache.flink.table.api.TableException import org.apache.flink.table.calcite.FlinkTypeFactory import org.apache.flink.table.catalog.FunctionCatalog -import org.apache.flink.table.expressions.ApiExpressionUtils.unresolvedCall +import org.apache.flink.table.expressions.utils.ApiExpressionUtils.unresolvedCall import org.apache.flink.table.expressions._ import org.apache.flink.table.util.JavaScalaConversionUtil import org.apache.flink.util.Preconditions diff --git a/flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/expressions/KeywordParseTest.scala b/flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/expressions/KeywordParseTest.scala index 7d7596427b9b3..da7eccedaefe2 100644 --- a/flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/expressions/KeywordParseTest.scala +++ b/flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/expressions/KeywordParseTest.scala @@ -18,7 +18,7 @@ package org.apache.flink.table.expressions -import org.apache.flink.table.expressions.ApiExpressionUtils.{unresolvedCall, lookupCall, unresolvedRef} +import org.apache.flink.table.expressions.utils.ApiExpressionUtils.{unresolvedCall, lookupCall, unresolvedRef} import org.apache.flink.table.functions.BuiltInFunctionDefinitions import org.junit.Assert.assertEquals import org.junit.Test