You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by zjx <zj...@foxmail.com> on 2022/03/01 06:14:18 UTC
Updates of IoTDB Null Value Filter Query
Hi! I'm working on Null Value Filter Query[1] these days.I want to enrich the capabilities of null value filter in the next days. Formerly, null value filter only support to filter that the columns queried are any null or all null. But now null value filter is going to support to filter the columns that are specified by the users. You can get an overview of the syntax changes below.
old syntax:
withoutNullClause : WITHOUT NULL_LITERAL (ALL | ANY) ;
new syntax:
withoutNullClause : WITHOUT NULL_LITERAL (ALL | ANY) (LR_BRACKET (expression | identifier) (COMMA (expression | identifier))* RR_BRACKET)? ;
You can see some examples below.
1
IoTDB> select * from root.sg1.d1 +----+--------------+--------------+--------------+ |Time|root.sg1.d1.s1|root.sg1.d1.s2|root.sg1.d1.s3| +----+--------------+--------------+--------------+ | 0| 1| 2| 3| | 1| null| 2| 3| | 2| 1| null| 3| | 3| 1| 2| null| +----+--------------+--------------+--------------+ Total line number = 4 It costs 0.006s
IoTDB> select * from root.sg1.d1 without null any +----+--------------+--------------+--------------+ |Time|root.sg1.d1.s1|root.sg1.d1.s2|root.sg1.d1.s3| +----+--------------+--------------+--------------+ | 0| 1| 2| 3| +----+--------------+--------------+--------------+ Total line number = 1 It costs 0.04s
IoTDB> select * from root.sg1.d1 without null any (s1, s2) +----+--------------+--------------+--------------+ |Time|root.sg1.d1.s1|root.sg1.d1.s2|root.sg1.d1.s3| +----+--------------+--------------+--------------+ | 0| 1| 2| 3| | 3| 1| 2| null| +----+--------------+--------------+--------------+ Total line number = 2 It costs 0.006s
2
IoTDB> select * from root.ln.wf01.wt01 without null all; +-----------------------------+-----------------------+-----------------------------+------------------------+ | Time|root.ln.wf01.wt01.usage|root.ln.wf01.wt01.temperature|root.ln.wf01.wt01.status| +-----------------------------+-----------------------+-----------------------------+------------------------+ |1970-01-01T08:00:00.001+08:00| 0.98| null| null| |1970-01-01T08:00:00.100+08:00| 0.98| null| true| +-----------------------------+-----------------------+-----------------------------+------------------------+ Total line number = 2 It costs 0.007s
IoTDB> select * from root.ln.wf01.wt01 without null all (temperature, status); +-----------------------------+-----------------------+-----------------------------+------------------------+ | Time|root.ln.wf01.wt01.usage|root.ln.wf01.wt01.temperature|root.ln.wf01.wt01.status| +-----------------------------+-----------------------+-----------------------------+------------------------+ |1970-01-01T08:00:00.100+08:00| 0.98| null| true| +-----------------------------+-----------------------+-----------------------------+------------------------+ Total line number = 1 It costs 0.007s
[1] https://issues.apache.org/jira/browse/IOTDB-2602