Wei-hao-Li commented on PR #17411:
URL: https://github.com/apache/iotdb/pull/17411#issuecomment-5029573387

   > Thanks @Wei-hao-Li — you're right, and I looked into this more carefully.
   > 
   > For the deleted-data case in this issue, master already returns the 
correct single NULL row: after a device's data is deleted the device still 
exists, so `last_by` over it yields one row with a NULL value. My change in 
this PR added a guard that suppressed that row — the wrong direction — so I'm 
closing this PR.
   > 
   > While tracing it I did notice a separate case that may be the empty result 
you're pointing at: querying a device that was **never** written (`where 
deviceId = 'dX'` with no such device) appears to return 0 rows rather than a 
single NULL row. If a no-GROUP-BY aggregate over a non-existent device should 
also return one NULL row per the "always return NULL when there's no input 
data" rule, I'd be glad to take that on as a separate, properly-scoped fix — 
could you confirm that's the intended behavior?
   > 
   > Thanks again for the correction.
   
   Yes, we should keep performance consistent with other query engine which 
meets SQL standard, like Trino.
   <img width="714" height="374" alt="image" 
src="https://github.com/user-attachments/assets/bf8d7bac-3a06-4306-aff3-b8dd8badf1ef";
 />
   


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