This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push: new 4e9bc5c [doc] add documents for bitwise functions (#7790) 4e9bc5c is described below commit 4e9bc5cb65a248a4a980f9a2ce2dd1b4504bdd96 Author: zhoubintao <35688959+zbtzbt...@users.noreply.github.com> AuthorDate: Mon Jan 24 21:08:41 2022 +0800 [doc] add documents for bitwise functions (#7790) --- docs/.vuepress/sidebar/en.js | 10 ++++ docs/.vuepress/sidebar/zh-CN.js | 10 ++++ .../sql-functions/bitwise-functions/bitand.md | 57 ++++++++++++++++++++++ .../sql-functions/bitwise-functions/bitnot.md | 57 ++++++++++++++++++++++ .../sql-functions/bitwise-functions/bitor.md | 57 ++++++++++++++++++++++ .../sql-functions/bitwise-functions/bitxor.md | 57 ++++++++++++++++++++++ .../sql-functions/bitwise-functions/bitand.md | 57 ++++++++++++++++++++++ .../sql-functions/bitwise-functions/bitnot.md | 57 ++++++++++++++++++++++ .../sql-functions/bitwise-functions/bitor.md | 57 ++++++++++++++++++++++ .../sql-functions/bitwise-functions/bitxor.md | 57 ++++++++++++++++++++++ 10 files changed, 476 insertions(+) diff --git a/docs/.vuepress/sidebar/en.js b/docs/.vuepress/sidebar/en.js index 6053ae4..868958b 100644 --- a/docs/.vuepress/sidebar/en.js +++ b/docs/.vuepress/sidebar/en.js @@ -436,6 +436,16 @@ module.exports = [ ], }, { + title: "bitwise function", + directoryPath: "bitwise-functions/", + children: [ + "bitand", + "bitor", + "bitxor", + "bitnot" + ], + }, + { title: "Encryption and Digest Functions", directoryPath: "encrypt-digest-functions/", children: [ diff --git a/docs/.vuepress/sidebar/zh-CN.js b/docs/.vuepress/sidebar/zh-CN.js index ccbf8cb..1f173eb 100644 --- a/docs/.vuepress/sidebar/zh-CN.js +++ b/docs/.vuepress/sidebar/zh-CN.js @@ -440,6 +440,16 @@ module.exports = [ ], }, { + title: "bitwise函数", + directoryPath: "bitwise-functions/", + children: [ + "bitand", + "bitor", + "bitxor", + "bitnot" + ], + }, + { title: "Hash函数", directoryPath: "hash-functions/", children: ["murmur_hash3_32"], diff --git a/docs/en/sql-reference/sql-functions/bitwise-functions/bitand.md b/docs/en/sql-reference/sql-functions/bitwise-functions/bitand.md new file mode 100644 index 0000000..07eae1e --- /dev/null +++ b/docs/en/sql-reference/sql-functions/bitwise-functions/bitand.md @@ -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 diff --git a/docs/en/sql-reference/sql-functions/bitwise-functions/bitnot.md b/docs/en/sql-reference/sql-functions/bitwise-functions/bitnot.md new file mode 100644 index 0000000..458011a --- /dev/null +++ b/docs/en/sql-reference/sql-functions/bitwise-functions/bitnot.md @@ -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 diff --git a/docs/en/sql-reference/sql-functions/bitwise-functions/bitor.md b/docs/en/sql-reference/sql-functions/bitwise-functions/bitor.md new file mode 100644 index 0000000..8c2d1c6 --- /dev/null +++ b/docs/en/sql-reference/sql-functions/bitwise-functions/bitor.md @@ -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 diff --git a/docs/en/sql-reference/sql-functions/bitwise-functions/bitxor.md b/docs/en/sql-reference/sql-functions/bitwise-functions/bitxor.md new file mode 100644 index 0000000..849db17 --- /dev/null +++ b/docs/en/sql-reference/sql-functions/bitwise-functions/bitxor.md @@ -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 diff --git a/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitand.md b/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitand.md new file mode 100644 index 0000000..c788381 --- /dev/null +++ b/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitand.md @@ -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 diff --git a/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitnot.md b/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitnot.md new file mode 100644 index 0000000..8ad7911 --- /dev/null +++ b/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitnot.md @@ -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 diff --git a/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitor.md b/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitor.md new file mode 100644 index 0000000..c8fb159 --- /dev/null +++ b/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitor.md @@ -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 diff --git a/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitxor.md b/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitxor.md new file mode 100644 index 0000000..e3f4655 --- /dev/null +++ b/docs/zh-CN/sql-reference/sql-functions/bitwise-functions/bitxor.md @@ -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 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org