Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected type of column: Nullable(Nothing) #3351

Closed
lilinghai opened this issue Nov 2, 2021 · 0 comments · Fixed by #3371
Closed

Unexpected type of column: Nullable(Nothing) #3351

lilinghai opened this issue Nov 2, 2021 · 0 comments · Fixed by #3371
Assignees
Labels

Comments

@lilinghai
Copy link

create table t(a int);
alter table t set tiflash replica 2;
select count(*) from t group by a having ifnull(null,count(*)) and min(null); -- expect successfully 
-- but got  ERROR 1105 (HY000): other error for mpp stream: DB::Exception: Unexpected type of column: Nullable(Nothing)
/*
explain select count(*) from t group by a having ifnull(null,count(*)) and min(null);
+----------------------------------------+----------+-------------------+---------------+---------------------------------------------------------------------------------+
| id                                     | estRows  | task              | access object | operator info                                                                   |
+----------------------------------------+----------+-------------------+---------------+---------------------------------------------------------------------------------+
| TableReader_44                         | 6400.00  | root              |               | data:ExchangeSender_43                                                          |
| └─ExchangeSender_43                    | 6400.00  | batchCop[tiflash] |               | ExchangeType: PassThrough                                                       |
|   └─Projection_7                       | 6400.00  | batchCop[tiflash] |               | Column#3                                                                        |
|     └─Selection_35                     | 6400.00  | batchCop[tiflash] |               | Column#3, Column#4                                                              |
|       └─Projection_39                  | 8000.00  | batchCop[tiflash] |               | Column#3, Column#4                                                              |
|         └─HashAgg_40                   | 8000.00  | batchCop[tiflash] |               | group by:rs.t.a, funcs:sum(Column#12)->Column#3, funcs:min(Column#13)->Column#4 |
|           └─ExchangeReceiver_42        | 8000.00  | batchCop[tiflash] |               |                                                                                 |
|             └─ExchangeSender_41        | 8000.00  | batchCop[tiflash] |               | ExchangeType: HashPartition, Hash Cols: [name: rs.t.a, collate: binary]         |
|               └─HashAgg_37             | 8000.00  | batchCop[tiflash] |               | group by:rs.t.a, funcs:count(1)->Column#12, funcs:min(NULL)->Column#13          |
|                 └─TableFullScan_25     | 10000.00 | batchCop[tiflash] | table:t       | keep order:false, stats:pseudo                                                  |
+----------------------------------------+----------+-------------------+---------------+---------------------------------------------------------------------------------+
*/

master nightly UTC Build Time: 2021-11-01 11:05:32
tidb 01e4bdd72361f287a25884bcc41301e3aa6c85eb
tiflash 7f5b61e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants