Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 59F7D200BF5 for ; Fri, 23 Dec 2016 20:52:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 588A6160B0C; Fri, 23 Dec 2016 19:52:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A714C160B1F for ; Fri, 23 Dec 2016 20:51:59 +0100 (CET) Received: (qmail 46692 invoked by uid 500); 23 Dec 2016 19:51:58 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 46678 invoked by uid 99); 23 Dec 2016 19:51:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Dec 2016 19:51:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7BB792C03DE for ; Fri, 23 Dec 2016 19:51:58 +0000 (UTC) Date: Fri, 23 Dec 2016 19:51:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-5280) Extend TableSource to support nested data MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 23 Dec 2016 19:52:00 -0000 [ https://issues.apache.org/jira/browse/FLINK-5280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15773574#comment-15773574 ] ASF GitHub Bot commented on FLINK-5280: --------------------------------------- Github user mushketyk commented on a diff in the pull request: https://github.com/apache/flink/pull/3039#discussion_r93797831 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/TableEnvironment.scala --- @@ -340,25 +331,8 @@ abstract class TableEnvironment(val config: TableConfig) { * @return A tuple of two arrays holding the field names and corresponding field positions. */ protected[flink] def getFieldInfo[A](inputType: TypeInformation[A]): - (Array[String], Array[Int]) = - { - validateType(inputType) - - val fieldNames: Array[String] = inputType match { - case t: TupleTypeInfo[A] => t.getFieldNames - case c: CaseClassTypeInfo[A] => c.getFieldNames - case p: PojoTypeInfo[A] => p.getFieldNames - case r: RowTypeInfo => r.getFieldNames - case tpe => - throw new TableException(s"Type $tpe lacks explicit field naming") - } - val fieldIndexes = fieldNames.indices.toArray - - if (fieldNames.contains("*")) { - throw new TableException("Field name can not be '*'.") - } - - (fieldNames, fieldIndexes) + (Array[String], Array[Int]) = { + TableEnvironment.getFieldInfo(inputType) --- End diff -- It is overridden in a subclass, so I decided to leave this method here and only move the body out of it to make it reusable. > Extend TableSource to support nested data > ----------------------------------------- > > Key: FLINK-5280 > URL: https://issues.apache.org/jira/browse/FLINK-5280 > Project: Flink > Issue Type: Improvement > Components: Table API & SQL > Affects Versions: 1.2.0 > Reporter: Fabian Hueske > Assignee: Ivan Mushketyk > > The {{TableSource}} interface does currently only support the definition of flat rows. > However, there are several storage formats for nested data that should be supported such as Avro, Json, Parquet, and Orc. The Table API and SQL can also natively handle nested rows. > The {{TableSource}} interface and the code to register table sources in Calcite's schema need to be extended to support nested data. -- This message was sent by Atlassian JIRA (v6.3.4#6332)