This is an automated email from the ASF dual-hosted git repository. snuyanzin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push: new 5e488533776 [FLINK-37946][doc] fix sql syntax of page Table API & SQL EXPLAIN 5e488533776 is described below commit 5e48853377623d67c124d7c4f173ecba45c26118 Author: slankka <slan...@users.noreply.github.com> AuthorDate: Mon Jun 16 07:50:25 2025 +0800 [FLINK-37946][doc] fix sql syntax of page Table API & SQL EXPLAIN --- docs/content.zh/docs/dev/table/sql/explain.md | 14 +++++++------- docs/content/docs/dev/table/sql/explain.md | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/content.zh/docs/dev/table/sql/explain.md b/docs/content.zh/docs/dev/table/sql/explain.md index 53dbaf72867..c652e70bfe2 100644 --- a/docs/content.zh/docs/dev/table/sql/explain.md +++ b/docs/content.zh/docs/dev/table/sql/explain.md @@ -78,9 +78,9 @@ tEnv.executeSql("CREATE TABLE MyTable2 (`count` bigint, word VARCHAR(256)) WITH String explanation = tEnv.explainSql( "SELECT `count`, COUNT(word) FROM (" - + "MyTable1 WHERE word LIKE 'F%' " + + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " + "UNION ALL " - + "SELECT `count`, word FROM MyTable2) tmp" + + "SELECT `count`, word FROM MyTable2) tmp " + "GROUP BY `count`"); System.out.println(explanation); @@ -89,7 +89,7 @@ TableResult tableResult = tEnv.executeSql( "EXPLAIN PLAN FOR " + "SELECT `count`, COUNT(word) FROM (" - + "MyTable1 WHERE word LIKE 'F%' " + + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " + "UNION ALL " + "SELECT `count`, word FROM MyTable2) tmp GROUP BY `count`"); tableResult.print(); @@ -98,7 +98,7 @@ TableResult tableResult2 = tEnv.executeSql( "EXPLAIN ESTIMATED_COST, CHANGELOG_MODE, PLAN_ADVICE, JSON_EXECUTION_PLAN " + "SELECT `count`, COUNT(word) FROM (" - + "MyTable1 WHERE word LIKE 'F%' " + + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " + "UNION ALL " + "SELECT `count`, word FROM MyTable2) tmp GROUP BY `count`"); tableResult2.print(); @@ -167,7 +167,7 @@ t_env.execute_sql("CREATE TABLE MyTable2 (`count` bigint, word VARCHAR(256)) WIT # 调用 TableEnvironment.explain_sql() 来解释 SELECT 语句 explanation1 = t_env.explain_sql( "SELECT `count`, COUNT(word) FROM (" - "MyTable1 WHERE word LIKE 'F%' " + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " "UNION ALL " "SELECT `count`, word FROM MyTable2) tmp GROUP BY `count`") print(explanation1) @@ -176,7 +176,7 @@ print(explanation1) table_result = t_env.execute_sql( "EXPLAIN PLAN FOR " "SELECT `count`, COUNT(word) FROM (" - "MyTable1 WHERE word LIKE 'F%' " + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " "UNION ALL " "SELECT `count`, word FROM MyTable2) tmp GROUP BY `count`") table_result.print() @@ -184,7 +184,7 @@ table_result.print() table_result2 = t_env.execute_sql( "EXPLAIN ESTIMATED_COST, CHANGELOG_MODE, PLAN_ADVICE, JSON_EXECUTION_PLAN " "SELECT `count`, COUNT(word) FROM (" - "MyTable1 WHERE word LIKE 'F%' " + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " "UNION ALL " "SELECT `count`, word FROM MyTable2) tmp GROUP BY `count`") table_result2.print() diff --git a/docs/content/docs/dev/table/sql/explain.md b/docs/content/docs/dev/table/sql/explain.md index 17eaf8718a4..4a2122e4f9c 100644 --- a/docs/content/docs/dev/table/sql/explain.md +++ b/docs/content/docs/dev/table/sql/explain.md @@ -76,9 +76,9 @@ tEnv.executeSql("CREATE TABLE MyTable2 (`count` bigint, word VARCHAR(256)) WITH String explanation = tEnv.explainSql( "SELECT `count`, COUNT(word) FROM (" - + "MyTable1 WHERE word LIKE 'F%' " + + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " + "UNION ALL " - + "SELECT `count`, word FROM MyTable2) tmp" + + "SELECT `count`, word FROM MyTable2) tmp " + "GROUP BY `count`"); System.out.println(explanation); @@ -87,7 +87,7 @@ TableResult tableResult = tEnv.executeSql( "EXPLAIN PLAN FOR " + "SELECT `count`, COUNT(word) FROM (" - + "MyTable1 WHERE word LIKE 'F%' " + + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " + "UNION ALL " + "SELECT `count`, word FROM MyTable2) tmp GROUP BY `count`"); tableResult.print(); @@ -95,8 +95,8 @@ tableResult.print(); TableResult tableResult2 = tEnv.executeSql( "EXPLAIN ESTIMATED_COST, CHANGELOG_MODE, PLAN_ADVICE, JSON_EXECUTION_PLAN " - + "SELECT `count`, COUNT(word) FROM (" - + "MyTable1 WHERE word LIKE 'F%' " + + "SELECT `count`, COUNT(word) FROM ( " + + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " + "UNION ALL " + "SELECT `count`, word FROM MyTable2) tmp GROUP BY `count`"); tableResult2.print(); @@ -164,7 +164,7 @@ t_env.execute_sql("CREATE TABLE MyTable2 (`count` bigint, word VARCHAR(256)) WIT # explain SELECT statement through TableEnvironment.explain_sql() explanation1 = t_env.explain_sql( "SELECT `count`, COUNT(word) FROM (" - "MyTable1 WHERE word LIKE 'F%' " + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " "UNION ALL " "SELECT `count`, word FROM MyTable2) tmp GROUP BY `count`") print(explanation1) @@ -173,7 +173,7 @@ print(explanation1) table_result = t_env.execute_sql( "EXPLAIN PLAN FOR " "SELECT `count`, COUNT(word) FROM (" - "MyTable1 WHERE word LIKE 'F%' " + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " "UNION ALL " "SELECT `count`, word FROM MyTable2) tmp GROUP BY `count`") table_result.print() @@ -181,7 +181,7 @@ table_result.print() table_result2 = t_env.execute_sql( "EXPLAIN ESTIMATED_COST, CHANGELOG_MODE, PLAN_ADVICE, JSON_EXECUTION_PLAN " "SELECT `count`, COUNT(word) FROM (" - "MyTable1 WHERE word LIKE 'F%' " + "SELECT `count`, word FROM MyTable1 WHERE word LIKE 'F%' " "UNION ALL " "SELECT `count`, word FROM MyTable2) tmp GROUP BY `count`") table_result2.print()