leanken opened a new pull request #29547:
URL: https://github.com/apache/spark/pull/29547


   ### What changes were proposed in this pull request?
   Currently, EmptyHashedRelation and HashedRelationWithAllNullKeys is an 
object, and it will cause JavaDeserialization Exception as following
   
   ```
   20/08/26 11:13:30 WARN [task-result-getter-2] TaskSetManager: Lost task 34.0 
in stage 57.0 (TID 18076, emr-worker-5.cluster-183257, executor 18): 
java.io.InvalidClassException: 
org.apache.spark.sql.execution.joins.EmptyHashedRelation$; no valid constructor
           at 
java.io.ObjectStreamClass$ExceptionInfo.newInvalidClassException(ObjectStreamClass.java:169)
           at 
java.io.ObjectStreamClass.checkDeserialize(ObjectStreamClass.java:874)
           at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2042)
           at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1572)
           at java.io.ObjectInputStream.readObject(ObjectInputStream.java:430)
           at 
org.apache.spark.serializer.JavaDeserializationStream.readObject(JavaSerializer.scala:76)
           at 
org.apache.spark.broadcast.TorrentBroadcast$.$anonfun$unBlockifyObject$4(TorrentBroadcast.scala:328)
   ```
   
   This PR includes
   
   * Using case object instead to fix serialization issue. 
   * Also change EmptyHashedRelation not to extend NullAwareHashedRelation 
since it's already being used in other non-NAAJ joins.
   
   ### Why are the changes needed?
   It will cause BHJ failed when buildSide is Empty and BHJ(NAAJ) failed when 
buildSide with null partition keys.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   * Existing UT.
   * Run entire TPCDS for E2E coverage.


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

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