crate icon indicating copy to clipboard operation
crate copied to clipboard

Get sub-cols of json Postgres JDBC Foreign table

Open matriv opened this issue 1 year ago • 1 comments

Fixes: #16203

matriv avatar Jun 21 '24 09:06 matriv

After playing around a bit, the solution I can think so far, is to use the root column name of the json col in postgres, to be able to get a reference from the ForeignTable, then reconstruct a reference based on the whole subscript path and pass it around to collect phase, etc. Then when we construct the sql query for the jdbc prep statement, we again use only the root name, and then in the parsing of the output we use the whole subscript expression to extract the subcolumn of the json that is asked.

How does it sound to you?

matriv avatar Jun 21 '24 09:06 matriv

Closing in favor of a different approach: https://github.com/crate/crate/pull/16251

matriv avatar Jul 02 '24 11:07 matriv