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

HIVE-21100: Allow flattening of table subdirectories resulted when using TEZ engine and UNION clause. #4730

Merged
merged 4 commits into from
Sep 22, 2023

Conversation

ayushtkn
Copy link
Member

What changes were proposed in this pull request?

Allow to flatten subdir in case of UNION

Why are the changes needed?

To avoid Subdir in case of UNION queries for compar

Does this PR introduce any user-facing change?

Yes, if the config is turned on.

Is the change a dependency upgrade?

No

How was this patch tested?

UT


explain insert overwrite table test2 partition (dt='20230817') select ful.* from (select val from test2 where dt='20230816') ful left join (select val from test1 where dt='20230817') inc on ful.val=inc.val union all select test1.val from test1 where dt='20230817';

insert overwrite table test2 partition (dt='20230817') select ful.* from (select val from test2 where dt='20230816') ful left join (select val from test1 where dt='20230817') inc on ful.val=inc.val union all select test1.val from test1 where dt='20230817';
Copy link
Contributor

Choose a reason for hiding this comment

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

this test should be extended to certain scenarios:

  1. acid/mm/non-acid
  2. direct insert on/off
  3. union flattening on/off

create different tables for different scenarios:

union_target_acid_directinsert_flattened
union_target_mm_directinsert_flattened
union_target_nonacid_directinsert_flattened
union_target_acid_nodirectinsert_flattened
union_target_mm_nodirectinsert_flattened
union_target_nonacid_nodirectinsert_flattened

union_target_acid_directinsert_noflattened
union_target_mm_directinsert_noflattened
union_target_nonacid_directinsert_noflattened
union_target_acid_nodirectinsert_noflattened
union_target_mm_nodirectinsert_noflattened
union_target_nonacid_nodirectinsert_noflattened


select * from union_target_acid_unflattened;

-- TESTS FOR DIRECT & NON FLATEENED
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: FLATTENED

Choose a reason for hiding this comment

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

Eagle eye :)

Copy link

@aturoczy aturoczy left a comment

Choose a reason for hiding this comment

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

+1 Seems ok to me. Wait for the test

@sonarcloud
Copy link

sonarcloud bot commented Sep 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

warning The version of Java (11.0.8) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@ayushtkn
Copy link
Member Author

Have fixed the typo. The last failure was some empty_skip_header_footer_aggr that ain't related, have triggered the build again

Copy link
Contributor

@abstractdog abstractdog left a comment

Choose a reason for hiding this comment

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

+1

@ayushtkn ayushtkn merged commit e5a7ce2 into apache:master Sep 22, 2023
7 checks passed
tarak271 pushed a commit to tarak271/hive-1 that referenced this pull request Dec 19, 2023
…ing TEZ engine and UNION clause. (apache#4730). (Ayush Saxena, reviewed by Laszlo Bodor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants