Skip to content

Conversation

@Jolanrensen
Copy link
Collaborator

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.

@Jolanrensen Jolanrensen added bug Something isn't working enhancement New feature or request labels Aug 27, 2024
@Jolanrensen Jolanrensen added this to the 0.14.0 milestone Aug 27, 2024
@Jolanrensen Jolanrensen requested a review from koperagen August 27, 2024 12:36
@Jolanrensen Jolanrensen marked this pull request as ready for review August 27, 2024 12:36
@Jolanrensen Jolanrensen self-assigned this Aug 28, 2024
}

java.time.LocalDate::class -> convert<Long> { it.toLocalDate(defaultTimeZone).toJavaLocalDate() }
JavaLocalDate::class -> convert<Int> { it.toLong().toLocalDate(defaultTimeZone).toJavaLocalDate() }
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

column.convertToLocalTime()
.forEachIndexed { i, value ->
value?.also { vector.set(i, value.toNanoOfDay()) }
value?.also { vector.set(i, value.toJavaLocalTime().toNanoOfDay()) }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this conversion needed?

Copy link
Collaborator Author

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

@koperagen
Copy link
Collaborator

I wouldn't assign "bug" to this. Instead, something like "migration-needed" would be good. For user it will be a breaking change

@Jolanrensen Jolanrensen removed the bug Something isn't working label Sep 2, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2024

Generated sources will be updated after merging this PR.
Please inspect the changes in here.

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 this pull request may close these issues.

3 participants