You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@bahir.apache.org by Razvan-Daniel Mihai <ra...@gmail.com> on 2020/11/03 15:05:28 UTC

Bug: spark-sql-streaming-jdbc 2.11 2.4.0 cannot handle Date and Timestamp objects

Hallo list,

it seems the "streaming-jdbc" Sink only supports "basic" types (numeric and
strings) but not date and time related types.

I have extended the JdbcWriterSuite with a field of type java.sql.Date. The
test now fails with the error message:

  Cause: java.lang.ClassCastException: java.lang.Integer cannot be cast to
java.sql.Date

The entire output is available hier:

https://gist.github.com/razvan/89fe6ac152558519987f5520cf69c6c2

Similar things happen if a Timestamp is used.

I can provide more details if needed.

Is there any chance of this getting fixed in this version (scala-2.11 and
spark 2.4.0) ? Unfortunately I'm stuck with this version for the
foreseeable future.

Regards,
Razvan