This is an automated email from the ASF dual-hosted git repository.

rbalamohan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 57d15cb42f2 HIVE-27010: Reduce compilation time (#4005)
57d15cb42f2 is described below

commit 57d15cb42f22c43033085fcff397e24c6b47fb05
Author: rbalamohan <rbalamo...@apache.org>
AuthorDate: Thu Feb 2 08:53:30 2023 +0530

    HIVE-27010: Reduce compilation time (#4005)
---
 .../org/apache/hadoop/hive/ql/exec/ExprNodeGenericFuncEvaluator.java    | 2 +-
 ql/src/java/org/apache/hadoop/hive/ql/exec/MapredContext.java           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeGenericFuncEvaluator.java 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeGenericFuncEvaluator.java
index ab761de3651..cdf3cf35154 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeGenericFuncEvaluator.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeGenericFuncEvaluator.java
@@ -170,7 +170,7 @@ public class ExprNodeGenericFuncEvaluator extends 
ExprNodeEvaluator<ExprNodeGene
     // when "hive.fetch.task.conversion" occurs.
     if (context != null) {
       context.setup(genericUDF);
-    } else {
+    } else if (MapredContext.needConfigure(genericUDF)) {
       // It is a bit unfortunate that currently the UDF configuration 
signature expects a
       // MapredContext (even if execution is tez or another engine) - this 
causes an
       // impedence mismatch. For example: MapredContext has Reporter objects 
that may or
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/MapredContext.java 
b/ql/src/java/org/apache/hadoop/hive/ql/exec/MapredContext.java
index 932964a02b1..262d1106aa4 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/MapredContext.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/MapredContext.java
@@ -153,7 +153,7 @@ public class MapredContext {
     // close is called by UDTFOperator
   }
 
-  private boolean needConfigure(Object func) {
+  static boolean needConfigure(Object func) {
     try {
       Method initMethod = func.getClass().getMethod("configure", 
MapredContext.class);
       return initMethod.getDeclaringClass() != GenericUDF.class &&

Reply via email to