-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
kind/fixCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
Describe the bug
Predicate push down where sub query has distinct may throw NPE
To Reproduce
Steps to reproduce the behavior:
- 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 |
+--------------+--------------+------+-------+---------+---------+
- exec query
```SELECT
*
FROM
(
SELECT
DISTINCT event_day,
title
FROM
click_show_window
) a
WHERE
a.title IS NOT NULL
- 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
Metadata
Metadata
Assignees
Labels
kind/fixCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.