Skip to content

HIVE-28618: TestGenericUDTFGetSQLSchema to run on Tez #5777

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

okumin
Copy link
Contributor

@okumin okumin commented Apr 20, 2025

What changes were proposed in this pull request?

Let TestGenericUDTFGetSQLSchema.testWithDDL on Tez.
https://issues.apache.org/jira/browse/HIVE-28618

On Tez, we see the NPE when we run StatsRulesProcFactory, which is triggered by TezCompiler. SHOW TABLES is a DDL that doesn't scan a regular table. So, some attributes are missing.

On MapReduce, StatsRulesProcFactory is not enabled unless isExplainSkipExecution is enabled. As far as I tested it, it is skipped when we pass SHOW TABLES to the UDF. I've not detailed the intention as MR is already deprecated.

This change will let the UDF choose a correct SemanticAnalyzer based on the statement. I think this change is safe as long as I see the usage of ParseUtils. parseQueryAndGetSchema.

Why are the changes needed?

To discontinue Hive on MR.

Does this PR introduce any user-facing change?

The behavior of GenericUDTFGetSQLSchema will be consistent with MapReduce.

How was this patch tested?

Updated the unit test

Copy link

@okumin okumin changed the title [WIP] HIVE-28618: TestGenericUDTFGetSQLSchema to run on Tez HIVE-28618: TestGenericUDTFGetSQLSchema to run on Tez Apr 21, 2025
@okumin okumin marked this pull request as ready for review April 21, 2025 05:29
@@ -87,9 +87,6 @@ public void testWithSimpleTypes() throws Exception {

@Test
public void testWithDDL() throws Exception {
// Set the execution engine to mr to avoid the NPE exception in stats flow
// TODO: HIVE-28618: TestGenericUDTFGetSQLSchema to run on Tez
conf.set("hive.execution.engine", "mr");
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I know, MR is still supported. Can you add a new test instead of modifying an existing one? Now we don't know if it works with MR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a part of the decommission of Hive on MapReduce. In my understanding, we've been migrating exceptional test cases that were excluded here only to Tez, which means testWithSimpleTypes in this file is already not tested with MR. It is also not an unfair proposal to keep MR test cases as long as MR is not removed! In my personal opinion, we don't have CI power to test every feature on the deprecated MapReduce.

@abstractdog Do you have a suggestion about the work under the umbrella?

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

Successfully merging this pull request may close these issues.

3 participants