-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add join table reference check in JOIN ON clause #17333
Add join table reference check in JOIN ON clause #17333
Conversation
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Show resolved
Hide resolved
Can you please submit a CLA a support request? |
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
@rmarduga Can you please squash both commits to a single commit? |
8bf1d9b
to
6649d94
Compare
You can get rid of line break in the PR description. No need for |
presto-main/src/test/java/com/facebook/presto/sql/analyzer/TestAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/test/java/com/facebook/presto/sql/analyzer/TestAnalyzer.java
Outdated
Show resolved
Hide resolved
6649d94
to
750d9eb
Compare
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
162325e
to
39883e4
Compare
39883e4
to
a971f5c
Compare
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
a971f5c
to
2b6888d
Compare
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/analyzer/StatementAnalyzer.java
Outdated
Show resolved
Hide resolved
a833455
to
511b6eb
Compare
While it is permitted to omit the reference of the joining table in a conditional join, the result of such join can lead to a cross join with filter, which can harm the query execution performance. Often, such queries are just a result of copy and paste from another join when user updated the joining table name but forgot to update the join condition. This change will show the PERFORMANCE_WARNING to the user in cases when JOIN ON clause misses the comparison expression with joining table and other table.
511b6eb
to
a341ccc
Compare
Often times, while specifying the joining condition in JOIN ON clause, users make mistakes and not referencing the joining table along side with other table in join condition that result in performance issue due to conditional join resulting in CROSS JOIN. This change will extend the number of cases when user is shown the PERFORMANCE_WARNING when JOIN ON clause misses the comparison expression with joining table and other table. Specifically, it covers the cases when user does not explicitly refer to the relation through table name or alias in JOIN ON clause. Resolves:prestodb#17382 See also: prestodb#17333
Often times, while specifying the joining condition in JOIN ON clause, users make mistakes and not referencing the joining table along side with other table in join condition that result in performance issue due to conditional join resulting in CROSS JOIN. This change will extend the number of cases when user is shown the PERFORMANCE_WARNING when JOIN ON clause misses the comparison expression with joining table and other table. Specifically, it covers the cases when user does not explicitly refer to the relation through table name or alias in JOIN ON clause. Resolves:#17382 See also: #17333
Often times, while specifying the joining condition in JOIN ON clause, users make mistakes and not referencing the joining table along side with other table in join condition that result in performance issue due to conditional join resulting in CROSS JOIN. This change will reduce the number of cases when user is shown the PERFORMANCE_WARNING when JOIN ON clause is actually correct. See also: prestodb#17333, prestodb#17640
Often times, while specifying the joining condition in JOIN ON clause, users make mistakes and not referencing the joining table along side with other table in join condition that result in performance issue due to conditional join resulting in CROSS JOIN. This change will reduce the number of cases when user is shown the PERFORMANCE_WARNING when JOIN ON clause is actually correct. See also: #17333, #17640
Often times, while specifying the joining condition in JOIN ON clause, users make mistakes and not referencing the joining table along side with other table in join condition that result in performance issue due to conditional join resulting in CROSS JOIN. This change will reduce the number of cases when user is shown the PERFORMANCE_WARNING when JOIN ON clause is actually correct. See also: prestodb#17333, prestodb#17640
While it is permitted to omit the reference of the joining table in a conditional join, the result of such join can lead to a cross join with filter, which can harm the query execution performance. Often, such queries are just a result of copy and paste from another join when user updated the joining table name but forgot to update the join condition.
This change will show the PERFORMANCE_WARNING to the user in cases when JOIN ON clause misses the comparison expression with joining table and other table.