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/09/16 12:59:24 UTC

[GitHub] [doris] luozenglin opened a new pull request, #12684: [fix](load) fix stream load fail when setting strict mode

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

   # Proposed changes
   
   Issue Number: close #12683
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [x] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [x] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [x] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [x] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [x] 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] yiguolei merged pull request #12684: [fix](load) fix stream load fail when setting strict mode

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


-- 
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] luozenglin commented on a diff in pull request #12684: [fix](load) fix stream load fail when setting strict mode

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


##########
be/src/exec/base_scanner.cpp:
##########
@@ -178,6 +178,11 @@ Status BaseScanner::init_expr_ctxes() {
                 if (_src_slot_it == std::end(src_slot_desc_map)) {
                     return Status::InternalError("No src slot {} in src slot descs", it1->second);
                 }
+                auto src_slot_index = std::find(_src_slot_descs.cbegin(), _src_slot_descs.cend(),

Review Comment:
   done. thanks



-- 
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 #12684: [fix](load) fix stream load fail when setting strict mode

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

   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] luozenglin commented on a diff in pull request #12684: [fix](load) fix stream load fail when setting strict mode

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


##########
be/src/exec/base_scanner.cpp:
##########
@@ -332,7 +337,8 @@ Status BaseScanner::_materialize_dest_block(vectorized::Block* dest_block) {
             for (int i = 0; i < rows; ++i) {
                 if (filter_map[i] && nullable_column->is_null_at(i)) {
                     if (_strict_mode && (_src_slot_descs_order_by_dest[dest_index]) &&
-                        !_src_block.get_by_position(dest_index).column->is_null_at(i)) {
+                        !_src_block.get_by_position(_dest_slot_to_src_slot_index[dest_index])

Review Comment:
   If `_src_slot_descs_order_by_dest[dest_index]` is not nullptr, then the dest column has a src column, and `dest_index` exists in `_dest_slot_to_src_slot_index`.



-- 
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 #12684: [fix](load) fix stream load fail when setting strict mode

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

   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] BiteTheDDDDt commented on a diff in pull request #12684: [fix](load) fix stream load fail when setting strict mode

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


##########
be/src/exec/base_scanner.cpp:
##########
@@ -178,6 +178,11 @@ Status BaseScanner::init_expr_ctxes() {
                 if (_src_slot_it == std::end(src_slot_desc_map)) {
                     return Status::InternalError("No src slot {} in src slot descs", it1->second);
                 }
+                auto src_slot_index = std::find(_src_slot_descs.cbegin(), _src_slot_descs.cend(),

Review Comment:
   Maybe we can maintain a map represent <slot_id -> slot_index>, to prevent find desc in vector everytime.



-- 
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] BiteTheDDDDt commented on a diff in pull request #12684: [fix](load) fix stream load fail when setting strict mode

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


##########
be/src/exec/base_scanner.cpp:
##########
@@ -332,7 +337,8 @@ Status BaseScanner::_materialize_dest_block(vectorized::Block* dest_block) {
             for (int i = 0; i < rows; ++i) {
                 if (filter_map[i] && nullable_column->is_null_at(i)) {
                     if (_strict_mode && (_src_slot_descs_order_by_dest[dest_index]) &&
-                        !_src_block.get_by_position(dest_index).column->is_null_at(i)) {
+                        !_src_block.get_by_position(_dest_slot_to_src_slot_index[dest_index])

Review Comment:
   Better use `_dest_slot_to_src_slot_index.find` to instead `operator[]`, and add a check for not found situation 



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