You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "amorynan (via GitHub)" <gi...@apache.org> on 2023/05/13 08:59:52 UTC
[GitHub] [doris] amorynan opened a new pull request, #19612: [Doc](map-type) add map sql doc
amorynan opened a new pull request, #19612:
URL: https://github.com/apache/doris/pull/19612
# Proposed changes
add map manual doc
Issue Number: close #xxx
## Problem summary
Describe your changes.
## Checklist(Required)
* [ ] Does it affect the original behavior
* [ ] Has unit tests been added
* [ ] Has document been added or modified
* [ ] Does it need to update dependencies
* [ ] Is this PR support rollback (If NO, please explain WHY)
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] amorynan commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "amorynan (via GitHub)" <gi...@apache.org>.
amorynan commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1551017528
@xy720 done!
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] amorynan commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "amorynan (via GitHub)" <gi...@apache.org>.
amorynan commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1549324187
>
Done ! please review it !
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1550983927
PR approved by at least one committer and no changes requested.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1549370040
PR approved by anyone and no changes requested.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] xiaokang commented on a diff in pull request #19612: [Doc](map-type) add map sql doc
Posted by "xiaokang (via GitHub)" <gi...@apache.org>.
xiaokang commented on code in PR #19612:
URL: https://github.com/apache/doris/pull/19612#discussion_r1193148230
##########
docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/MAP.md:
##########
@@ -0,0 +1,115 @@
+---
+{
+"title": "MAP",
+"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.
+-->
+
+## MAP
+
+### name
+
+<version since="1.2.0">
Review Comment:
version 2.0.0
##########
docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/MAP.md:
##########
@@ -0,0 +1,115 @@
+---
+{
+"title": "MAP",
+"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.
+-->
+
+## MAP
+
+### name
+
+<version since="1.2.0">
+
+MAP
+
+</version>
+
+### description
+
+`MAP<T1, T2>`
Review Comment:
MAP<K, V>
##########
docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/MAP.md:
##########
@@ -0,0 +1,115 @@
+---
+{
+"title": "MAP",
+"language": "zh-CN"
Review Comment:
add english doc and side bar
##########
docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/MAP.md:
##########
@@ -0,0 +1,115 @@
+---
+{
+"title": "MAP",
+"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.
+-->
+
+## MAP
+
+### name
+
+<version since="1.2.0">
+
+MAP
+
+</version>
+
+### description
+
+`MAP<T1, T2>`
+
+由T1, T2 类型元素组成的KV,不能作为key列使用。目前支持在Duplicate,Unique 模型的表中使用。
+
+T支持的类型有:
+
+```
+BOOLEAN, TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE, DECIMAL, DATE,
+DATEV2, DATETIME, DATETIMEV2, CHAR, VARCHAR, STRING
+```
+
+### example
+
+建表示例如下:
+
+```
+ CREATE TABLE IF NOT EXISTS simple_map (
+ `id` INT(11) NULL COMMENT "",
+ `m` Map<STRING, INT> NULL COMMENT ""
+ ) ENGINE=OLAP
+ DUPLICATE KEY(`k1`)
+ DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+ PROPERTIES (
+ "replication_allocation" = "tag.location.default: 1",
+ "storage_format" = "V2"
+ )
+```
+
+插入数据示例:
+
+```
+mysql> INSERT INTO simple_map VALUES(1, {'a': 100, 'b': 200});
+```
+
+查询数据示例:
+
+```
+mysql> SELECT * FROM simple_map;
++------+-----------------------------+
+| id | m |
++------+-----------------------------+
+| 1 | {'a':100, 'b':200} |
+| 2 | {'b':100, 'c':200, 'd':300} |
+| 3 | {'a':10, 'd':200} |
++------+-----------------------------+
+```
+
+查询 map 列示例:
+
+```
+mysql> SELECT m FROM simple_map;
++-----------------------------+
+| m |
++-----------------------------+
+| {'a':100, 'b':200} |
+| {'b':100, 'c':200, 'd':300} |
+| {'a':10, 'd':200} |
++-----------------------------+
+```
+
+map 取值示例:
+
+```
+mysql> SELECT m['a'] FROM simple_map;
++-----------------------------+
+| %element_extract%(`m`, 'a') |
++-----------------------------+
+| 100 |
+| NULL |
+| 10 |
++-----------------------------+
+```
+
Review Comment:
add examples for map functions
##########
docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/MAP.md:
##########
@@ -0,0 +1,115 @@
+---
+{
+"title": "MAP",
+"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.
+-->
+
+## MAP
+
+### name
+
+<version since="1.2.0">
+
+MAP
+
+</version>
+
+### description
+
+`MAP<T1, T2>`
+
+由T1, T2 类型元素组成的KV,不能作为key列使用。目前支持在Duplicate,Unique 模型的表中使用。
+
+T支持的类型有:
+
+```
+BOOLEAN, TINYINT, SMALLINT, INT, BIGINT, LARGEINT, FLOAT, DOUBLE, DECIMAL, DATE,
+DATEV2, DATETIME, DATETIMEV2, CHAR, VARCHAR, STRING
+```
+
+### example
+
+建表示例如下:
+
+```
+ CREATE TABLE IF NOT EXISTS simple_map (
+ `id` INT(11) NULL COMMENT "",
+ `m` Map<STRING, INT> NULL COMMENT ""
+ ) ENGINE=OLAP
+ DUPLICATE KEY(`k1`)
+ DISTRIBUTED BY HASH(`k1`) BUCKETS 1
+ PROPERTIES (
+ "replication_allocation" = "tag.location.default: 1",
+ "storage_format" = "V2"
+ )
+```
+
+插入数据示例:
Review Comment:
add example for stream load
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1549369966
PR approved by at least one committer and no changes requested.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] xiaokang commented on a diff in pull request #19612: [Doc](map-type) add map sql doc
Posted by "xiaokang (via GitHub)" <gi...@apache.org>.
xiaokang commented on code in PR #19612:
URL: https://github.com/apache/doris/pull/19612#discussion_r1193148738
##########
docs/zh-CN/docs/sql-manual/sql-reference/Data-Types/MAP.md:
##########
@@ -0,0 +1,115 @@
+---
+{
+"title": "MAP",
+"language": "zh-CN"
Review Comment:
in docs/sidebars.json
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] xy720 commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "xy720 (via GitHub)" <gi...@apache.org>.
xy720 commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1549104478
can you please add english docs?
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] amorynan commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "amorynan (via GitHub)" <gi...@apache.org>.
amorynan commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1549735264
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] amorynan commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "amorynan (via GitHub)" <gi...@apache.org>.
amorynan commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1549326177
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] amorynan commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "amorynan (via GitHub)" <gi...@apache.org>.
amorynan commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1550585108
@xy720 please approve it
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] dataroaring commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "dataroaring (via GitHub)" <gi...@apache.org>.
dataroaring commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1546887914
english version is also expected.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] amorynan commented on pull request #19612: [Doc](map-type) add map sql doc
Posted by "amorynan (via GitHub)" <gi...@apache.org>.
amorynan commented on PR #19612:
URL: https://github.com/apache/doris/pull/19612#issuecomment-1546611942
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] luzhijing merged pull request #19612: [Doc](map-type) add map sql doc
Posted by "luzhijing (via GitHub)" <gi...@apache.org>.
luzhijing merged PR #19612:
URL: https://github.com/apache/doris/pull/19612
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org