-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](lateral_view) fix lateral view explode_split with temp table #12643
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
Conversation
|
the simple way to fix this is adding |
looks a good idea |
|
LGTM |
|
PR approved by anyone and no changes requested. |
BiteTheDDDDt
left a comment
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.
LGTM
|
PR approved by at least one committer and no changes requested. |
…pache#12643) Problem describe: follow SQL return wrong result: WITH example1 AS ( select 6 AS k1 ,'a,b,c' AS k2) select k1, e1 from example1 lateral view explode_split(k2, ',') tmp as e1; Wrong result: +------+------+ | k1 | e1 | +------+------+ | 0 | a | | 0 | b | | 0 | c | +------+------+ Correct result should be: +------+------+ | k1 | e1 | +------+------+ | 6 | a | | 6 | b | | 6 | c | +------+------+ Why? TableFunctionNode::outputSlotIds do not include column k1. Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
…pache#12643) Problem describe: follow SQL return wrong result: WITH example1 AS ( select 6 AS k1 ,'a,b,c' AS k2) select k1, e1 from example1 lateral view explode_split(k2, ',') tmp as e1; Wrong result: +------+------+ | k1 | e1 | +------+------+ | 0 | a | | 0 | b | | 0 | c | +------+------+ Correct result should be: +------+------+ | k1 | e1 | +------+------+ | 6 | a | | 6 | b | | 6 | c | +------+------+ Why? TableFunctionNode::outputSlotIds do not include column k1. Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
…pache#12643) Problem describe: follow SQL return wrong result: WITH example1 AS ( select 6 AS k1 ,'a,b,c' AS k2) select k1, e1 from example1 lateral view explode_split(k2, ',') tmp as e1; Wrong result: +------+------+ | k1 | e1 | +------+------+ | 0 | a | | 0 | b | | 0 | c | +------+------+ Correct result should be: +------+------+ | k1 | e1 | +------+------+ | 6 | a | | 6 | b | | 6 | c | +------+------+ Why? TableFunctionNode::outputSlotIds do not include column k1. Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
…pache#12643) Problem describe: follow SQL return wrong result: WITH example1 AS ( select 6 AS k1 ,'a,b,c' AS k2) select k1, e1 from example1 lateral view explode_split(k2, ',') tmp as e1; Wrong result: +------+------+ | k1 | e1 | +------+------+ | 0 | a | | 0 | b | | 0 | c | +------+------+ Correct result should be: +------+------+ | k1 | e1 | +------+------+ | 6 | a | | 6 | b | | 6 | c | +------+------+ Why? TableFunctionNode::outputSlotIds do not include column k1. Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
…pache#12643) Problem describe: follow SQL return wrong result: WITH example1 AS ( select 6 AS k1 ,'a,b,c' AS k2) select k1, e1 from example1 lateral view explode_split(k2, ',') tmp as e1; Wrong result: +------+------+ | k1 | e1 | +------+------+ | 0 | a | | 0 | b | | 0 | c | +------+------+ Correct result should be: +------+------+ | k1 | e1 | +------+------+ | 6 | a | | 6 | b | | 6 | c | +------+------+ Why? TableFunctionNode::outputSlotIds do not include column k1. Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
…pache#12643) Problem describe: follow SQL return wrong result: WITH example1 AS ( select 6 AS k1 ,'a,b,c' AS k2) select k1, e1 from example1 lateral view explode_split(k2, ',') tmp as e1; Wrong result: +------+------+ | k1 | e1 | +------+------+ | 0 | a | | 0 | b | | 0 | c | +------+------+ Correct result should be: +------+------+ | k1 | e1 | +------+------+ | 6 | a | | 6 | b | | 6 | c | +------+------+ Why? TableFunctionNode::outputSlotIds do not include column k1. Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
Proposed changes
Issue Number: close #12634
Problem summary
Describe your changes.
Problem describe:
follow SQL return wrong result:
WITH example1 AS ( select 6 AS k1 ,'a,b,c' AS k2) select k1, e1 from example1 lateral view explode_split(k2, ',') tmp as e1;Wrong result:
Why?
TableFunctionNode::outputSlotIds do not include column
k1.Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...