Skip to content

LocalTimeCodec uses wrong PostgreSQL array type #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
jurriaan opened this issue Nov 7, 2022 · 1 comment
Closed

LocalTimeCodec uses wrong PostgreSQL array type #557

jurriaan opened this issue Nov 7, 2022 · 1 comment

Comments

@jurriaan
Copy link

jurriaan commented Nov 7, 2022

According to the README the TIME mapping should work like this:

PostgreSQL Type Supported Data Type
time [without time zone] LocalTime
time [with time zone] OffsetTime

However as seen below the LocalTimeCodec uses the TIMETZ_ARRAY instead of the TIME_ARRAY, which breaks decoding of Postgres' TIME[] to LocalTime[].

LocalTimeCodec(ByteBufAllocator byteBufAllocator) {
super(LocalTime.class, byteBufAllocator, TIME, TIMETZ_ARRAY, LocalTime::toString);
}

@jurriaan
Copy link
Author

jurriaan commented Nov 7, 2022

Ah, there already is a PR for this: #555

@jurriaan jurriaan closed this as completed Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant