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

Kyle Weaver commented on BEAM-12509:
------------------------------------

In case anyone tries looking up the error message, here it is:
 
"Caused by: org.apache.beam.sdk.coders.CannotProvideCoderException: Cannot 
infer coder for type parameter AccumT"
" at org.apache.beam.sdk.coders.CoderRegistry.getCoder(CoderRegistry.java:328)"
" at 
org.apache.beam.sdk.extensions.sql.impl.LazyAggregateCombineFn.getAccumulatorCoder(LazyAggregateCombineFn.java:91)"
" at 
org.apache.beam.sdk.extensions.sql.impl.transform.agg.AggregationCombineFnAdapter$WrappedCombinerBase.getAccumulatorCoder(AggregationCombineFnAdapter.java:75)"
" at 
org.apache.beam.sdk.transforms.CombineFns$ComposedCombineFn.getAccumulatorCoder(CombineFns.java:430)"
" at 
org.apache.beam.sdk.schemas.transforms.SchemaAggregateFn$Inner.getAccumulatorCoder(SchemaAggregateFn.java:335)"
" at 
org.apache.beam.runners.core.construction.CombineTranslation$CombineGroupedValuesPayloadTranslator.extractAccumulatorCoder(CombineTranslation.java:204)"

> AggregateFn: only accumulator types with default coders are supported.
> ----------------------------------------------------------------------
>
>                 Key: BEAM-12509
>                 URL: https://issues.apache.org/jira/browse/BEAM-12509
>             Project: Beam
>          Issue Type: Bug
>          Components: dsl-sql-zetasql
>            Reporter: Kyle Weaver
>            Priority: P2
>
> AggregateFn infers the coder for the accumulator from its type [1]. This only 
> works for types with default coders registered [2].
> To enable the use custom coders, AggregateFn will need a method to set the 
> accumulator coder. However, the Coder class itself is a part of the Beam core 
> SDK, a dependency we were trying to avoid in 
> org.apache.beam.sdk.extensions.sql.udf.
> [1] 
> https://github.com/apache/beam/blob/9418994e11dbede889b508c91261ec2092f2d8a7/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/LazyAggregateCombineFn.java#L88
> [2] 
> https://github.com/apache/beam/blob/9418994e11dbede889b508c91261ec2092f2d8a7/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/CoderRegistry.java#L106-L143



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to