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/10/13 07:37:12 UTC

[GitHub] [doris] Gabriel39 opened a new pull request, #13346: [Bug](function) Fix constant predicate evaluation

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

   # Proposed changes
   
   ![image](https://user-images.githubusercontent.com/37700562/195532208-fa4c3ea1-8de6-46ed-9b87-eb391ae35e49.png)
   
   ## Problem summary
   
   Describe your 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 (If Yes, please explain WHY)
       - [ ] 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] HappenLee commented on a diff in pull request #13346: [Bug](function) Fix constant predicate evaluation

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


##########
be/src/vec/exprs/vexpr.cpp:
##########
@@ -319,6 +319,7 @@ ColumnPtrWrapper* VExpr::get_const_col(VExprContext* context) {
 
     int result = -1;
     Block block;
+    block.insert({ColumnUInt8::create(1), std::make_shared<DataTypeUInt8>(), ""});

Review Comment:
   maybe we should add comment here to let other know the behavior.



-- 
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 a diff in pull request #13346: [Bug](function) Fix constant predicate evaluation

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


##########
regression-test/suites/correctness_p0/test_pushdown_constant.groovy:
##########
@@ -0,0 +1,41 @@
+// 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.
+
+suite("test_pushdown_constant") {
+ sql """ DROP TABLE IF EXISTS T """
+ sql """
+     CREATE TABLE `T` (
+         `id` int
+     ) ENGINE=OLAP
+     AGGREGATE KEY(`id`)
+     COMMENT "OLAP"
+     DISTRIBUTED BY HASH(`id`) BUCKETS 1
+     PROPERTIES (
+         "replication_allocation" = "tag.location.default: 1",
+         "in_memory" = "false",
+         "storage_format" = "V2"
+     );
+ """
+ sql """
+     insert into T values(1);

Review Comment:
   please do not use T as table name.  Cases are run in parallel, conflict names would case error.



-- 
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] freemandealer commented on pull request #13346: [Bug](function) Fix constant predicate evaluation

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

   Add the text version of core stack to make search engine happy:
   
   #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
   #1  0x00007f944f384864 in __GI_abort () at abort.c:79
   #2  0x000000001451e83a in ?? ()
   #3  0x0000000014514a43 in google::LogMessage::SendToLog() ()
   #4  0x0000000014514f4a in google::LogMessage::Flush() ()
   #5  0x00000000145187df in google::LogMessageFatal::~LogMessageFatal() ()
   #6  0x000000001395b5e6 in doris::vectorized::VScanNode::_eval_const_conjuncts (this=0x61d001beea80, vexpr=0x619000eebb80, expr_ctx=0x606000a464e0,
       pdt=0x7f93c4daa8c0) at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/vec/exec/scan/vscan_node.cpp:545
   #7  0x000000001395a13b in doris::vectorized::VScanNode::_normalize_predicate (this=0x61d001beea80, conjunct_expr_root=0x619000eebb80)
       at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/vec/exec/scan/vscan_node.cpp:407
   #8  0x0000000013958c7e in doris::vectorized::VScanNode::_normalize_conjuncts (this=0x61d001beea80)
       at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/vec/exec/scan/vscan_node.cpp:348
   #9  0x000000001397ca34 in doris::vectorized::VScanNode::_process_conjuncts (this=0x61d001beea80)
       at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/vec/exec/scan/vscan_node.h:102
   #10 0x00000000139ec6a4 in doris::vectorized::NewOlapScanNode::_process_conjuncts (this=0x61d001beea80)
       at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/vec/exec/scan/new_olap_scan_node.cpp:136
   #11 0x000000001394c63b in doris::vectorized::VScanNode::open (this=0x61d001beea80, state=0x61c001160880)
       at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/vec/exec/scan/vscan_node.cpp:95
   #12 0x000000000a91eb96 in doris::PlanFragmentExecutor::open_vectorized_internal (this=0x617000f97970)
       at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/runtime/plan_fragment_executor.cpp:280
   #13 0x000000000a91c37a in doris::PlanFragmentExecutor::open (this=0x617000f97970)
       at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/runtime/plan_fragment_executor.cpp:252
   #14 0x000000000a8af669 in doris::FragmentExecState::execute (this=0x617000f97900)
       at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/runtime/fragment_mgr.cpp:253
   #15 0x000000000a8b4236 in doris::FragmentMgr::_exec_actual(std::shared_ptr<doris::FragmentExecState>, std::function<void (doris::PlanFragmentExecutor*)>) (
       this=0x627000000100, exec_state=..., cb=...) at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/runtime/fragment_mgr.cpp:499
   #16 0x000000000a8c51c2 in doris::FragmentMgr::exec_plan_fragment(doris::TExecPlanFragmentParams const&, std::function<void (doris::PlanFragmentExecutor*)>)::$_3::operator()() const (this=0x60800089c2a0) at /mnt/hdd01/repo_center/doris_branch-1.2-lts/doris/be/src/runtime/fragment_mgr.cpp:703
   #17 0x000000000a8c502d in std::__invoke_impl<void, doris::FragmentMgr::exec_plan_fragment(doris::TExecPlanFragmentParams const&, std::function<void (doris::PlanFragmentExecutor*)>)::$_3&>(std::__invoke_other, doris::FragmentMgr::exec_plan_fragment(doris::TExecPlanFragmentParams const&, std::function<void (doris::PlanFragmentExecutor*)>)::$_3&) (__f=...) at /var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:61
   #18 0x000000000a8c4fbd in std::__invoke_r<void, doris::FragmentMgr::exec_plan_fragment(doris::TExecPlanFragmentParams const&, std::function<void (doris::PlanFragmentExecutor*)>)::$_3&>(doris::FragmentMgr::exec_plan_fragment(doris::TExecPlanFragmentParams const&, std::function<void (doris::PlanFragmentExecutor*)>)::$_3&) (__fn=...) at /var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/invoke.h:111
   #19 0x000000000a8c4d6d in std::_Function_handler<void (), doris::FragmentMgr::exec_plan_fragment(doris::TExecPlanFragmentParams const&, std::function<void (doris::PlanFragmentExecutor*)>)::$_3>::_M_invoke(std::_Any_data const&) (__functor=...)


-- 
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] Gabriel39 merged pull request #13346: [Bug](function) Fix constant predicate evaluation

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


-- 
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 #13346: [Bug](function) Fix constant predicate evaluation

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

   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] github-actions[bot] commented on pull request #13346: [Bug](function) Fix constant predicate evaluation

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

   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