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


   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.
   


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