4paradigm / 4paradigm/OpenMLDB
Bug: Can't use broadcast join when genAddColumnsDf
- 主要语言
- C++
- 星标
- 1.7k
- 派生
- 331
- 平均合并
- 12 天 12 小时
- 30 天内合并 PR
- 1
描述
- 
```
SELECT
sum(vendor_id) over w as w_sum_vendor_id,
max(vendor_id) over w as w_max_vendor_id,
min(vendor_id) over w as w_min_vendor_id,
avg(vendor_id) over w as w_avg_vendor_id,
sum(pickup_longitude) over w as w_sum_pickup_longitude,
max(pickup_longitude) over w as w_max_pickup_longitude,
min(pickup_longitude) over w as w_min_pickup_longitude,
avg(pickup_longitude) over w as w_avg_pickup_longitude,
sum(vendor_id) over w2 as w2_sum_vendor_id,
max(vendor_id) over w2 as w2_max_vendor_id,
min(vendor_id) over w2 as w2_min_vendor_id,
avg(vendor_id) over w2 as w2_avg_vendor_id,
sum(pickup_longitude) over w2 as w2_sum_pickup_longitude,
max(pickup_longitude) over w2 as w2_max_pickup_longitude,
min(pickup_longitude) over w2 as w2_min_pickup_longitude,
avg(pickup_longitude) over w2 as w2_avg_pickup_longitude
FROM taxi
WINDOW w as (partition by vendor_id order by pickup_datetime ROWS BETWEEN 30000 PRECEDING AND CURRENT ROW),
w2 as (partition by vendor_id order by dropoff_datetime ROWS BETWEEN 30000 PRECEDING AND CURRENT ROW)
```
- Normally, it can use broadcast join in window skew optimization, because of small broadcast join table(< 10M)
- However, when remove hint, it will use sortMerge join in window skew optimization because of inaccurate estimates of spark.
贡献指南
调研方向
The issue is about window skew optimization and join strategy selection in Spark SQL within OpenMLDB. Examine the window function logic and join hint removal in the query optimizer. Look at the code handling broadcast join estimation and window skew optimization, likely in the Spark SQL integration or query planner. A linked pull request #490 is merged, so check if it resolved the issue and what changes were made.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- spark, sql
- 领域
- databases, machine-learning, performance
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100