You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tw...@apache.org on 2022/01/06 16:23:43 UTC

[flink] 02/03: [FLINK-25525][examples-table] Fixed regression which doesn't allow to run the examples from IDEA

This is an automated email from the ASF dual-hosted git repository.

twalthr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 64b9b3a4b8b8f2032318360445db2f4cd6c36a57
Author: slinkydeveloper <fr...@gmail.com>
AuthorDate: Wed Jan 5 16:29:25 2022 +0100

    [FLINK-25525][examples-table] Fixed regression which doesn't allow to run the examples from IDEA
---
 flink-examples/flink-examples-table/pom.xml | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/flink-examples/flink-examples-table/pom.xml b/flink-examples/flink-examples-table/pom.xml
index bb45932..6791577 100644
--- a/flink-examples/flink-examples-table/pom.xml
+++ b/flink-examples/flink-examples-table/pom.xml
@@ -52,35 +52,44 @@ under the License.
 			<artifactId>flink-table-api-scala-bridge_${scala.binary.version}</artifactId>
 			<version>${project.version}</version>
 		</dependency>
+		<!-- The following two dependencies are not required to define a SQL job pipeline,
+		but only to execute it.
 
-		<!-- Table connectors and formats -->
+		In particular, here we're forced to use flink-table-planner_${scala.binary.version} instead of
+		flink-table-planner-loader, because otherwise we hit this bug https://youtrack.jetbrains.com/issue/IDEA-93855
+		when trying to run the examples from within Intellij IDEA. This is only relevant to this specific
+		examples project, as it's in the same build tree of flink-parent.
+
+		In a real environment, you need flink-table-runtime and flink-table-planner-loader either
+		at test scope, for executing tests, or at provided scope, to run the main directly.
+		 -->
 		<dependency>
 			<groupId>org.apache.flink</groupId>
-			<artifactId>flink-connector-files</artifactId>
+			<artifactId>flink-table-runtime</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.flink</groupId>
-			<artifactId>flink-csv</artifactId>
+			<artifactId>flink-table-planner_${scala.binary.version}</artifactId>
 			<version>${project.version}</version>
 		</dependency>
 
-		<!-- Test dependencies -->
+		<!-- Table connectors and formats -->
 		<dependency>
 			<groupId>org.apache.flink</groupId>
-			<artifactId>flink-test-utils</artifactId>
+			<artifactId>flink-connector-files</artifactId>
 			<version>${project.version}</version>
-			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.apache.flink</groupId>
-			<artifactId>flink-table-runtime</artifactId>
+			<artifactId>flink-csv</artifactId>
 			<version>${project.version}</version>
-			<scope>test</scope>
 		</dependency>
+
+		<!-- Test dependencies -->
 		<dependency>
 			<groupId>org.apache.flink</groupId>
-			<artifactId>flink-table-planner-loader</artifactId>
+			<artifactId>flink-test-utils</artifactId>
 			<version>${project.version}</version>
 			<scope>test</scope>
 		</dependency>