Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Nov 6, 2025

Cherry-picked from #56942

@github-actions github-actions bot requested a review from yiguolei as a code owner November 6, 2025 01:29
@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?

@dataroaring dataroaring closed this Nov 6, 2025
@dataroaring dataroaring reopened this Nov 6, 2025
@hello-stephen
Copy link
Contributor

run buildall

…niform when group sets exist (#56942)

Fix not in aggregate's output err after eliminate by uniform when group
sets exist

if query as following, would cause `ERROR 1105 (HY000): errCode = 2,
detailMessage = GROUPING_PREFIX_event_name_group not in aggregate's
output`

the pr fix this

```sql
SELECT
  CASE WHEN GROUPING(event_date) = 1 THEN '(TOTAL)' ELSE CAST(event_date AS VARCHAR) END AS event_date,
  user_id,
  MAX(conversion_level) AS conversion_level,
  CASE WHEN GROUPING(event_name_group) = 1 THEN '(TOTAL)' ELSE event_name_group END AS event_name_group
FROM
  (
    SELECT
      src.event_date,
      src.user_id,
      WINDOW_FUNNEL(
        3600 * 24 * 1,
        'default',
        src.event_time,
        src.event_name = 'shop_buy',
        src.event_name = 'shop_buy'
      ) AS conversion_level,
      src.event_name_group
    FROM
      (
        SELECT
          CAST(etb.`@dt` AS DATE) AS event_date,
          etb.`@event_name` AS event_name,
          etb.`@event_time` AS event_time,
          etb.`@event_name` AS event_name_group,
          etb.`@user_id` AS user_id
        FROM
          `test_event` AS etb
        WHERE
          etb.`@dt` between '2025-09-03 02:00:00' AND '2025-09-10 01:59:59'
          AND etb.`@event_name` = 'shop_buy'
          AND etb.`@user_id` IS NOT NULL
          AND etb.`@user_id` > '0'
      ) AS src
    GROUP BY
      src.event_date,
      src.user_id,
      src.event_name_group
  ) AS fwt
GROUP BY
  GROUPING SETS (
    (user_id),
    (user_id, event_date),
    (user_id, event_name_group),
    (user_id, event_date, event_name_group)
  );
```

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #43391 

Problem Summary:

### 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:
apache/doris-website#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 -->
@yiguolei yiguolei force-pushed the auto-pick-56942-branch-4.0 branch from 116cddb to d571b62 Compare November 8, 2025 12:42
@yiguolei
Copy link
Contributor

yiguolei commented Nov 8, 2025

run buildall

@seawinde
Copy link
Contributor

seawinde commented Nov 10, 2025

this compile fail, picked by another pr #57869

@yiguolei yiguolei closed this Nov 11, 2025
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.

5 participants