deniskuzZ commented on code in PR #3637:
URL: https://github.com/apache/hive/pull/3637#discussion_r1000569473


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SemiJoinReductionMerge.java:
##########
@@ -451,8 +452,22 @@ private static AggregationDesc 
bloomFilterAggregation(GenericUDAFEvaluator.Mode
     
bloomFilterEval.setMinEntries(conf.getLongVar(HiveConf.ConfVars.TEZ_MIN_BLOOM_FILTER_ENTRIES));
     
bloomFilterEval.setFactor(conf.getFloatVar(HiveConf.ConfVars.TEZ_BLOOM_FILTER_FACTOR));
     bloomFilterEval.setHintEntries(numEntriesHint);
-    List<ExprNodeDesc> p = Collections.singletonList(col);
-    AggregationDesc bloom = new AggregationDesc("bloom_filter", 
bloomFilterEval, p, false, mode);
+
+    List<ExprNodeDesc> params;
+
+    // numThreads is available only for VectorUDAFBloomFilterMerge, which only 
supports
+    // these two modes, don't add numThreads otherwise
+    if (GenericUDAFEvaluator.Mode.PARTIAL2.equals(mode)
+        || GenericUDAFEvaluator.Mode.FINAL.equals(mode)) {
+      int numThreads = 
conf.getInt(HiveConf.ConfVars.TEZ_BLOOM_FILTER_MERGE_THREADS.varname,

Review Comment:
   use shorter helper method, see above



##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SemiJoinReductionMerge.java:
##########
@@ -451,8 +452,22 @@ private static AggregationDesc 
bloomFilterAggregation(GenericUDAFEvaluator.Mode
     
bloomFilterEval.setMinEntries(conf.getLongVar(HiveConf.ConfVars.TEZ_MIN_BLOOM_FILTER_ENTRIES));
     
bloomFilterEval.setFactor(conf.getFloatVar(HiveConf.ConfVars.TEZ_BLOOM_FILTER_FACTOR));
     bloomFilterEval.setHintEntries(numEntriesHint);
-    List<ExprNodeDesc> p = Collections.singletonList(col);
-    AggregationDesc bloom = new AggregationDesc("bloom_filter", 
bloomFilterEval, p, false, mode);
+
+    List<ExprNodeDesc> params;
+
+    // numThreads is available only for VectorUDAFBloomFilterMerge, which only 
supports
+    // these two modes, don't add numThreads otherwise
+    if (GenericUDAFEvaluator.Mode.PARTIAL2.equals(mode)
+        || GenericUDAFEvaluator.Mode.FINAL.equals(mode)) {
+      int numThreads = 
conf.getInt(HiveConf.ConfVars.TEZ_BLOOM_FILTER_MERGE_THREADS.varname,
+          HiveConf.ConfVars.TEZ_BLOOM_FILTER_MERGE_THREADS.defaultIntVal);
+      PrimitiveTypeInfo intTypeInfo = 
TypeInfoFactory.getPrimitiveTypeInfo("int");

Review Comment:
   same as above



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to