mwinters0 commented on issue #3611:
URL: https://github.com/apache/arrow-adbc/issues/3611#issuecomment-3434966642

   The attached data is the result of a query joining multiple tables.  A 
schema for the result:
   
   ```sql
   CREATE TABLE bad(
     id integer,
     msg_id character varying,
     i integer, 
     topic character varying,
     "timestamp" timestamp without time zone, 
     category character varying,
     agent_name character varying, 
     source_version character varying,
     msg text, 
     headers jsonb,
     user_id integer,
     user_name text, 
     package_id integer,
     package_name text
   );
   ```
   
   This is the original query:
   
   ```sql
   SELECT
       m.id, m.msg_id, m.i, m.topic, m.timestamp, m.category,
       m.agent_name, m.source_version, m.msg, m.headers,
       u.id as user_id,
       u.name as user_name,
       p.id as package_id,
       p.name as package_name
   FROM messages m
   LEFT JOIN users_messages um
       ON m.id = um.msg_id AND m.timestamp = um.msg_timestamp
   LEFT JOIN users u
       ON um.user_id = u.id
   LEFT JOIN packages_messages pm
       ON m.id = pm.msg_id AND m.timestamp = pm.msg_timestamp
   LEFT JOIN packages p
       ON pm.package_id = p.id
   WHERE m.timestamp >= '2025-08-15 01:05:30'
     AND m.timestamp < '2025-08-15 01:06:00'
   ORDER BY m.timestamp, m.id, u.name, p.name
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to