[
https://issues.apache.org/jira/browse/HIVE-27076?focusedWorklogId=845148&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-845148
]
ASF GitHub Bot logged work on HIVE-27076:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 13/Feb/23 14:27
Start Date: 13/Feb/23 14:27
Worklog Time Spent: 10m
Work Description: uncleGen opened a new pull request, #4057:
URL: https://github.com/apache/hive/pull/4057
### What changes were proposed in this pull request?
constant field will be wrongly propagated in grouping sets.
### Why are the changes needed?
reproduce this bug:
```
create table tb1 (key string, value string);
insert into tb1 values("a", "b");
with mid1 as (
select 'test_value' as test_field, * from tb1
)
select key, nvl(test_field, 'default_test_value')
from mid1 group by key, test_field
grouping sets(key, test_field, (key, test_field));
```
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
add ut
Issue Time Tracking
-------------------
Worklog Id: (was: 845148)
Remaining Estimate: 0h
Time Spent: 10m
> Constant field will be wrongly propagated in grouping sets
> ----------------------------------------------------------
>
> Key: HIVE-27076
> URL: https://issues.apache.org/jira/browse/HIVE-27076
> Project: Hive
> Issue Type: Bug
> Components: Query Planning
> Affects Versions: 2.3.8, 3.1.3, 4.0.0-alpha-2
> Reporter: Genmao Yu
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Reproduce issue:
> {code:sql}
> create table tb1 (key string, value string);
> insert into tb1 values("a", "b");
> with mid1 as (
> select 'test_value' as test_field, * from tb1
> )
> select key, nvl(test_field, 'default_test_value')
> from mid1 group by key, test_field
> grouping sets(key, test_field, (key, test_field));
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)