4paradigm / 4paradigm/OpenMLDB
Bug: Can't use broadcast join when genAddColumnsDf
- Lenguaje dominante
- C++
- Estrellas
- 1.7k
- Forks
- 331
- Merge medio
- 12 d 12 h
- PR fusionados (30 d)
- 1
Descripción
- 
```
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.
Guía de contribución
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- spark, sql
- Área
- databases, machine-learning, performance
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100