Skip to content

Aggregating an empty DF does not make aggregation columns appear #1531

@Jolanrensen

Description

@Jolanrensen

Let's say we have

val df = dataFrameOf("a")("a")
val counted = df.drop(1).groupBy { a }.count()

or

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:

Image

We should at least get an empty Int column count in this case.

Thanks for the find @Allex-Nik!

Metadata

Metadata

Assignees

Labels

Compiler pluginAnything related to the DataFrame Compiler PluginbugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions