crate
crate copied to clipboard
Get sub-cols of json Postgres JDBC Foreign table
Fixes: #16203
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?
Closing in favor of a different approach: https://github.com/crate/crate/pull/16251