nuno-faria opened a new issue, #20809:
URL: https://github.com/apache/datafusion/issues/20809

   ### Describe the bug
   
   When a hash join has an empty build side, the existing fast-path 
optimization does not report the correct number of rows. The problem is that 
the way metrics are tracked has changed but that part has not been updated.
   
   ### To Reproduce
   
   ```sql
   -- this returns two rows but 0 are reported
   EXPLAIN ANALYZE
   WITH t1 (k) AS (
       VALUES (1), (2)
   ), t2 (k) AS (
       VALUES (1)
   )
   SELECT *
   FROM t1
   LEFT ANTI JOIN (
       SELECT *
       FROM t2
       WHERE k <> 1
   ) t2 ON t1.k = t2.k;
   
   HashJoinExec: mode=CollectLeft, join_type=RightAnti, on=[(k@0, k@0)], 
metrics=[output_rows=0, ...
   ```
   
   ### Expected behavior
   
   Show the correct number of rows.
   
   ### Additional context
   
   _No response_


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to