[doc] add documents for bitwise functions (#7790)
This commit is contained in:
@ -435,6 +435,16 @@ module.exports = [
|
||||
"orthogonal_bitmap_union_count",
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "bitwise function",
|
||||
directoryPath: "bitwise-functions/",
|
||||
children: [
|
||||
"bitand",
|
||||
"bitor",
|
||||
"bitxor",
|
||||
"bitnot"
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Encryption and Digest Functions",
|
||||
directoryPath: "encrypt-digest-functions/",
|
||||
|
||||
@ -439,6 +439,16 @@ module.exports = [
|
||||
"orthogonal_bitmap_union_count",
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "bitwise函数",
|
||||
directoryPath: "bitwise-functions/",
|
||||
children: [
|
||||
"bitand",
|
||||
"bitor",
|
||||
"bitxor",
|
||||
"bitnot"
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Hash函数",
|
||||
directoryPath: "hash-functions/",
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
---
|
||||
{
|
||||
"title": "bitand",
|
||||
"language": "en"
|
||||
}
|
||||
---
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# bitand
|
||||
## description
|
||||
### Syntax
|
||||
|
||||
`BITAND(Integer-type lhs, Integer-type rhs)`
|
||||
|
||||
Returns the result of the AND operation of two integers.
|
||||
|
||||
Integer range: TINYINT、SMALLINT、INT、BIGINT、LARGEINT
|
||||
|
||||
## example
|
||||
|
||||
```
|
||||
mysql> select bitand(3,5) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 1 |
|
||||
+------+
|
||||
|
||||
mysql> select bitand(4,7) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 4 |
|
||||
+------+
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
BITAND
|
||||
@ -0,0 +1,57 @@
|
||||
---
|
||||
{
|
||||
"title": "bitnot",
|
||||
"language": "en"
|
||||
}
|
||||
---
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# bitnot
|
||||
## description
|
||||
### Syntax
|
||||
|
||||
`BITNOT(Integer-type value)`
|
||||
|
||||
Returns the result of the NOT operation of one integer.
|
||||
|
||||
Integer range: TINYINT、SMALLINT、INT、BIGINT、LARGEINT
|
||||
|
||||
## example
|
||||
|
||||
```
|
||||
mysql> select bitnot(7) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| -8 |
|
||||
+------+
|
||||
|
||||
mysql> select bitxor(-127) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 126 |
|
||||
+------+
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
BITNOT
|
||||
@ -0,0 +1,57 @@
|
||||
---
|
||||
{
|
||||
"title": "bitor",
|
||||
"language": "en"
|
||||
}
|
||||
---
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# bitor
|
||||
## description
|
||||
### Syntax
|
||||
|
||||
`BITOR(Integer-type lhs, Integer-type rhs)`
|
||||
|
||||
Returns the result of the OR operation of two integers.
|
||||
|
||||
Integer range: TINYINT、SMALLINT、INT、BIGINT、LARGEINT
|
||||
|
||||
## example
|
||||
|
||||
```
|
||||
mysql> select bitor(3,5) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 7 |
|
||||
+------+
|
||||
|
||||
mysql> select bitand(4,7) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 7 |
|
||||
+------+
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
BITOR
|
||||
@ -0,0 +1,57 @@
|
||||
---
|
||||
{
|
||||
"title": "bitxor",
|
||||
"language": "en"
|
||||
}
|
||||
---
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# bitxor
|
||||
## description
|
||||
### Syntax
|
||||
|
||||
`BITXOR(Integer-type lhs, Integer-type rhs)`
|
||||
|
||||
Returns the result of the XOR operation of two integers.
|
||||
|
||||
Integer range: TINYINT、SMALLINT、INT、BIGINT、LARGEINT
|
||||
|
||||
## example
|
||||
|
||||
```
|
||||
mysql> select bitxor(3,5) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 7 |
|
||||
+------+
|
||||
|
||||
mysql> select bitxor(1,7) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 6 |
|
||||
+------+
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
BITXOR
|
||||
@ -0,0 +1,57 @@
|
||||
---
|
||||
{
|
||||
"title": "bitand",
|
||||
"language": "zh-CN"
|
||||
}
|
||||
---
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# bitand
|
||||
## description
|
||||
### Syntax
|
||||
|
||||
`BITAND(Integer-type lhs, Integer-type rhs)`
|
||||
|
||||
返回两个整数与运算的结果.
|
||||
|
||||
整数范围:TINYINT、SMALLINT、INT、BIGINT、LARGEINT
|
||||
|
||||
## example
|
||||
|
||||
```
|
||||
mysql> select bitand(3,5) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 1 |
|
||||
+------+
|
||||
|
||||
mysql> select bitand(4,7) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 4 |
|
||||
+------+
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
BITAND
|
||||
@ -0,0 +1,57 @@
|
||||
---
|
||||
{
|
||||
"title": "bitnot",
|
||||
"language": "zh-CN"
|
||||
}
|
||||
---
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# bitnot
|
||||
## description
|
||||
### Syntax
|
||||
|
||||
`BITNOT(Integer-type value)`
|
||||
|
||||
返回一个整数取反运算的结果.
|
||||
|
||||
整数范围:TINYINT、SMALLINT、INT、BIGINT、LARGEINT
|
||||
|
||||
## example
|
||||
|
||||
```
|
||||
mysql> select bitnot(7) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| -8 |
|
||||
+------+
|
||||
|
||||
mysql> select bitxor(-127) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 126 |
|
||||
+------+
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
BITNOT
|
||||
@ -0,0 +1,57 @@
|
||||
---
|
||||
{
|
||||
"title": "bitor",
|
||||
"language": "zh-CN"
|
||||
}
|
||||
---
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# bitor
|
||||
## description
|
||||
### Syntax
|
||||
|
||||
`BITOR(Integer-type lhs, Integer-type rhs)`
|
||||
|
||||
返回两个整数或运算的结果.
|
||||
|
||||
整数范围:TINYINT、SMALLINT、INT、BIGINT、LARGEINT
|
||||
|
||||
## example
|
||||
|
||||
```
|
||||
mysql> select bitor(3,5) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 7 |
|
||||
+------+
|
||||
|
||||
mysql> select bitand(4,7) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 7 |
|
||||
+------+
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
BITOR
|
||||
@ -0,0 +1,57 @@
|
||||
---
|
||||
{
|
||||
"title": "bitxor",
|
||||
"language": "zh-CN"
|
||||
}
|
||||
---
|
||||
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
|
||||
# bitxor
|
||||
## description
|
||||
### Syntax
|
||||
|
||||
`BITXOR(Integer-type lhs, Integer-type rhs)`
|
||||
|
||||
返回两个整数异或运算的结果.
|
||||
|
||||
整数范围:TINYINT、SMALLINT、INT、BIGINT、LARGEINT
|
||||
|
||||
## example
|
||||
|
||||
```
|
||||
mysql> select bitxor(3,5) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 7 |
|
||||
+------+
|
||||
|
||||
mysql> select bitxor(1,7) ans;
|
||||
+------+
|
||||
| ans |
|
||||
+------+
|
||||
| 6 |
|
||||
+------+
|
||||
```
|
||||
|
||||
## keyword
|
||||
|
||||
BITXOR
|
||||
Reference in New Issue
Block a user