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

Commit

Permalink
Merge pull request #151 from Codelone/liyanl-dev
Browse files Browse the repository at this point in the history
add null rank check
  • Loading branch information
Nicole00 authored Sep 22, 2021
2 parents 9f414be + c0fed61 commit b886279
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ class EdgeProcessor(data: DataFrame,

val ranking: Long = if (edgeConfig.rankingField.isDefined) {
val rankIndex = row.schema.fieldIndex(edgeConfig.rankingField.get)
assert(rankIndex >= 0 && !row.isNullAt(rankIndex),
s"rank must exist and cannot be null, your row data is $row")
row.get(rankIndex).toString.toLong
} else {
0
Expand Down

0 comments on commit b886279

Please sign in to comment.