@@ -28,10 +28,10 @@ import org.codehaus.janino.InternalCompilerException
2828
2929import org .apache .spark .{Partition , SparkException , SparkUpgradeException }
3030import org .apache .spark .executor .CommitDeniedException
31+ import org .apache .spark .memory .SparkOutOfMemoryError
3132import org .apache .spark .sql .catalyst .analysis .UnresolvedGenerator
3233import org .apache .spark .sql .catalyst .catalog .CatalogDatabase
3334import org .apache .spark .sql .catalyst .expressions .{Expression , UnevaluableAggregate }
34- import org .apache .spark .sql .catalyst .plans .JoinType
3535import org .apache .spark .sql .connector .catalog .CatalogV2Implicits ._
3636import org .apache .spark .sql .connector .catalog .Identifier
3737import org .apache .spark .sql .connector .expressions .Transform
@@ -712,16 +712,6 @@ object QueryExecutionErrors {
712712 " Dictionary encoding should not be used because of dictionary overflow." )
713713 }
714714
715- def hashJoinCannotTakeJoinTypeWithBuildLeftError (joinType : JoinType ): Throwable = {
716- new IllegalArgumentException (
717- s " HashJoin should not take $joinType as the JoinType with building left side " )
718- }
719-
720- def hashJoinCannotTakeJoinTypeWithBuildRightError (joinType : JoinType ): Throwable = {
721- new IllegalArgumentException (
722- s " HashJoin should not take $joinType as the JoinType with building right side " )
723- }
724-
725715 def endOfIteratorError (): Throwable = {
726716 new NoSuchElementException (" End of the iterator" )
727717 }
@@ -730,11 +720,15 @@ object QueryExecutionErrors {
730720 new IOException (" Could not allocate memory to grow BytesToBytesMap" )
731721 }
732722
733- def cannotAcquireMemoryToBuildHashRelationError (size : Long , got : Long ): Throwable = {
723+ def cannotAcquireMemoryToBuildLongHashedRelationError (size : Long , got : Long ): Throwable = {
734724 new SparkException (s " Can't acquire $size bytes memory to build hash relation, " +
735725 s " got $got bytes " )
736726 }
737727
728+ def cannotAcquireMemoryToBuildUnsafeHashedRelationError (): Throwable = {
729+ new SparkOutOfMemoryError (" There is not enough memory to build hash map" )
730+ }
731+
738732 def rowLargerThan256MUnsupportedError (): Throwable = {
739733 new UnsupportedOperationException (" Does not support row that is larger than 256M" )
740734 }
0 commit comments