-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-38609][table] Make generation of xml plans deterministic #27183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f0ee7cb
[hotfix][tests] Make editorconfig for plan tests expecting spaces for…
snuyanzin e8b03e0
[hotfix][table] Remove trailing spaces and fix typo
snuyanzin 71c24da
[FLINK-38609][table] Enable `SubqueryCorrelateVariablesValidationTest…
snuyanzin 5f13169
[FLINK-38609][table] Make generation of xml plans deterministic
snuyanzin 2a36a2f
[FLINK-38609][table] Regenerate plans in deterministic manner
snuyanzin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
277 changes: 206 additions & 71 deletions
277
...link-table-planner/src/test/java/org/apache/flink/table/planner/utils/DiffRepository.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,7 +94,7 @@ MultipleInput(readOrder=[0,1], members=[\nHashJoin(joinType=[InnerJoin], where=[ | |
| ]]> | ||
| </Resource> | ||
| </TestCase> | ||
| <TestCase name="testExplainWithAgg[extended=true]"> | ||
| <TestCase name="testExplainWithAgg[extended=false]"> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here and all other xml files: were dropped and completely regenerated |
||
| <Resource name="explain"> | ||
| <![CDATA[== Abstract Syntax Tree == | ||
| LogicalProject(EXPR$0=[$1]) | ||
|
|
@@ -103,12 +103,12 @@ LogicalProject(EXPR$0=[$1]) | |
| +- LogicalTableScan(table=[[default_catalog, default_database, MyTable1]]) | ||
|
|
||
| == Optimized Physical Plan == | ||
| Calc(select=[EXPR$0]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- HashAggregate(isMerge=[true], groupBy=[a], select=[a, Final_COUNT(count1$0) AS EXPR$0]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- Exchange(distribution=[hash[a]]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- LocalHashAggregate(groupBy=[a], select=[a, Partial_COUNT(*) AS count1$0]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- Calc(select=[a]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- BoundedStreamScan(table=[[default_catalog, default_database, MyTable1]], fields=[a, b, c]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| Calc(select=[EXPR$0]) | ||
| +- HashAggregate(isMerge=[true], groupBy=[a], select=[a, Final_COUNT(count1$0) AS EXPR$0]) | ||
| +- Exchange(distribution=[hash[a]]) | ||
| +- LocalHashAggregate(groupBy=[a], select=[a, Partial_COUNT(*) AS count1$0]) | ||
| +- Calc(select=[a]) | ||
| +- BoundedStreamScan(table=[[default_catalog, default_database, MyTable1]], fields=[a, b, c]) | ||
|
|
||
| == Optimized Execution Plan == | ||
| Calc(select=[EXPR$0]) | ||
|
|
@@ -120,7 +120,7 @@ Calc(select=[EXPR$0]) | |
| ]]> | ||
| </Resource> | ||
| </TestCase> | ||
| <TestCase name="testExplainWithAgg[extended=false]"> | ||
| <TestCase name="testExplainWithAgg[extended=true]"> | ||
| <Resource name="explain"> | ||
| <![CDATA[== Abstract Syntax Tree == | ||
| LogicalProject(EXPR$0=[$1]) | ||
|
|
@@ -129,12 +129,12 @@ LogicalProject(EXPR$0=[$1]) | |
| +- LogicalTableScan(table=[[default_catalog, default_database, MyTable1]]) | ||
|
|
||
| == Optimized Physical Plan == | ||
| Calc(select=[EXPR$0]) | ||
| +- HashAggregate(isMerge=[true], groupBy=[a], select=[a, Final_COUNT(count1$0) AS EXPR$0]) | ||
| +- Exchange(distribution=[hash[a]]) | ||
| +- LocalHashAggregate(groupBy=[a], select=[a, Partial_COUNT(*) AS count1$0]) | ||
| +- Calc(select=[a]) | ||
| +- BoundedStreamScan(table=[[default_catalog, default_database, MyTable1]], fields=[a, b, c]) | ||
| Calc(select=[EXPR$0]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- HashAggregate(isMerge=[true], groupBy=[a], select=[a, Final_COUNT(count1$0) AS EXPR$0]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- Exchange(distribution=[hash[a]]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- LocalHashAggregate(groupBy=[a], select=[a, Partial_COUNT(*) AS count1$0]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- Calc(select=[a]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- BoundedStreamScan(table=[[default_catalog, default_database, MyTable1]], fields=[a, b, c]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
|
|
||
| == Optimized Execution Plan == | ||
| Calc(select=[EXPR$0]) | ||
|
|
@@ -446,35 +446,35 @@ SortLimit(orderBy=[a ASC], offset=[0], fetch=[5], global=[true]) | |
| ]]> | ||
| </Resource> | ||
| </TestCase> | ||
| <TestCase name="testExplainWithTableSourceScan[extended=true]"> | ||
| <TestCase name="testExplainWithTableSourceScan[extended=false]"> | ||
| <Resource name="explain"> | ||
| <![CDATA[== Abstract Syntax Tree == | ||
| LogicalProject(a=[$0], b=[$1], c=[$2]) | ||
| +- LogicalTableScan(table=[[default_catalog, default_database, MyTable]]) | ||
|
|
||
| == Optimized Physical Plan == | ||
| TableSourceScan(table=[[default_catalog, default_database, MyTable]], fields=[a, b, c]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| TableSourceScan(table=[[default_catalog, default_database, MyTable]], fields=[a, b, c]) | ||
|
|
||
| == Optimized Execution Plan == | ||
| TableSourceScan(table=[[default_catalog, default_database, MyTable]], fields=[a, b, c]) | ||
| ]]> | ||
| </Resource> | ||
| </TestCase> | ||
| <TestCase name="testExplainWithTableSourceScan[extended=false]"> | ||
| <TestCase name="testExplainWithTableSourceScan[extended=true]"> | ||
| <Resource name="explain"> | ||
| <![CDATA[== Abstract Syntax Tree == | ||
| LogicalProject(a=[$0], b=[$1], c=[$2]) | ||
| +- LogicalTableScan(table=[[default_catalog, default_database, MyTable]]) | ||
|
|
||
| == Optimized Physical Plan == | ||
| TableSourceScan(table=[[default_catalog, default_database, MyTable]], fields=[a, b, c]) | ||
| TableSourceScan(table=[[default_catalog, default_database, MyTable]], fields=[a, b, c]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
|
|
||
| == Optimized Execution Plan == | ||
| TableSourceScan(table=[[default_catalog, default_database, MyTable]], fields=[a, b, c]) | ||
| ]]> | ||
| </Resource> | ||
| </TestCase> | ||
| <TestCase name="testExplainWithUnion[extended=true]"> | ||
| <TestCase name="testExplainWithUnion[extended=false]"> | ||
| <Resource name="explain"> | ||
| <![CDATA[== Abstract Syntax Tree == | ||
| LogicalUnion(all=[true]) | ||
|
|
@@ -484,9 +484,9 @@ LogicalUnion(all=[true]) | |
| +- LogicalTableScan(table=[[default_catalog, default_database, MyTable2]]) | ||
|
|
||
| == Optimized Physical Plan == | ||
| Union(all=[true], union=[a, b, c]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| :- BoundedStreamScan(table=[[default_catalog, default_database, MyTable1]], fields=[a, b, c]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- BoundedStreamScan(table=[[default_catalog, default_database, MyTable2]], fields=[d, e, f]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| Union(all=[true], union=[a, b, c]) | ||
| :- BoundedStreamScan(table=[[default_catalog, default_database, MyTable1]], fields=[a, b, c]) | ||
| +- BoundedStreamScan(table=[[default_catalog, default_database, MyTable2]], fields=[d, e, f]) | ||
|
|
||
| == Optimized Execution Plan == | ||
| Union(all=[true], union=[a, b, c]) | ||
|
|
@@ -495,7 +495,7 @@ Union(all=[true], union=[a, b, c]) | |
| ]]> | ||
| </Resource> | ||
| </TestCase> | ||
| <TestCase name="testExplainWithUnion[extended=false]"> | ||
| <TestCase name="testExplainWithUnion[extended=true]"> | ||
| <Resource name="explain"> | ||
| <![CDATA[== Abstract Syntax Tree == | ||
| LogicalUnion(all=[true]) | ||
|
|
@@ -505,9 +505,9 @@ LogicalUnion(all=[true]) | |
| +- LogicalTableScan(table=[[default_catalog, default_database, MyTable2]]) | ||
|
|
||
| == Optimized Physical Plan == | ||
| Union(all=[true], union=[a, b, c]) | ||
| :- BoundedStreamScan(table=[[default_catalog, default_database, MyTable1]], fields=[a, b, c]) | ||
| +- BoundedStreamScan(table=[[default_catalog, default_database, MyTable2]], fields=[d, e, f]) | ||
| Union(all=[true], union=[a, b, c]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| :- BoundedStreamScan(table=[[default_catalog, default_database, MyTable1]], fields=[a, b, c]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
| +- BoundedStreamScan(table=[[default_catalog, default_database, MyTable2]], fields=[d, e, f]): rowcount = , cumulative cost = {rows, cpu, io, network, memory} | ||
|
|
||
| == Optimized Execution Plan == | ||
| Union(all=[true], union=[a, b, c]) | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sync with
DiffRepositorywhere indentation is in spacesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great 👍 Also had this indentation issue when manually updating xmls