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

   
   BE requires that the repeat node's output slot should be inconsistent with 
its input expressions. 
   That is output slots =  input expressions  +  GroupingID  + other grouping 
functions.
   But physical translator not ensure this requirement.  Then sometimes the 
repeat may have bad cast exception.
   
   for sql:
   ```
   SELECT 100000
   FROM db2.table_9_50_undef_partitions2_keys3_properties4_distributed_by5
   GROUP BY GROUPING SETS (
           (col_datetime_6__undef_signed, col_varchar_50__undef_signed)
           , ()
           , (col_varchar_50__undef_signed)
           , (col_datetime_6__undef_signed, col_varchar_50__undef_signed)
   );
   ```
   
   it will have exceptions:
   ```
   (1105, 'errCode = 2, detailMessage = (172.20.57.146)[E-7412]assert cast 
err:[E-7412] Bad cast from 
type:doris::vectorized::ColumnVector<(doris::PrimitiveType)26> to 
doris::vectorized::ColumnStr<unsigned int>\n\n\t0#  
doris::Exception::Exception(int, std::basic_string_view<char, 
std::char_traits<char> > const&, bool) at 
/home/zcp/repo_center/doris_master/doris/be/src/common/exception.cpp:0\n\t1#  
doris::Exception::Exception(doris::Status const&) at 
/home/zcp/repo_center/doris_master/doris/be/src/common/exception.h:39\n\t2#  
doris::vectorized::ColumnStr<unsigned int> const& 
assert_cast<doris::vectorized::ColumnStr<unsigned int> const&, 
(TypeCheckOnRelease)1, doris::vectorized::IColumn 
const&>(doris::vectorized::IColumn 
const&)::{lambda(auto:1&&)#1}::operator()<doris::vectorized::IColumn 
const&>(doris::vectorized::IColumn const&) const at 
/home/zcp/repo_center/doris_master/doris/be/src/vec/common/assert_cast.h:0\n\t3#
  doris::vectorized::ColumnStr<unsigned int> const& assert_cast<dor
 is::vectorized::ColumnStr<unsigned int> const&, (TypeCheckOnRelease)1, 
doris::vectorized::IColumn const&>(doris::vectorized::IColumn const&) at 
/home/zcp/repo_center/doris_master/doris/be/src/vec/common/assert_cast.h:72\n\t4#
  doris::vectorized::ColumnStr<unsigned 
int>::insert_range_from(doris::vectorized::IColumn const&, unsigned long, 
unsigned long) at 
/home/zcp/repo_center/doris_master/doris/be/src/vec/columns/column_string.cpp:0\n\t5#
  
doris::pipeline::RepeatLocalState::get_repeated_block(doris::vectorized::Block*,
 int, doris::vectorized::Block*) at 
/home/zcp/repo_center/doris_master/doris/be/src/pipeline/exec/repeat_operator.cpp:148\n\t6#
  doris::pipeline::RepeatOperatorX::pull(doris::RuntimeState*, 
doris::vectorized::Block*, bool*) const at 
/home/zcp/repo_center/doris_master/doris/be/src/common/status.h:525\n\t7# 
   ...
   ```
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to