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-3702) DataStream API PojoFieldAccessor doesn't support nested POJOs
Date Tue, 23 Aug 2016 09:03:20 GMT

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

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_r75826929
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/typeinfo/BasicTypeInfo.java
---
    @@ -171,6 +172,23 @@ public boolean isKeyType() {
     		}
     	}
     
    +	@Override
    +	@PublicEvolving
    +	@SuppressWarnings("unchecked")
    +	public <F> FieldAccessor<T, F> getFieldAccessor(int pos, ExecutionConfig
config) {
    +		if(pos != 0) {
    +			throw new InvalidFieldReferenceException("Not the 0th field selected for a basic type.");
    +		}
    +		return (FieldAccessor<T, F>) new FieldAccessor.SimpleFieldAccessor<T>(this);
    +	}
    +
    +	@Override
    +	@PublicEvolving
    +	public <F> FieldAccessor<T, F> getFieldAccessor(String field, ExecutionConfig
config) {
    +		throw new InvalidFieldReferenceException("Field expressions are not supported on basic
types."
    --- End diff --
    
    What about using `*` or also `0` here and get rid of the exception?


> 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)

Mime
View raw message