Skip to content

Conversation

@yujun777
Copy link
Contributor

cherry pick from #60045

… input expression (apache#60045)

maybe relate PR: apache#21168

BE requires that the repeat node's output slot order 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)
);

the above sql will have wrong ouput slot order

then BE 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>
0#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#
...
@yujun777 yujun777 requested a review from yiguolei as a code owner January 23, 2026 11:02
@yujun777
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@yujun777 yujun777 marked this pull request as draft January 23, 2026 11:16
@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 100.00% (21/21) 🎉
Increment coverage report
Complete coverage report

@yujun777 yujun777 marked this pull request as ready for review January 26, 2026 08:02
@yujun777
Copy link
Contributor Author

run buildall

@yujun777 yujun777 marked this pull request as draft January 26, 2026 08:40
@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 95.24% (20/21) 🎉
Increment coverage report
Complete coverage report

@yujun777 yujun777 marked this pull request as ready for review January 27, 2026 02:54
@yujun777 yujun777 marked this pull request as draft January 28, 2026 02:17
@yujun777
Copy link
Contributor Author

4.0 没有relate PR #59116, 先不合了

@yujun777 yujun777 closed this Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants