Hi, can anyone help me with fetching arrays/JSONs from Snowflake? 🙏 I tried following the documentation but couldn't get it to work, see screenshots
Perhaps you need to extend JDBC protocol to decode PGObject: https://github.com/seancorfield/next-jdbc/blob/44b3cc206fe4635702331814da0860e63261e9ec/doc/tips-and-tricks.md?plain=1#L364
Thanks, that's what I tried to follow, but it's all about Postgress and I'm using Snowflake
sorry, I didn't notice Snowflake. Anyway, I still think you need to extend the protocol as described in the document. You need to check what parameters you have in the read-column-by-label method.
Ok I'll look into it, thanks a lot
namely, the second parameter is ResultSetMeta object, and the third is an integer index. Using these two, you can get a type of the column, and if it's "json" or something, decode the value from a string.
Anyone using MySQL and also using virtual threads?
I decided to try the virtual threads option for Jetty 12 and enabled short stacktraces for pinned vthreads... and got thousands of these:
Thread[#62,ForkJoinPool-1-worker-1,5,CarrierThreads]
com.mysql.cj.protocol.ReadAheadInputStream.read(ReadAheadInputStream.java:180) <== monitors:1
com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:889) <== monitors:1
com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:968) <== monitors:1
which suggests that the MySQL DB driver won't play nice with vthreads?https://github.com/mysql/mysql-connector-j/pull/95#issuecomment-1864303693 😕
Yeah, just found two bugs in the MySQL driver tracker about it -- and an article saying the MySQL driver is just about the least virtual thread friendly one out there, for now 🙂
At least they're working on it. But I'm already having "fun" with New Relic and Jetty 12 (even without vthreads) so this may end up being moot anyway...