Aggregating an empty DF does not make aggregation columns appear
Open
bug
Compiler plugin
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
Let's say we have
```kt
val df = dataFrameOf("a")("a")
val counted = df.drop(1).groupBy { a }.count()
```
or
```kt
val counted = df.drop(1).groupBy { a }.aggregate { count() into "count" }
```
In this case `counted` does not obtain the column `count`, it just has the empty column `a`.
This is an issue, because the compiler plugin cannot tell a dataframe is empty, so it will happily suggest `.count` and cause runtime exceptions:
We should at least get an empty `Int` column `count` in this case.
Thanks for the find @Allex-Nik!
Contributor guide
Assessment
This issue has not been assessed yet.