beam icon indicating copy to clipboard operation
beam copied to clipboard

LEFT JOIN LATERAL support?

Open intolerable opened this issue 4 years ago • 0 comments

Is it possible to construct a LEFT JOIN LATERAL query using beam? I've tried to combine lateral_ and leftJoin_ (and subselect_) in a few different ways but I couldn't figure out how to get the state threads to line up properly.

For reference, I'm looking to build a query like this:

SELECT request_json, real_ip
  FROM request_logs
    LEFT JOIN LATERAL jsonb_array_elements(request_logs.request_json->'headers') real_ip
    ON real_ip->>0 ILIKE 'X-Real-IP';

intolerable avatar Jan 28 '21 12:01 intolerable