Hi!

If you are programming in Scala, you can always use "Option[String]" for an
optional String field.

Stephan


On Mon, Mar 16, 2015 at 4:57 PM, pietro <pietro.pin...@gmail.com> wrote:

> I have to implement a program based on Flink that process some records.
>
> The peculiarity of those records is that it is not possible to know at
> compile time how many fields they contain. Therefore, I cannot use a simple
> TupleN data type.
>
> The solution I came up with, is to use a tuple with this structure:
>
> /(mandatory_field2, ..., mandatory_fieldM, Array[Int], Array[Double],
> Array[String] )/
>
> where the three arrays store the optional fields.
>
> It worked, but is it a good way to do that?
> Can I do it better?
>
> Many thanks,
> regards.
>
>
>
>
> --
> View this message in context:
> http://apache-flink-incubator-user-mailing-list-archive.2336050.n4.nabble.com/Most-convenient-data-structure-for-unspecified-length-objects-tp859.html
> Sent from the Apache Flink (Incubator) User Mailing List archive. mailing
> list archive at Nabble.com.
>

Reply via email to