From d944e923f9e3a527b8009b34902c984b6bc966bb Mon Sep 17 00:00:00 2001 From: Cheng Su Date: Wed, 16 Jun 2021 16:51:16 -0700 Subject: [PATCH] Release underlying map for NULL-aware ANTI join --- .../org/apache/spark/sql/execution/joins/HashedRelation.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala index 225cff8afcc34..80f21433b4d1c 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashedRelation.scala @@ -479,6 +479,7 @@ private[joins] object UnsafeHashedRelation { throw QueryExecutionErrors.cannotAcquireMemoryToBuildUnsafeHashedRelationError() } } else if (isNullAware) { + binaryMap.free() return HashedRelationWithAllNullKeys } } @@ -1060,6 +1061,7 @@ private[joins] object LongHashedRelation { val key = rowKey.getLong(0) map.append(key, unsafeRow) } else if (isNullAware) { + map.free() return HashedRelationWithAllNullKeys } }