Skip to content

Conversation

@HangyuanLiu
Copy link
Contributor

Proposed changes

FIX: #4263

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • [] Bugfix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [] Documentation Update (if none of the other choices apply)
  • [] Code refactor (Modify the code structure, format the code, etc...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [] I have create an issue on #ISSUE, and have described the bug/feature there in detail
  • [] Compiling and unit tests pass locally with my changes
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] If this change need a document change, I have updated the document
  • [] Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@HangyuanLiu HangyuanLiu added branch-0.13 PR which need to merge to branch 0.13 kind/fix Categorizes issue or PR as related to a bug. area/planner Issues or PRs related to the query planner labels Aug 8, 2020
Copy link
Member

@yangzhg yangzhg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yangzhg yangzhg added the approved Indicates a PR has been approved by one committer. label Aug 11, 2020
@yangzhg yangzhg merged commit 493c88c into apache:master Aug 11, 2020
EmmyMiao87 pushed a commit to EmmyMiao87/incubator-doris that referenced this pull request Aug 11, 2020
**Describe the bug**
Predicate push down where sub query has distinct may throw NPE

**To Reproduce**
Steps to reproduce the behavior:
1.  create table like 
```
+--------------+--------------+------+-------+---------+---------+
| Field        | Type         | Null | Key   | Default | Extra   |
+--------------+--------------+------+-------+---------+---------+
| event_day    | DATETIME     | No   | true  | NULL    |         |
| title        | VARCHAR(600) | No   | true  | NULL    |         |
| report_value | VARCHAR(50)  | No   | false | NULL    | REPLACE |
+--------------+--------------+------+-------+---------+---------+
```
2. exec query 
```

```SELECT
    *
FROM
    (
        SELECT
            DISTINCT event_day,
            title
        FROM
            click_show_window
    ) a
WHERE
    a.title IS NOT NULL
```
4. See error

```
ERROR 1064 (HY000): errCode = 2, detailMessage = Unexpected exception: null
```

This is because DISTINCT generate grouping exprs in agginfo, but this clause does not have a group by clause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/planner Issues or PRs related to the query planner branch-0.13 PR which need to merge to branch 0.13 kind/fix Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StmtExecutor.analyze():492] Analyze failed because java.lang.NullPointerException: null

2 participants