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.
Merge #1
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
Uh oh!
There was an error while loading. Please reload this page.
Merge #1
Changes from 1 commit
27d0c3f42050c34080c4b8c8016aabc88de4a89fa1c764dd6ff3a737252b6cfa9ae262f7cc695076186e93ac4e181b6f113e26492c7c6b643be574189bad26e2c4787051e691a838dbdfe4bee876bc9db51d35097a2ea58f725d47655356ec08bc37d22768a0c40b94d50f6e6c38f4594513f1cda7e5c47c85968cb72b10b8b67ae81de9d37c02c14fff2e84b3e9be4d75588ce650f8feef3abbd8b0914a36a72358989cde07cbbea1b90bf21db2f86a4235ab8b59d6c8159c766c9dc3a1213d58beb736d3679a9103de969f3c821bdc4943cd04607570525fada3ad3aed7ff3bd28e8e4dd0066cc852d44bffcf5fda0e6e420abb4233c214d72f398ece421394946e42409320816771467d5b9b31700111d4b2f0df286713ea9d68dd92e15989b0c728b8383101839039eb79a76791b8e1ea806a0b3d7ad841b33bd031c20cf2f48a4601cb0cd436be1388012ec3265c6938ea3b1674cf2ead4d85dafab9a84fae730a17851d6ba7e44d191178a1f340485f4ee66890858bf762bc3fff7aca0dd854a0f74e0e4e56b5e0e26f68769aedf0908fabbab0f48aaf8b71e5491747bd93289b5275e044eecef7520ee2f5130e9ae228b1eadf22535855671080afc797c5db4577510c65a512e8932e26118b7ad2ea8b5dfbd213a02399134b103449f0534fb64fe82bd2f21b056a3bebcb501777d80aa5ffddfc8948a6e8ef1e8494e6d31fde360e90da667db3eba2969b0cc12d871adee83d09a927f1ac97b3edba4d413fa95a5c3b0bca44d93fb7cc7493f7ba16ff6edabebe9461042b3c3796390f02beb8d2f8136295aa1acfe3a7126c8b62399f302c2ee94abd7b5b1b69782a94dd193248abba53e9e12c94148cd26ef8152567e1360ef6dce2da576a7cfcaf52ba0456281915dae696c3652186afa42d894bfa09cfff9fcd51f1443e9407fba857f109a988aaf89159669ac4b2d2e28622322ec0b4ecbdbb39d53d302c5b4f95de93b51f10ede00344e93e71e657edb42eb8c4209dacdd35a482e7d11cbf26d4cc7b8eb8f74fda4070239ee3f4b902d3dc0bc7af800fa32f0a38c100fc5878bdcfa00347a3901ff928616109ec5d69878b0cbeef4c29856926806f8c001dba673f743514639af51dc3a0d0277fe8a89e42c529a3dcca23f45f14cfce3ee4b4a352437878ab92e174a6005c0f65b49f4d5aa45b4d917e99a9f75fc363b31a5dea6ffec5eeef11babb4400cFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
…AIN FORMATTED ### What changes were proposed in this pull request? The subquery expressions introduced by DPP are not printed in the newer explain command. This PR fixes the code that computes the list of subqueries in the plan. **SQL** df1 and df2 are partitioned on k. ``` SELECT df1.id, df2.k FROM df1 JOIN df2 ON df1.k = df2.k AND df2.id < 2 ``` **Before** ``` |== Physical Plan == * Project (9) +- * BroadcastHashJoin Inner BuildRight (8) :- * ColumnarToRow (2) : +- Scan parquet default.df1 (1) +- BroadcastExchange (7) +- * Project (6) +- * Filter (5) +- * ColumnarToRow (4) +- Scan parquet default.df2 (3) (1) Scan parquet default.df1 Output: [id#19L, k#20L] (2) ColumnarToRow [codegen id : 2] Input: [id#19L, k#20L] (3) Scan parquet default.df2 Output: [id#21L, k#22L] (4) ColumnarToRow [codegen id : 1] Input: [id#21L, k#22L] (5) Filter [codegen id : 1] Input : [id#21L, k#22L] Condition : (isnotnull(id#21L) AND (id#21L < 2)) (6) Project [codegen id : 1] Output : [k#22L] Input : [id#21L, k#22L] (7) BroadcastExchange Input: [k#22L] (8) BroadcastHashJoin [codegen id : 2] Left keys: List(k#20L) Right keys: List(k#22L) Join condition: None (9) Project [codegen id : 2] Output : [id#19L, k#22L] Input : [id#19L, k#20L, k#22L] ``` **After** ``` |== Physical Plan == * Project (9) +- * BroadcastHashJoin Inner BuildRight (8) :- * ColumnarToRow (2) : +- Scan parquet default.df1 (1) +- BroadcastExchange (7) +- * Project (6) +- * Filter (5) +- * ColumnarToRow (4) +- Scan parquet default.df2 (3) (1) Scan parquet default.df1 Output: [id#19L, k#20L] (2) ColumnarToRow [codegen id : 2] Input: [id#19L, k#20L] (3) Scan parquet default.df2 Output: [id#21L, k#22L] (4) ColumnarToRow [codegen id : 1] Input: [id#21L, k#22L] (5) Filter [codegen id : 1] Input : [id#21L, k#22L] Condition : (isnotnull(id#21L) AND (id#21L < 2)) (6) Project [codegen id : 1] Output : [k#22L] Input : [id#21L, k#22L] (7) BroadcastExchange Input: [k#22L] (8) BroadcastHashJoin [codegen id : 2] Left keys: List(k#20L) Right keys: List(k#22L) Join condition: None (9) Project [codegen id : 2] Output : [id#19L, k#22L] Input : [id#19L, k#20L, k#22L] ===== Subqueries ===== Subquery:1 Hosting operator id = 1 Hosting Expression = k#20L IN subquery25 * HashAggregate (16) +- Exchange (15) +- * HashAggregate (14) +- * Project (13) +- * Filter (12) +- * ColumnarToRow (11) +- Scan parquet default.df2 (10) (10) Scan parquet default.df2 Output: [id#21L, k#22L] (11) ColumnarToRow [codegen id : 1] Input: [id#21L, k#22L] (12) Filter [codegen id : 1] Input : [id#21L, k#22L] Condition : (isnotnull(id#21L) AND (id#21L < 2)) (13) Project [codegen id : 1] Output : [k#22L] Input : [id#21L, k#22L] (14) HashAggregate [codegen id : 1] Input: [k#22L] (15) Exchange Input: [k#22L] (16) HashAggregate [codegen id : 2] Input: [k#22L] ``` ### Why are the changes needed? Without the fix, the subqueries are not printed in the explain plan. ### Does this PR introduce any user-facing change? Yes. the explain output will be different. ### How was this patch tested? Added a test case in ExplainSuite. Closes apache#26039 from dilipbiswal/explain_subquery_issue. Authored-by: Dilip Biswal <[email protected]> Signed-off-by: Xiao Li <[email protected]>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing