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/05/12 05:47:35 UTC

[GitHub] [incubator-doris] BiteTheDDDDt opened a new pull request, #9520: [Bug][Vectorized] fix vcast expr input wrong row number

BiteTheDDDDt opened a new pull request, #9520:
URL: https://github.com/apache/incubator-doris/pull/9520

   # Proposed changes
   
   Issue Number: close #9519
   
   ## 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] [incubator-doris] github-actions[bot] commented on pull request #9520: [Bug][Vectorized] fix vcast expr input wrong row number

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

   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] [incubator-doris] HappenLee commented on a diff in pull request #9520: [Bug][Vectorized] fix vcast expr input wrong row number

Posted by GitBox <gi...@apache.org>.
HappenLee commented on code in PR #9520:
URL: https://github.com/apache/incubator-doris/pull/9520#discussion_r875426915


##########
be/src/vec/core/block.cpp:
##########
@@ -151,6 +151,13 @@ void Block::insert(ColumnWithTypeAndName&& elem) {
     data.emplace_back(std::move(elem));
 }
 
+void Block::insert_and_resize(ColumnWithTypeAndName&& elem) {
+    index_by_name.emplace(elem.name, data.size());
+    // usualy elem.column always is const column, so we just clone it.
+    elem.column = elem.column->clone_resized(std::max(rows(), size_t(1)));

Review Comment:
   1. `clone_resized` will cause some data loss
   2. `clone_resized` will cause the `memcpy, new, delete`. 
   I don't think it should be a member function



-- 
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] [incubator-doris] morningman commented on pull request #9520: [Bug][Vectorized] fix vcast expr input wrong row number

Posted by GitBox <gi...@apache.org>.
morningman commented on PR #9520:
URL: https://github.com/apache/incubator-doris/pull/9520#issuecomment-1143202665

   Could you add some regression test for this case?


-- 
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] [incubator-doris] github-actions[bot] commented on pull request #9520: [Bug][Vectorized] fix vcast expr input wrong row number

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

   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] [incubator-doris] github-actions[bot] commented on pull request #9520: [Bug][Vectorized] fix vcast expr input wrong row number

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

   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] [incubator-doris] HappenLee commented on a diff in pull request #9520: [Bug][Vectorized] fix vcast expr input wrong row number

Posted by GitBox <gi...@apache.org>.
HappenLee commented on code in PR #9520:
URL: https://github.com/apache/incubator-doris/pull/9520#discussion_r884109581


##########
be/src/vec/exprs/vexpr.h:
##########
@@ -33,10 +33,19 @@ namespace vectorized {
 
 class VExpr {
 public:
+    // resize inserted param column to make sure column size equal to block.rows()
+    // and return param column index
+    static size_t insert_param(Block* block, ColumnWithTypeAndName&& elem) {
+        // usualy elem.column always is const column, so we just clone it.
+        elem.column = elem.column->clone_resized(std::max(block->rows(), size_t(1)));

Review Comment:
   not do `std::max` here



-- 
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] [incubator-doris] morningman merged pull request #9520: [Bug][Vectorized] fix vcast expr input wrong row number

Posted by GitBox <gi...@apache.org>.
morningman merged PR #9520:
URL: https://github.com/apache/incubator-doris/pull/9520


-- 
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