boyuanzz commented on pull request #14854:
URL: https://github.com/apache/beam/pull/14854#issuecomment-849828926


   > I cherry-picked @boyuanzz commit from the other PR notice however that I 
could not get the Type to be preserved after the two DoFns are applied.
   > 
   > In `OutputSingleSource` I was able to export correctly the type by 
overriding
   > 
   > ```java
   >     @Override
   >     public TypeDescriptor<SourceT> getOutputTypeDescriptor() {
   >       return (TypeDescriptor<SourceT>)
   >           new TypeDescriptor<Source<T>>(getClass()) {}.where(
   >               new TypeParameter<T>() {}, 
source.getOutputCoder().getEncodedTypeDescriptor());
   >     }
   > ```
   > 
   > but in the second DoFn `BoundedSourceAsSDFWrapperFn`
   > 
   > I did not find a way to recover the real type of T when overwriting 
`getOutputTypeDescriptor`. Any suggestion for this? Otherwise I suppose the 
solution on Read is good enough.
   
   I would say, let's unblock you first : ) Can you file a JIRA issue on this? 
I think we should find a ultimate solution there.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to