Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
[SCALA & JAVA] Fix ExpressionEvaluator api change null pointer issue
Browse files Browse the repository at this point in the history
Signed-off-by: Chendi Xue <chendi.xue@intel.com>
  • Loading branch information
xuechendi committed Jan 4, 2021
1 parent 93f8525 commit 9c51360
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ public void close() {
}

byte[] getSchemaBytesBuf(Schema schema) throws IOException {
if (schema == null) return null;
ByteArrayOutputStream out = new ByteArrayOutputStream();
MessageSerializer.serialize(new WriteChannel(Channels.newChannel(out)), schema);
return out.toByteArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ class ColumnarBroadcastExchangeExec(mode: BroadcastMode, child: SparkPlan)
throw e
} finally {
val timeout: Int = SQLConf.get.broadcastTimeout.toInt
relation.asInstanceOf[ColumnarHashedRelation].countDownClose(timeout)
if (relation != null)
relation.asInstanceOf[ColumnarHashedRelation].countDownClose(timeout)
}
}
}
Expand Down

0 comments on commit 9c51360

Please sign in to comment.