Skip to content

Handling of Number types can be unexpected #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Jolanrensen opened this issue Jan 12, 2024 · 1 comment · Fixed by #1073
Closed

Handling of Number types can be unexpected #557

Jolanrensen opened this issue Jan 12, 2024 · 1 comment · Fixed by #1073
Assignees
Labels
enhancement New feature or request

Comments

@Jolanrensen
Copy link
Collaborator

Jolanrensen commented Jan 12, 2024

Currently, numbers are inferred similar to type inference in Kotlin.

For instance:

DataFrame.readJsonStr("""[ { "a": 1 }, { "a": 1.0 } ]""")

results in a column: a: Number. This can cause issues with statistics like std, as they don't support Numbers as of now: #558
It might be easier to work with if numbers would converge in the closest common ancestor in terms of information. For instance: Int + Double + Float => Double, since Doubles can store all information a Double and Int holds.

This would need to be carefully considered, however, as it's inconsistent with Kotlin's type inference.

@Jolanrensen Jolanrensen added invalid This issue/PR doesn't seem right research This requires a deeper dive to gather a better understanding labels Jan 12, 2024
@Jolanrensen Jolanrensen added this to the Backlog milestone Jan 12, 2024
@zaleslaw zaleslaw removed the invalid This issue/PR doesn't seem right label Apr 8, 2024
@Jolanrensen
Copy link
Collaborator Author

A system like #1070 should help

@Jolanrensen Jolanrensen self-assigned this Feb 21, 2025
@Jolanrensen Jolanrensen added enhancement New feature or request and removed research This requires a deeper dive to gather a better understanding labels Feb 21, 2025
@Jolanrensen Jolanrensen modified the milestones: Backlog, 0.16 Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants