Skip to content

Commit 791eafc

Browse files
microbearzzhanshaoxiong
authored andcommitted
[MINOR] fix potential npe in spark writer (#6363)
Co-authored-by: zhanshaoxiong <shaoxiong0001@@gmail.com>
1 parent 59fe24d commit 791eafc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -809,9 +809,9 @@ object HoodieSparkSqlWriter {
809809
}
810810

811811
private def extractConfigsRelatedToTimestampBasedKeyGenerator(keyGenerator: String,
812-
params: Map[String, String]): Map[String, String] = {
813-
if (keyGenerator.equals(classOf[TimestampBasedKeyGenerator].getCanonicalName) ||
814-
keyGenerator.equals(classOf[TimestampBasedAvroKeyGenerator].getCanonicalName)) {
812+
params: Map[String, String]): Map[String, String] = {
813+
if (classOf[TimestampBasedKeyGenerator].getCanonicalName.equals(keyGenerator) ||
814+
classOf[TimestampBasedAvroKeyGenerator].getCanonicalName.equals(keyGenerator)) {
815815
params.filterKeys(HoodieTableConfig.PERSISTED_CONFIG_LIST.contains)
816816
} else {
817817
Map.empty

0 commit comments

Comments
 (0)