[ https://issues.apache.org/jira/browse/FLINK-3702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15432577#comment-15432577 ]
ASF GitHub Bot commented on FLINK-3702: --------------------------------------- Github user twalthr commented on a diff in the pull request: https://github.com/apache/flink/pull/2094#discussion_r75839040 --- Diff: flink-scala/src/main/scala/org/apache/flink/api/scala/typeutils/CaseClassTypeInfo.scala --- @@ -236,6 +237,31 @@ abstract class CaseClassTypeInfo[T <: Product]( } } + override def getFieldAccessor[F](pos: Int, config: ExecutionConfig): FieldAccessor[T, F] = { + new ProductFieldAccessor[T,F,F]( + pos, this, new SimpleFieldAccessor[F](types(pos).asInstanceOf[TypeInformation[F]]), config) + } + + override def getFieldAccessor[F](fieldExpression: String, config: ExecutionConfig): + FieldAccessor[T, F] = { + + val decomp = FieldAccessor.decomposeFieldExpression(fieldExpression) + + val pos = getFieldIndex(decomp.head) + if(pos == -2) { --- End diff -- Would `-1` be a valid index? I think this should be `< 0`. > DataStream API PojoFieldAccessor doesn't support nested POJOs > ------------------------------------------------------------- > > Key: FLINK-3702 > URL: https://issues.apache.org/jira/browse/FLINK-3702 > Project: Flink > Issue Type: Improvement > Components: DataStream API > Affects Versions: 1.0.0 > Reporter: Robert Metzger > Assignee: Gabor Gevay > > The {{PojoFieldAccessor}} (which is used by {{.sum(String)}} and similar > methods) doesn't support nested POJOs right now. > As part of FLINK-3697 I'll add a check for a nested POJO and fail with an > exception. -- This message was sent by Atlassian JIRA (v6.3.4#6332)