Hi Yuan, I think it is good to be inconsistent with the behavior of relational databases. If we only get one row when query select s2, s3 from root.db.d1, user cannot distinguish between the following two cases:
1. The device has no data in other time; 2. The device has data in other time, just these selected sensors has no data. Yours, Weihao Li At 2024-08-29 09:45:07, "Yuan Tian" <jackietie...@gmail.com> wrote: >Hi all, > >If you are familiar with the tree model, you should know that for a device >d1, if it contains three sensors: s1, s2, s3, and its data are like: >Time | s1 | s2 | s3 | >-------|-----|-----|-----| >1 | 1| 10|100 | >-------|-----|-----|-----| >2 | 2| null|null | >-------|-----|-----|-----| >3 | 3| null|null | > > >if we only query s2 and s3, select s2, s3 from root.db.d1, we will only get >one row(the first row), because for 2 and 3 row, s2 and s3 are all null, >we automatically filter out rows that are entirely null during a scan by >the storage engine. > >However, this is inconsistent with the behavior of relational databases >which will return all three rows. So in our table model, should we keep >consistent with tree model, or we follow the relational databases way? >Personally, I think that we should maintain consistency with relational >databases. > >What do you think? > >Best regards, >---------------------- Yuan Tian