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-26572: Support constant expressions in vectorization #3637

Conversation

asolimando
Copy link
Member

@asolimando asolimando commented Oct 1, 2022

What changes were proposed in this pull request?

Vectorization support for multi-parameter UDAF if the extra parameters, other then the aggregation column, are all constants.

Why are the changes needed?

Remove ad-hoc handling of such case and enables more vectorization opportunities.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

mvn test -Dtest='TestVectorGroupByOperator' -pl ql where two new unit tests have been added (testInstantiateExpressionMonoParameterExpression, testInstantiateExpressionMonoParameterWhenAlternatives and testInstantiateExpressionMultiParameterExpression)

Qtests affected by the change (the constant parameter numThreads for VectorUDAFBloomFilterMerge is now available in the EXPLAIN plan since it's backed into the aggregation itself instead of being added a posteriori):

mvn test -o -Dtest=TestMiniLlapLocalCliDriver -Dqfile="mergejoin.q,sharedwork_semi.q,dynamic_semijoin_reduction.q,dynamic_semijoin_reduction_3.q,dynamic_semijoin_reduction_multicol.q,reopt_semijoin.q,constant_prop_join_rs.q,dynamic_semijoin_reduction.q,vectorized_dynamic_semijoin_reduction.q,vectorized_dynamic_semijoin_reduction2.q,mapjoin_hint.q, dynamic_semijoin_reduction_2.q, dynamic_semijoin_reduction_4.q, dynamic_semijoin_reduction_sw.q, dynamic_semijoin_reduction_sw2.q, semijoin_hint.q, semijoin_removal_udf.q, annotate_stats_groupby.q, dynamic_semijoin_user_level.q" -Dtest.output.overwrite -pl itests/qtest -Pitests
mvn test -o -Dtest=TestTezTPCDS30TBPerfCliDriver -Dqfile="query1.q,query10.q,query16.q,query1b.q,query2.q,query24.q,query32.q,query37.q,query39.q,query40.q,query54.q,query59.q,query6.q,query64.q,query65.q,query69.q,query71.q,query72.q,query78.q,query80.q,query81.q,query82.q,query92.q,query94.q,query95.q,query17.q,query25.q,query29.q,query49.q,query50.q,query75.q,query85.q,query93.q" -Dtest.output.overwrite -pl itests/qtest -Pitests

Copy link
Member

@deniskuzZ deniskuzZ left a comment

Choose a reason for hiding this comment

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

LGTM, some minor comments

@sonarcloud
Copy link

sonarcloud bot commented Oct 21, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

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

@pudidic
Copy link
Contributor

pudidic commented Oct 24, 2022

+1 LGTM.

I love VectorAggregationDescBuilder. It's much clearer now.

@asolimando asolimando requested review from deniskuzZ and removed request for abstractdog October 25, 2022 10:31
Copy link
Member

@deniskuzZ deniskuzZ left a comment

Choose a reason for hiding this comment

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

LGTM

@deniskuzZ deniskuzZ merged commit f7517bc into apache:master Oct 25, 2022
@deniskuzZ deniskuzZ changed the title Master hive 26572 constant support vectorization HIVE-26572: Support constant expressions in vectorization Oct 25, 2022
@asolimando asolimando deleted the master-HIVE-26572-constant_support_vectorization branch October 25, 2022 13:58
DongWei-4 pushed a commit to DongWei-4/hive that referenced this pull request Oct 28, 2022
… Solimando, reviewed by Denys Kuzmenko, Teddy Choi)

Closes apache#3637
dengzhhu653 pushed a commit to dengzhhu653/hive that referenced this pull request Dec 15, 2022
… Solimando, reviewed by Denys Kuzmenko, Teddy Choi)

Closes apache#3637
yeahyung pushed a commit to yeahyung/hive that referenced this pull request Jul 20, 2023
… Solimando, reviewed by Denys Kuzmenko, Teddy Choi)

Closes apache#3637
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants