Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EF04910471 for ; Mon, 16 Mar 2015 16:08:29 +0000 (UTC) Received: (qmail 51565 invoked by uid 500); 16 Mar 2015 16:08:29 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 51490 invoked by uid 500); 16 Mar 2015 16:08:29 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 51480 invoked by uid 99); 16 Mar 2015 16:08:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2015 16:08:29 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of pietro.pinoli@gmail.com does not designate 162.253.133.43 as permitted sender) Received: from [162.253.133.43] (HELO mwork.nabble.com) (162.253.133.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2015 16:08:24 +0000 Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id CE3871771DA4 for ; Mon, 16 Mar 2015 09:07:13 -0700 (PDT) Date: Mon, 16 Mar 2015 08:57:16 -0700 (PDT) From: pietro To: user@flink.incubator.apache.org Message-ID: <1426521436427-859.post@n4.nabble.com> Subject: Most convenient data structure for unspecified length objects MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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.