What else do you expect to get? A non-zero hash value?

It can technically be any constant.


On Thu, Sep 15, 2016 at 6:15 PM, WangJianfei <
wangjianfe...@otcaix.iscas.ac.cn> wrote:

> this func is in Partitioner
>   def getPartition(key: Any): Int = key match {
>     case null => 0
> //    case None => 0
>     case _ => Utils.nonNegativeMod(key.hashCode, numPartitions)
>   }
>
>
>
> --
> View this message in context: http://apache-spark-
> developers-list.1001551.n3.nabble.com/Why-we-get-0-when-
> the-key-is-null-tp18952.html
> Sent from the Apache Spark Developers List mailing list archive at
> Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe e-mail: dev-unsubscr...@spark.apache.org
>
>

Reply via email to