EmmyMiao87 opened a new issue, #8850:
URL: https://github.com/apache/incubator-doris/issues/8850

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   Doris 1.0.0
   
   ### What's Wrong?
   
   Unexpected exception: org.apache.doris.analysis.FunctionCallExpr cannot be 
cast to org.apache.doris.analysis.SlotRef
   
   ### What You Expected?
   
   The parsing is correct and the column is materialized correctly.
   
   ### How to Reproduce?
   
   1. create table 
   
   ```
   CREATE TABLE `tag_map` (
     `tag_group` bigint(20) NULL COMMENT "标签组",
     `tag_value_id` varchar(64) NULL COMMENT "标签值",
     `tag_range` int(11) NOT NULL DEFAULT "0" COMMENT "",
     `partition_sign` varchar(32) NOT NULL COMMENT "分区标识",
     `bucket` int(11) NOT NULL COMMENT "分桶字段",
     `confidence` tinyint(4) NULL DEFAULT "100" COMMENT "置信度",
     `members` bitmap BITMAP_UNION NULL COMMENT "人群"
   ) ENGINE=OLAP
   AGGREGATE KEY(`tag_group`, `tag_value_id`, `tag_range`, `partition_sign`, 
`bucket`, `confidence`)
   COMMENT "dmp_tag_map"
   PARTITION BY LIST(`partition_sign`)
   (PARTITION p202203231 VALUES IN ("2022-03-23-1"),
   PARTITION p202203251 VALUES IN ("2022-03-25-1"),
   PARTITION p202203261 VALUES IN ("2022-03-26-1"),
   PARTITION p202203271 VALUES IN ("2022-03-27-1"),
   PARTITION p202203281 VALUES IN ("2022-03-28-1"),
   PARTITION p202203291 VALUES IN ("2022-03-29-1"),
   PARTITION p202203301 VALUES IN ("2022-03-30-1"),
   PARTITION p202203311 VALUES IN ("2022-03-31-1"),
   PARTITION p202204011 VALUES IN ("2022-04-01-1"),
   PARTITION crowd VALUES IN ("crowd"),
   PARTITION crowd_tmp VALUES IN ("crowd_tmp"),
   PARTITION extend_crowd VALUES IN ("extend_crowd"),
   PARTITION partition_sign VALUES IN ("online_crowd"))
   DISTRIBUTED BY HASH(`bucket`) BUCKETS 64
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1",
   "in_memory" = "false",
   "storage_format" = "V2"
   )
   ```
   
   2. query
   
   ```
   with d as (select f1.bucket, bitmap_and(f1.members, f2.members) as members 
from 
   (select f1.bucket, bitmap_and(f1.members, f2.members) as members from 
(select bucket, bitmap_union(members) as members from tag_map where 
partition_sign='2022-03-31-1' and tag_group=810004  and tag_value_id in 
(5524627,5524628,5524629) group by bucket) f1,(select bucket, 
bitmap_union(members) as members from tag_map where 
partition_sign='2022-03-31-1' and tag_group=810007 and tag_value_id in 
('5525013_17357124_5525019','5525013_17357124_5525020','5525013_17357124_5525021','5525013_17357124_5525022','5525013_17357124_5525023')
 group by bucket) f2 where f1.bucket=f2.bucket) f1,
   (select f1.bucket, bitmap_and(f1.members, f2.members) as members from 
(select f1.bucket, bitmap_and(f1.members, f2.members) as members from (select 
f1.bucket, bitmap_and(f1.members, f2.members) as members from (select bucket, 
bitmap_union(members) as members from tag_map where 
partition_sign='2022-03-31-1' and tag_group=660004  and tag_value_id in 
(1392235) group by bucket) f1,(select bucket, bitmap_union(members) as members 
from tag_map where partition_sign='2022-03-31-1' and tag_group=630004  and 
tag_value_id in (5404632) group by bucket) f2 where f1.bucket=f2.bucket) 
f1,(select bucket, bitmap_union(members) as members from tag_map where 
partition_sign='2022-03-31-1' and tag_group=420004  and tag_value_id in 
(5404628) group by bucket) f2 where f1.bucket=f2.bucket) f1,(select bucket, 
bitmap_union(members) as members from tag_map where 
partition_sign='2022-03-31-1' and tag_group=240004  and tag_value_id in 
(14622211) group by bucket) f2 where f1.bucket=f2.bucket) f2 
   where f1.bucket=f2.bucket
   )
   select bucket, member_id from d lateral view explode_bitmap(members) t as 
member_id;
   ```
   
   3. Exception
   
   ```
   Unexpected exception: org.apache.doris.analysis.FunctionCallExpr cannot be 
cast to org.apache.doris.analysis.SlotRef
   ```
   
   Expect:
   No exception return.
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to