marin-ma commented on code in PR #12471:
URL: https://github.com/apache/gluten/pull/12471#discussion_r3802503157


##########
backends-velox/src/main/scala/org/apache/gluten/execution/VeloxBroadcastBuildSideRDD.scala:
##########
@@ -38,7 +39,14 @@ case class VeloxBroadcastBuildSideRDD(
       case unsafe: UnsafeColumnarBuildSideRelation =>
         unsafe.isOffload
     }
-    val output = if (isBNL || !offload) {
+    // With cuDF enabled the hash join runs as CudfHashJoin, which builds its 
own GPU
+    // hash table from the build-side value stream and cannot consume the 
prebuilt CPU
+    // OpaqueHashTable. Feeding Iterator.empty here silently produces empty 
join
+    // results, so stream the broadcast batches instead (the same path shuffle 
joins
+    // use on GPU). Skipping the CPU cache build also keeps hybrid mode 
correct:
+    // VeloxBroadcastBuildSideCache.get finds no table, so the HashJoinNode 
carries no
+    // reusable table and a CPU-fallback join builds from this stream as usual.
+    val output = if (isBNL || !offload || GlutenConfig.get.enableColumnarCudf) 
{

Review Comment:
   Can you extract this change along with the unit test to another PR?



-- 
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