PDGGK commented on PR #17411: URL: https://github.com/apache/iotdb/pull/17411#issuecomment-5022059553
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. -- 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]
