You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/29 09:51:21 UTC

[GitHub] [doris] eldenmoon opened a new pull request, #10498: [Fix] select nested type of string within type array should be wrappe…

eldenmoon opened a new pull request, #10498:
URL: https://github.com/apache/doris/pull/10498

   …d with '' in vectorized path
   close #10497 
   eg.
   mysql> set enable_vectorized_engine = true;
   mysql> select k3 from test_array_string order by k2 limit 1;
   +----------------------------------------------+
   | k3                                           |
   +----------------------------------------------+
   | ['cdsdasd', 'xxxx', '3', '4', '5', NULL] |
   +----------------------------------------------+
   
   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   
   Describe the overview of changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## 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] eldenmoon commented on pull request #10498: [Fix] select nested type of string within type array should be wrappe…

Posted by GitBox <gi...@apache.org>.
eldenmoon commented on PR #10498:
URL: https://github.com/apache/doris/pull/10498#issuecomment-1174569254

   @qidaye sorry, i rebased, please approve again


-- 
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] eldenmoon commented on a diff in pull request #10498: [Fix] select nested type of string within type array should be wrappe…

Posted by GitBox <gi...@apache.org>.
eldenmoon commented on code in PR #10498:
URL: https://github.com/apache/doris/pull/10498#discussion_r909582069


##########
be/src/vec/sink/mysql_result_writer.cpp:
##########
@@ -136,7 +136,13 @@ Status VMysqlResultWriter::_add_one_column(const ColumnPtr& column_ptr,
                 if (data->is_null_at(j)) {
                     buf_ret = _buffer.push_string("NULL", strlen("NULL"));
                 } else {
-                    buf_ret = _add_one_cell(data, j, nested_type_ptr, _buffer);
+                    if (WhichDataType(remove_nullable(nested_type_ptr)).is_string()) {
+                        buf_ret = _buffer.push_string("'", 1);
+                        buf_ret = _add_one_cell(data, j, nested_type_ptr, _buffer);

Review Comment:
   ```



##########
be/src/vec/sink/mysql_result_writer.cpp:
##########
@@ -136,7 +136,13 @@ Status VMysqlResultWriter::_add_one_column(const ColumnPtr& column_ptr,
                 if (data->is_null_at(j)) {
                     buf_ret = _buffer.push_string("NULL", strlen("NULL"));
                 } else {
-                    buf_ret = _add_one_cell(data, j, nested_type_ptr, _buffer);
+                    if (WhichDataType(remove_nullable(nested_type_ptr)).is_string()) {
+                        buf_ret = _buffer.push_string("'", 1);
+                        buf_ret = _add_one_cell(data, j, nested_type_ptr, _buffer);

Review Comment:
   ```



-- 
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] yinzhijian commented on a diff in pull request #10498: [Fix] select nested type of string within type array should be wrappe…

Posted by GitBox <gi...@apache.org>.
yinzhijian commented on code in PR #10498:
URL: https://github.com/apache/doris/pull/10498#discussion_r909612612


##########
be/src/vec/sink/mysql_result_writer.cpp:
##########
@@ -136,7 +136,13 @@ Status VMysqlResultWriter::_add_one_column(const ColumnPtr& column_ptr,
                 if (data->is_null_at(j)) {
                     buf_ret = _buffer.push_string("NULL", strlen("NULL"));
                 } else {
-                    buf_ret = _add_one_cell(data, j, nested_type_ptr, _buffer);
+                    if (WhichDataType(remove_nullable(nested_type_ptr)).is_string()) {
+                        buf_ret = _buffer.push_string("'", 1);
+                        buf_ret = _add_one_cell(data, j, nested_type_ptr, _buffer);

Review Comment:
   ok



-- 
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] yiguolei merged pull request #10498: [Fix] select nested type of string within type array should be wrappe…

Posted by GitBox <gi...@apache.org>.
yiguolei merged PR #10498:
URL: https://github.com/apache/doris/pull/10498


-- 
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 #10498: [Fix] select nested type of string within type array should be wrappe…

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #10498:
URL: https://github.com/apache/doris/pull/10498#issuecomment-1170688498

   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] yinzhijian commented on a diff in pull request #10498: [Fix] select nested type of string within type array should be wrappe…

Posted by GitBox <gi...@apache.org>.
yinzhijian commented on code in PR #10498:
URL: https://github.com/apache/doris/pull/10498#discussion_r909547485


##########
be/src/vec/sink/mysql_result_writer.cpp:
##########
@@ -136,7 +136,13 @@ Status VMysqlResultWriter::_add_one_column(const ColumnPtr& column_ptr,
                 if (data->is_null_at(j)) {
                     buf_ret = _buffer.push_string("NULL", strlen("NULL"));
                 } else {
-                    buf_ret = _add_one_cell(data, j, nested_type_ptr, _buffer);
+                    if (WhichDataType(remove_nullable(nested_type_ptr)).is_string()) {
+                        buf_ret = _buffer.push_string("'", 1);
+                        buf_ret = _add_one_cell(data, j, nested_type_ptr, _buffer);

Review Comment:
   What is the result if the nested data is null?



-- 
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] eldenmoon commented on a diff in pull request #10498: [Fix] select nested type of string within type array should be wrappe…

Posted by GitBox <gi...@apache.org>.
eldenmoon commented on code in PR #10498:
URL: https://github.com/apache/doris/pull/10498#discussion_r909582692


##########
be/src/vec/sink/mysql_result_writer.cpp:
##########
@@ -136,7 +136,13 @@ Status VMysqlResultWriter::_add_one_column(const ColumnPtr& column_ptr,
                 if (data->is_null_at(j)) {
                     buf_ret = _buffer.push_string("NULL", strlen("NULL"));
                 } else {
-                    buf_ret = _add_one_cell(data, j, nested_type_ptr, _buffer);
+                    if (WhichDataType(remove_nullable(nested_type_ptr)).is_string()) {
+                        buf_ret = _buffer.push_string("'", 1);
+                        buf_ret = _add_one_cell(data, j, nested_type_ptr, _buffer);

Review Comment:
   ```
   mysql> set enable_vectorized_engine = true;
   mysql> select k3 from test_array_string order by k2 limit 1;
   +----------------------------------------------+
   | k3                                           |
   +----------------------------------------------+
   | ['cdsdasd', 'xxxx', '3', '4', '5', NULL] |
   +----------------------------------------------+
   ```
   here is an example of nested data is null



-- 
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 #10498: [Fix] select nested type of string within type array should be wrappe…

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #10498:
URL: https://github.com/apache/doris/pull/10498#issuecomment-1170688483

   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