apache / apache/doris

[Bug] Doris bigint column join will auto cast to double, result repeat. bigint类型关联时自动转double, 导致重复关联。

Open
#62,968 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
15.9k
Forks
3.9k
Avg merge
2d 23h
Merged PRs (30d)
520

Description

### Search before asking

- [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.

### Version

2.1.11

### What's Wrong?

Doris bigint column join will auto cast to double. so that join result repeat.

Image

### What You Expected?

正常关联,或者转varchar关联。

### How to Reproduce?

with users as (
SELECT
cua.id as user_id
from (select id,user_name,user_type from ssp_portal_user where is_delete = false) cua
left join ssp_user_login sul on cua.id = sul.user_id
where cua.user_type = 1
group by cua.id -- 这里也 group by 了id
),
person_all as (
SELECT
asmp.user_id as user_id ,
SUM(asmp.person_login_count) as totalLoginNum,
SUM(asmp.person_dwell_time)/SUM(asmp.person_pv) AS avgDuration,
MAX(asmp.last_action_date) as recentActive
from ads_ssp_metrics_person asmp
group by asmp.user_id -- 这里 group by 了id
)
SELECT
u.*,pa.*
from users u
join person_all pa on u.user_id = pa.user_id
where u.user_id = 2012037927747854336

### Anything Else?

Image

### 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](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.