diff --git a/nebula-spark-connector/src/main/scala/com/vesoft/nebula/connector/NebulaConfig.scala b/nebula-spark-connector/src/main/scala/com/vesoft/nebula/connector/NebulaConfig.scala index 73426238..ecf6d58b 100644 --- a/nebula-spark-connector/src/main/scala/com/vesoft/nebula/connector/NebulaConfig.scala +++ b/nebula-spark-connector/src/main/scala/com/vesoft/nebula/connector/NebulaConfig.scala @@ -254,7 +254,7 @@ class WriteNebulaEdgeConfig(space: String, def getSrcPolicy = if (srcPolicy == null) "" else srcPolicy def getDstField = dstField def getDstPolicy = if (dstPolicy == null) "" else dstPolicy - def getRankField = rankField + def getRankField = if (rankField == null) "" else rankField def getSrcAsProp = srcAsProp def getDstAsProp = dstAsProp diff --git a/nebula-spark-connector/src/main/scala/com/vesoft/nebula/connector/NebulaDataSource.scala b/nebula-spark-connector/src/main/scala/com/vesoft/nebula/connector/NebulaDataSource.scala index a3430547..105f08ed 100644 --- a/nebula-spark-connector/src/main/scala/com/vesoft/nebula/connector/NebulaDataSource.scala +++ b/nebula-spark-connector/src/main/scala/com/vesoft/nebula/connector/NebulaDataSource.scala @@ -88,7 +88,7 @@ class NebulaDataSource } else { val srcVertexFiled = nebulaOptions.srcVertexField val dstVertexField = nebulaOptions.dstVertexField - val rankExist = nebulaOptions.rankField != null + val rankExist = !nebulaOptions.rankField.isEmpty val edgeFieldsIndex = { var srcIndex: Int = -1 var dstIndex: Int = -1