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

decide on handling of unsupported data types in JDBC (ZonedDateTime, Instant and OffsetTime), UUID in MySQL #322

Open
robmwalsh opened this issue Nov 25, 2020 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@robmwalsh
Copy link
Contributor

According to https://jdbc.postgresql.org/documentation/head/java8-date-time.html, ZonedDateTime, Instant and OffsetTime are not supported by JDBC. Some databases will likely support these types if we bypass the JDBC driver (everything else is platform specific, why not executor as well :D) . A couple of options:

  1. have some reasonable defaults e.g. Use an instant stored as an integer type or timestamp at UTC, zoned date time might use a timestamp which is always UTC
  2. remove these types from the default type tags and implement them separately as platform specific extensions
  3. allow users to define how they'd like them stored using a typeclass or something?
  4. do something crazy like having two columns (with one to store tz information) accessed as if it's one by zio-sql (I don't think this is a good idea...)

1 and 2 would require good documentation and consistent handling across the types. 3 & 4 are probably unideal...

@jczuchnowski / @jdegoes any thoughts on this?

@robmwalsh
Copy link
Contributor Author

In #321 @andrewhj pointed out MySQL doesn't support UUID directly, so that's another one we'll have to tackle.

#321 (comment)

@robmwalsh robmwalsh changed the title decide on handling of unsupported data types in JDBC (ZonedDateTime, Instant and OffsetTime) decide on handling of unsupported data types in JDBC (ZonedDateTime, Instant and OffsetTime), UUID in MySQL Nov 25, 2020
@jczuchnowski jczuchnowski added the help wanted Extra attention is needed label Feb 23, 2022
@jczuchnowski
Copy link
Member

Need more research if the way we're handling it now is correct. Specific tests would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants