flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4294) Allow access of composite type fields
Date Fri, 14 Oct 2016 20:45:20 GMT

    [ https://issues.apache.org/jira/browse/FLINK-4294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15576430#comment-15576430
] 

ASF GitHub Bot commented on FLINK-4294:
---------------------------------------

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2319#discussion_r83492573
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/api/table/FlinkTypeFactory.scala
---
    @@ -79,14 +83,27 @@ class FlinkTypeFactory(typeSystem: RelDataTypeSystem) extends JavaTypeFactoryImp
       }
     
       private def createAdvancedType(typeInfo: TypeInformation[_]): RelDataType = typeInfo
match {
    -    // TODO add specific RelDataTypes
    -    // for PrimitiveArrayTypeInfo, ObjectArrayTypeInfo, CompositeType
    +    case ct: CompositeType[_] =>
    +      new CompositeRelDataType(ct, this)
    +
    +    // TODO add specific RelDataTypes for PrimitiveArrayTypeInfo, ObjectArrayTypeInfo
         case ti: TypeInformation[_] =>
           new GenericRelDataType(typeInfo, getTypeSystem.asInstanceOf[FlinkTypeSystem])
     
         case ti@_ =>
           throw TableException(s"Unsupported type information: $ti")
       }
    +
    +  override def createTypeWithNullability(
    +      relDataType: RelDataType,
    +      nullable: Boolean)
    +    : RelDataType = relDataType match {
    +    case composite: CompositeRelDataType =>
    +      // at the moment we do not care about nullability
    --- End diff --
    
    Can you explain what nullability is and why it is not important here?


> Allow access of composite type fields
> -------------------------------------
>
>                 Key: FLINK-4294
>                 URL: https://issues.apache.org/jira/browse/FLINK-4294
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Timo Walther
>
> Currently all Flink CompositeTypes are treated as GenericRelDataTypes. It would be better
to access individual fields of composite types, too. e.g.
> {code}
> SELECT composite.name FROM composites
> SELECT tuple.f0 FROM tuples
> 'f0.getField(0)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message