flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timur Fayruzov <timur.fairu...@gmail.com>
Subject Re: Why Scala Option is not a valid key?
Date Tue, 29 Mar 2016 17:37:10 GMT
There is some more detail to this question that I missed initially. It
turns out that my key is a case class of a form MyKey(k1: Option[String],
k2: Option[String]). Keys.SelectorFunctionKeys is performing a recursive
check whether every element of the MyKey class can be a key and fails when
encountering an Option.

Is it possible to work around this situation without giving up Options?
Inability to use Options in Domain objects could be really frustrating.

Thanks,
Timur

On Tue, Mar 29, 2016 at 10:19 AM, Timur Fayruzov <timur.fairuzov@gmail.com>
wrote:

> Hello,
>
> I'm evaluating Flink and one thing I noticed is Option[A] can't be used as
> a key for coGroup (looking specifically here:
> https://github.com/apache/flink/blob/master/flink-scala/src/main/scala/org/apache/flink/api/scala/typeutils/OptionTypeInfo.scala#L39).
> I'm not clear about the reason of this and appreciate if someone can
> explain.
>
> Thanks,
> Timur
>

Mime
View raw message