Skip to content
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

The type of the "coalesce(..., 0)" expression is Long? instead of Long #4929

Closed
Egorand opened this issue Dec 21, 2023 · 1 comment
Closed
Labels

Comments

@Egorand
Copy link
Collaborator

Egorand commented Dec 21, 2023

SQLDelight Version

2.0.1

Operating System

macOS 14.2.1

Gradle Version

8.3

Kotlin Version

1.9.20

Dialect

SQLite

AGP Version

No response

Describe the Bug

In one of our VIEWs, we have a column calculated as follows:

coalesce(fee, (SELECT fee FROM someConfig), 0) AS fee

In SQLDelight 2.0.0, the type of this column was Long, and in 2.0.1 it changed to Long?. Long seems to make more sense here, given that the value is coalesced to 0, so it should never be null. By looking at the changelog for 2.0.1, it seems that #4517 might've introduced this regression.

Stacktrace

No response

Gradle Build Script

No response

@Egorand Egorand added the bug label Dec 21, 2023
@JakeWharton
Copy link
Member

Fixed by #4882

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants