doris
doris copied to clipboard
[Bug] subquery with limit statement meet an error
Search before asking
- [X] I had searched in the issues and found no similar issues.
Version
1.1.2
What's Wrong?
select count(1) from (select* from part where p_partkey = 1149 order by p_partkey desc limit 1) a;
when subquery with limit n statement, an exception will be thrown
ERROR 1105 (HY000): errCode = 2, detailMessage = couldn't resolve slot descriptor 1
What You Expected?
query is normal
How to Reproduce?
create a table named part
CREATE TABLE `part` (
`p_partkey` int(11) NOT NULL COMMENT "",
`p_name` varchar(23) NOT NULL COMMENT "",
`p_mfgr` varchar(7) NOT NULL COMMENT "",
`p_category` varchar(8) NOT NULL COMMENT "",
`p_brand` varchar(10) NOT NULL COMMENT "",
`p_color` varchar(12) NOT NULL COMMENT "",
`p_type` varchar(26) NOT NULL COMMENT "",
`p_size` int(11) NOT NULL COMMENT "",
`p_container` varchar(11) NOT NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(`p_partkey`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`p_partkey`) BUCKETS 12
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"colocate_with" = "groupa5",
"in_memory" = "false",
"storage_format" = "V2"
)
and insert sevaral rows of data
query like
select count(1) from (select* from part where p_partkey = 1149 order by p_partkey desc limit 1) a;
Anything Else?
No response
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
introduced by #11621 . @Kikyou1997 PTAL