Most convenient data structure for unspecified length objects
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:
Re: Most convenient data structure for unspecified length objects
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 <[hidden email]> 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:
I ran into the same problem.
I think it depends on the input data, in my case it is CSV of unknown size. My solution is to read as text, then process on each line and add them into Map or Array of type Any