Skip to content

Commit 8ee93ea

Browse files
authored
typo fix
1 parent cda806f commit 8ee93ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/scala/org/apache/spark/sql/redis/RedisSourceRelation.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ class RedisSourceRelation(override val sqlContext: SQLContext,
137137
}
138138
}
139139
// If dataframe contains only key column
140-
if (fields.size() < 2) {
140+
val colCount = data.columns.length
141+
if (colCount < 2) {
141142
logInfo(s"Dataframe only contains key.column specified in options. No data was writen to redis.")
142143
}
143144
}

0 commit comments

Comments
 (0)