You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/03/21 04:09:16 UTC

[GitHub] [iotdb] ericpai commented on pull request #5273: [IOTDB-2679] Support logical operators in select clauses

ericpai commented on pull request #5273:
URL: https://github.com/apache/iotdb/pull/5273#issuecomment-1073466311


   > ## Description
   > Add some functions to support select logical expression in select clauses.
   > 
   > ### Details
   > Now you can select logical expressions like a>b, fore example
   > 
   > ```sql
   > select a, a>10, !(a<20) && a<30 from root.test;
   > ```
   > 
   > **output**:
   > 
   > ```
   > IoTDB> select a, a>10, !(a<20) && a<30 from root.test;
   > +-----------------------------+-----------+----------------+--------------------------------------+
   > |                         Time|root.test.a|root.test.a > 10|!root.test.a < 20 & (root.test.a < 30)|
   > +-----------------------------+-----------+----------------+--------------------------------------+
   > |1970-01-01T08:00:00.001+08:00|         23|            true|                                  true|
   > |1970-01-01T08:00:00.002+08:00|         33|            true|                                 false|
   > |1970-01-01T08:00:00.004+08:00|         13|            true|                                 false|
   > |1970-01-01T08:00:00.005+08:00|         26|            true|                                  true|
   > |1970-01-01T08:00:00.008+08:00|          1|           false|                                 false|
   > |1970-01-01T08:00:00.010+08:00|         23|            true|                                  true|
   > +-----------------------------+-----------+----------------+--------------------------------------+
   > ```
   > 
   > ```
   > 
   > ```
   
   @flashzxi Could you add some docs about this excellent feature in English and Chinese :)


-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org