-
Notifications
You must be signed in to change notification settings - Fork 63
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
Enforcing kotlinx datetime bias #843
Conversation
…tc. Adding missing conversions
} | ||
|
||
java.time.LocalDate::class -> convert<Long> { it.toLocalDate(defaultTimeZone).toJavaLocalDate() } | ||
JavaLocalDate::class -> convert<Int> { it.toLong().toLocalDate(defaultTimeZone).toJavaLocalDate() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears like Long converter was removed. Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the when (fromClass) { Int::class -> }
branch, not the Long
branch :) it was in the wrong place
@@ -243,29 +243,30 @@ internal class ArrowWriterImpl( | |||
is TimeNanoVector -> | |||
column.convertToLocalTime() | |||
.forEachIndexed { i, value -> | |||
value?.also { vector.set(i, value.toNanoOfDay()) } | |||
value?.also { vector.set(i, value.toJavaLocalTime().toNanoOfDay()) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this conversion needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, it isn't :) thanks
I wouldn't assign "bug" to this. Instead, something like "migration-needed" would be good. For user it will be a breaking change |
1c3b3c7
to
3a447b7
Compare
Generated sources will be updated after merging this PR. |
Different parts of the library had different biases towards using Java's datetime libraries or Kotlin's.
Since DF is a Kotlin library, we should prefer Kotlin's.
This PR addresses that, while also filling in some missing conversions/parsers.