-
Notifications
You must be signed in to change notification settings - Fork 144
Dialyzer complains about ungroup with no colum names #1055
Copy link
Copy link
Closed
Description
Hi! I've mentioned in a closed issue about ungroup that I was experiencing an error when calling ungroup with no column names. But actually, the issue is different: it works, but Dialyzer complains about it.
The issue
This works:
[
%{date: ~D[2025-01-14], id: 7, price: 4200},
%{date: ~D[2025-01-14], id: 19, price: 5000},
%{date: ~D[2025-01-15], id: 7, price: 4000},
%{date: ~D[2025-01-15], id: 19, price: 5000}
]
|> DF.new()
|> DF.group_by(:date)
|> DF.summarise(price: min(price))
|> DF.ungroup() # no column names specified
|> DF.print()+--------------------------------------------+
| Explorer DataFrame: [rows: 2, columns: 2] |
+------------------------+-------------------+
| date | price |
| <date> | <s64> |
+========================+===================+
| 2025-01-14 | 4200 |
+------------------------+-------------------+
| 2025-01-15 | 4000 |
+------------------------+-------------------+
But Dialyzer complains:
lib/explorer_app.ex:4:no_return
Function test/0 has no local return.
________________________________________________________________________________
done (warnings were emitted)
Halting VM with exit status 2
Then you pass column names in ungroup:
|> DF.ungroup(:date)And Dialyzer stops complaining:
done (passed successfully)
Repo reproducing the issue:
https://github.com/viniciussbs/explorer-app/tree/ungroup-and-dialyzer
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels