Hi Tao,
Thanks for reporting this! Could you share more details about your
use-case, Anant mentioned that he's having trouble coming up with a test
case where inferCoder doesn't work [1].
Brian

[1] https://github.com/apache/beam/pull/14078#issuecomment-786293576

On Wed, Feb 24, 2021 at 6:49 PM Anant Damle <ana...@google.com> wrote:

> Hi Brian,
> I think you are right. Create BEAM-11861
> <https://issues.apache.org/jira/browse/BEAM-11861>, will send a PR today.
> Present workaround is to provide .setCoder directly on the Output
> PCollection.
>
> On Thu, Feb 25, 2021 at 5:25 AM Brian Hulette <bhule...@google.com> wrote:
>
>> +Anant Damle <ana...@google.com> is this an oversight in
>> https://github.com/apache/beam/pull/13616? What would be the right way
>> to fix this?
>>
>> On Tue, Feb 23, 2021 at 5:24 PM Tao Li <t...@zillow.com> wrote:
>>
>>> Hi Beam community,
>>>
>>>
>>>
>>> I cannot log into Beam jira so I am asking this question here. I am
>>> testing this new feature from Beam 2.28 and see below error:
>>>
>>>
>>>
>>> Exception in thread "main" java.lang.IllegalArgumentException: Unable to
>>> infer coder for output of parseFn. Specify it explicitly using withCoder().
>>>
>>>                 at
>>> org.apache.beam.sdk.io.parquet.ParquetIO$ParseFiles.inferCoder(ParquetIO.java:554)
>>>
>>>                 at
>>> org.apache.beam.sdk.io.parquet.ParquetIO$ParseFiles.expand(ParquetIO.java:521)
>>>
>>>                 at
>>> org.apache.beam.sdk.io.parquet.ParquetIO$ParseFiles.expand(ParquetIO.java:483)
>>>
>>>                 at
>>> org.apache.beam.sdk.Pipeline.applyInternal(Pipeline.java:547)
>>>
>>>
>>>
>>> However ParquetIO builder does not have this withCoder() method. I think
>>> this error message is mimicking AvroIO:
>>> https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/io/AvroIO.java#L1010
>>>
>>>
>>>
>>> Should we add this method to ParquetIO? Thanks!
>>>
>>

Reply via email to