This is an automated email from the ASF dual-hosted git repository. dwysakowicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit 6cc8e44adfaab2d6e3ae4c1992b8fa73c4066c81 Author: Dawid Wysakowicz <dwysakow...@apache.org> AuthorDate: Tue Jul 2 16:46:23 2019 +0200 [hotfix][table-api-java] Moved QueryOperation utilities to o.a.f.t.operations.utils This closes #8860 --- .../flink/table/api/internal/TableEnvironmentImpl.java | 2 +- .../org/apache/flink/table/api/internal/TableImpl.java | 6 +++--- .../operations/{ => utils}/OperationExpressionsUtils.java | 3 ++- .../operations/{ => utils}/OperationTreeBuilder.java | 5 ++++- .../{ => utils}/QueryOperationDefaultVisitor.java | 15 ++++++++++++++- .../utils/factories/AggregateOperationFactory.java | 2 +- .../operations/utils/factories/ColumnOperationUtils.java | 2 +- .../utils/factories/ProjectionOperationFactory.java | 4 ++-- .../apache/flink/table/plan/QueryOperationConverter.java | 2 +- .../apache/flink/table/plan/QueryOperationConverter.java | 2 +- .../apache/flink/table/api/internal/TableEnvImpl.scala | 1 + 11 files changed, 31 insertions(+), 13 deletions(-) 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 9b04f56..e94c65a 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 @@ -50,9 +50,9 @@ import org.apache.flink.table.operations.CatalogQueryOperation; import org.apache.flink.table.operations.CatalogSinkModifyOperation; import org.apache.flink.table.operations.ModifyOperation; import org.apache.flink.table.operations.Operation; -import org.apache.flink.table.operations.OperationTreeBuilder; import org.apache.flink.table.operations.QueryOperation; import org.apache.flink.table.operations.TableSourceQueryOperation; +import org.apache.flink.table.operations.utils.OperationTreeBuilder; import org.apache.flink.table.sinks.TableSink; import org.apache.flink.table.sources.TableSource; import org.apache.flink.table.sources.TableSourceValidation; 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 79f8502..8d33e10 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 @@ -40,10 +40,10 @@ 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; -import org.apache.flink.table.operations.OperationExpressionsUtils; -import org.apache.flink.table.operations.OperationExpressionsUtils.CategorizedExpressions; -import org.apache.flink.table.operations.OperationTreeBuilder; import org.apache.flink.table.operations.QueryOperation; +import org.apache.flink.table.operations.utils.OperationExpressionsUtils; +import org.apache.flink.table.operations.utils.OperationExpressionsUtils.CategorizedExpressions; +import org.apache.flink.table.operations.utils.OperationTreeBuilder; import java.util.Arrays; import java.util.Collections; 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/utils/OperationExpressionsUtils.java similarity index 98% rename from flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/OperationExpressionsUtils.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/OperationExpressionsUtils.java index eb2030d..9bf5b59 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/utils/OperationExpressionsUtils.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.flink.table.operations; +package org.apache.flink.table.operations.utils; import org.apache.flink.annotation.Internal; import org.apache.flink.table.expressions.CallExpression; @@ -30,6 +30,7 @@ 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; +import org.apache.flink.table.operations.QueryOperation; import java.util.LinkedHashMap; import java.util.List; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/OperationTreeBuilder.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/OperationTreeBuilder.java similarity index 99% rename from flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/OperationTreeBuilder.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/OperationTreeBuilder.java index 37de6da..03406de 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/OperationTreeBuilder.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/OperationTreeBuilder.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package org.apache.flink.table.operations; +package org.apache.flink.table.operations.utils; import org.apache.flink.annotation.Internal; import org.apache.flink.api.common.typeinfo.TypeInformation; @@ -42,7 +42,10 @@ import org.apache.flink.table.functions.BuiltInFunctionDefinitions; import org.apache.flink.table.functions.FunctionDefinition; import org.apache.flink.table.functions.FunctionKind; import org.apache.flink.table.functions.TableFunctionDefinition; +import org.apache.flink.table.operations.DistinctQueryOperation; +import org.apache.flink.table.operations.FilterQueryOperation; import org.apache.flink.table.operations.JoinQueryOperation.JoinType; +import org.apache.flink.table.operations.QueryOperation; import org.apache.flink.table.operations.WindowAggregateQueryOperation.ResolvedGroupWindow; import org.apache.flink.table.operations.utils.factories.AggregateOperationFactory; import org.apache.flink.table.operations.utils.factories.AliasOperationUtils; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/QueryOperationDefaultVisitor.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/QueryOperationDefaultVisitor.java similarity index 73% rename from flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/QueryOperationDefaultVisitor.java rename to flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/QueryOperationDefaultVisitor.java index b1c2edc..30ce987 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/QueryOperationDefaultVisitor.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/QueryOperationDefaultVisitor.java @@ -16,9 +16,22 @@ * limitations under the License. */ -package org.apache.flink.table.operations; +package org.apache.flink.table.operations.utils; import org.apache.flink.annotation.Internal; +import org.apache.flink.table.operations.AggregateQueryOperation; +import org.apache.flink.table.operations.CalculatedQueryOperation; +import org.apache.flink.table.operations.CatalogQueryOperation; +import org.apache.flink.table.operations.DistinctQueryOperation; +import org.apache.flink.table.operations.FilterQueryOperation; +import org.apache.flink.table.operations.JoinQueryOperation; +import org.apache.flink.table.operations.ProjectQueryOperation; +import org.apache.flink.table.operations.QueryOperation; +import org.apache.flink.table.operations.QueryOperationVisitor; +import org.apache.flink.table.operations.SetQueryOperation; +import org.apache.flink.table.operations.SortQueryOperation; +import org.apache.flink.table.operations.TableSourceQueryOperation; +import org.apache.flink.table.operations.WindowAggregateQueryOperation; /** * A utility {@link QueryOperationVisitor} that calls diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/AggregateOperationFactory.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/AggregateOperationFactory.java index 8fef793..42c0f03 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/AggregateOperationFactory.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/AggregateOperationFactory.java @@ -73,9 +73,9 @@ import static org.apache.flink.table.expressions.utils.ApiExpressionUtils.isFunc 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; -import static org.apache.flink.table.operations.OperationExpressionsUtils.extractName; import static org.apache.flink.table.operations.WindowAggregateQueryOperation.ResolvedGroupWindow.WindowType.SLIDE; import static org.apache.flink.table.operations.WindowAggregateQueryOperation.ResolvedGroupWindow.WindowType.TUMBLE; +import static org.apache.flink.table.operations.utils.OperationExpressionsUtils.extractName; 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.LogicalTypeRoot.TIMESTAMP_WITHOUT_TIME_ZONE; diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/ColumnOperationUtils.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/ColumnOperationUtils.java index 12e12c99..c26e2fc 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/ColumnOperationUtils.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/ColumnOperationUtils.java @@ -35,7 +35,7 @@ import java.util.stream.Collectors; import static java.lang.String.format; 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; +import static org.apache.flink.table.operations.utils.OperationExpressionsUtils.extractName; /** * Utility class for creating projection expressions from column operation. diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/ProjectionOperationFactory.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/ProjectionOperationFactory.java index fffceb1..3834be5 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/ProjectionOperationFactory.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/factories/ProjectionOperationFactory.java @@ -48,8 +48,8 @@ import java.util.stream.IntStream; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.AS; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.CAST; import static org.apache.flink.table.functions.BuiltInFunctionDefinitions.GET; -import static org.apache.flink.table.operations.OperationExpressionsUtils.extractName; -import static org.apache.flink.table.operations.OperationExpressionsUtils.extractNames; +import static org.apache.flink.table.operations.utils.OperationExpressionsUtils.extractName; +import static org.apache.flink.table.operations.utils.OperationExpressionsUtils.extractNames; import static org.apache.flink.table.types.logical.LogicalTypeRoot.INTEGER; import static org.apache.flink.table.types.logical.utils.LogicalTypeChecks.hasRoot; diff --git a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/plan/QueryOperationConverter.java b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/plan/QueryOperationConverter.java index 0c35431..4cca7ec 100644 --- a/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/plan/QueryOperationConverter.java +++ b/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/plan/QueryOperationConverter.java @@ -31,13 +31,13 @@ import org.apache.flink.table.operations.JoinQueryOperation; import org.apache.flink.table.operations.PlannerQueryOperation; import org.apache.flink.table.operations.ProjectQueryOperation; import org.apache.flink.table.operations.QueryOperation; -import org.apache.flink.table.operations.QueryOperationDefaultVisitor; import org.apache.flink.table.operations.QueryOperationVisitor; import org.apache.flink.table.operations.RichTableSourceQueryOperation; import org.apache.flink.table.operations.SetQueryOperation; import org.apache.flink.table.operations.SortQueryOperation; import org.apache.flink.table.operations.TableSourceQueryOperation; import org.apache.flink.table.operations.WindowAggregateQueryOperation; +import org.apache.flink.table.operations.utils.QueryOperationDefaultVisitor; import org.apache.flink.table.plan.schema.DataStreamTable; import org.apache.flink.table.plan.schema.FlinkRelOptTable; import org.apache.flink.table.plan.schema.TableSourceTable; 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 798e83e..9acfae1 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 @@ -52,7 +52,6 @@ import org.apache.flink.table.operations.JoinQueryOperation.JoinType; import org.apache.flink.table.operations.PlannerQueryOperation; import org.apache.flink.table.operations.ProjectQueryOperation; import org.apache.flink.table.operations.QueryOperation; -import org.apache.flink.table.operations.QueryOperationDefaultVisitor; import org.apache.flink.table.operations.QueryOperationVisitor; import org.apache.flink.table.operations.ScalaDataStreamQueryOperation; import org.apache.flink.table.operations.SetQueryOperation; @@ -60,6 +59,7 @@ import org.apache.flink.table.operations.SortQueryOperation; import org.apache.flink.table.operations.TableSourceQueryOperation; import org.apache.flink.table.operations.WindowAggregateQueryOperation; import org.apache.flink.table.operations.WindowAggregateQueryOperation.ResolvedGroupWindow; +import org.apache.flink.table.operations.utils.QueryOperationDefaultVisitor; import org.apache.flink.table.plan.logical.LogicalWindow; import org.apache.flink.table.plan.logical.SessionGroupWindow; import org.apache.flink.table.plan.logical.SlidingGroupWindow; 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 0041141..2d37173 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 @@ -27,6 +27,7 @@ import org.apache.flink.table.expressions._ 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.utils.OperationTreeBuilder import org.apache.flink.table.operations.{CatalogQueryOperation, PlannerQueryOperation, TableSourceQueryOperation, _} import org.apache.flink.table.planner.PlanningConfigurationBuilder import org.apache.flink.table.sinks.{TableSink, TableSinkUtils}