|  | import{_ as e,o as a,c as t,a as n,f as s}from"./app-601a6ddd.js";const o={},r=s(`<h1 id="logical-operators" tabindex="-1"><a class="header-anchor" href="#logical-operators" aria-hidden="true">#</a> Logical Operators</h1><h2 id="unary-logical-operators" tabindex="-1"><a class="header-anchor" href="#unary-logical-operators" aria-hidden="true">#</a> Unary Logical Operators</h2><p>Supported operator <code>!</code></p><p>Supported input data types: <code>BOOLEAN</code></p><p>Output data type: <code>BOOLEAN</code></p><p>Hint: the priority of <code>!</code> is the same as <code>-</code>. Remember to use brackets to modify priority.</p><h2 id="binary-logical-operators" tabindex="-1"><a class="header-anchor" href="#binary-logical-operators" aria-hidden="true">#</a> Binary Logical Operators</h2><p>Supported operators AND:<code>and</code>,<code>&</code>, <code>&&</code>; OR:<code>or</code>,<code>|</code>,<code>||</code></p><p>Supported input data types: <code>BOOLEAN</code></p><p>Output data type: <code>BOOLEAN</code></p><p>Note: Only when the left operand and the right operand under a certain timestamp are both <code>BOOLEAN</code> type, the binary logic operation will have an output value.</p><p><strong>Example:</strong></p><div class="language-sql line-numbers-mode" data-ext="sql"><pre class="language-sql"><code><span class="token keyword">select</span> a<span class="token punctuation">,</span> b<span class="token punctuation">,</span> a <span class="token operator">></span> <span class="token number">10</span><span class="token punctuation">,</span> a <span class="token operator"><=</span> b<span class="token punctuation">,</span> <span class="token operator">!</span><span class="token punctuation">(</span>a <span class="token operator"><=</span> b<span class="token punctuation">)</span><span class="token punctuation">,</span> a <span class="token operator">></span> <span class="token number">10</span> <span class="token operator">&&</span> a <span class="token operator">></span> b <span class="token keyword">from</span> root<span class="token punctuation">.</span>test<span class="token punctuation">;</span> | 
|  | </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>运行结果</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>IoTDB> select a, b, a > 10, a <= b, !(a <= b), a > 10 && a > b from root.test; | 
|  | +-----------------------------+-----------+-----------+----------------+--------------------------+---------------------------+------------------------------------------------+ | 
|  | |                         Time|root.test.a|root.test.b|root.test.a > 10|root.test.a <= root.test.b|!root.test.a <= root.test.b|(root.test.a > 10) & (root.test.a > root.test.b)| | 
|  | +-----------------------------+-----------+-----------+----------------+--------------------------+---------------------------+------------------------------------------------+ | 
|  | |1970-01-01T08:00:00.001+08:00|         23|       10.0|            true|                     false|                       true|                                            true| | 
|  | |1970-01-01T08:00:00.002+08:00|         33|       21.0|            true|                     false|                       true|                                            true| | 
|  | |1970-01-01T08:00:00.004+08:00|         13|       15.0|            true|                      true|                      false|                                           false| | 
|  | |1970-01-01T08:00:00.005+08:00|         26|        0.0|            true|                     false|                       true|                                            true| | 
|  | |1970-01-01T08:00:00.008+08:00|          1|       22.0|           false|                      true|                      false|                                           false| | 
|  | |1970-01-01T08:00:00.010+08:00|         23|       12.0|            true|                     false|                       true|                                            true| | 
|  | +-----------------------------+-----------+-----------+----------------+--------------------------+---------------------------+------------------------------------------------+ | 
|  | </code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div>`,15);function i(p,c){return a(),t("div",null,[n(` | 
|  |  | 
|  | Licensed to the Apache Software Foundation (ASF) under one | 
|  | or more contributor license agreements.  See the NOTICE file | 
|  | distributed with this work for additional information | 
|  | regarding copyright ownership.  The ASF licenses this file | 
|  | to you under the Apache License, Version 2.0 (the | 
|  | "License"); you may not use this file except in compliance | 
|  | with the License.  You may obtain a copy of the License at | 
|  |  | 
|  | http://www.apache.org/licenses/LICENSE-2.0 | 
|  |  | 
|  | Unless required by applicable law or agreed to in writing, | 
|  | software distributed under the License is distributed on an | 
|  | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | 
|  | KIND, either express or implied.  See the License for the | 
|  | specific language governing permissions and limitations | 
|  | under the License. | 
|  |  | 
|  | `),r])}const l=e(o,[["render",i],["__file","Logical.html.vue"]]);export{l as default}; |