benWize commented on pull request #15174:
URL: https://github.com/apache/beam/pull/15174#issuecomment-902120571


   > > I am stuck now with a couple of errors related to the incompatibility of 
Coders like in 
https://ci-beam.apache.org/job/beam_PreCommit_SQL_Java11_Commit/2966/testReport/junit/org.apache.beam.sdk.extensions.sql.zetasql/ZetaSqlDialectSpecTest/testArrayAggZetasql/
 and 
https://ci-beam.apache.org/job/beam_PreCommit_SQL_Java11_Commit/2966/testReport/junit/org.apache.beam.sdk.extensions.sql.zetasql/ZetaSqlDialectSpecTest/testCountIfZetaSQLDialect/.
   > > Do you have a suggestion of how should I proceed with these?
   > 
   > I'm guessing the reason the error message mentions "elements of type class 
java.lang.Object" is because of the type signature of DropNullFn. 
`DropNullFn<T> extends CombineFn<T, Object, Object>` DropNullFn should use 
generics for all three types, not just the input type. Try changing it to 
`DropNullFn<InputT, AccumT, OutputT> extends CombineFn<InputT, AccumT, OutputT>`
   
   I used generics in `DropNullFn`, I did the same in `ArrayAgg` and that fixed 
`testArrayAggZetasql`. 
   For `testCountIfZetaSQLDialect` the problem was with the Coder for the 
accumulator class, implementing `Accum` as `Serializable` fixed the problem. 
Now the only failing test is this 
https://ci-beam.apache.org/job/beam_PreCommit_SQL_Java11_Commit/2992/testReport/junit/org.apache.beam.sdk.extensions.sql/BeamSqlDslAggregationTest/testAggregationNonGroupedFunctionsWithUnbounded/.
 
   I've tried adding `.withoutDefaults() in 
`https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/transforms/Group.java#L556
 but that causes a failure in 
https://github.com/apache/beam/blob/072a47e519130c38e4cc1b5ac23f352d6e41d85a/sdks/java/extensions/sql/zetasql/src/test/java/org/apache/beam/sdk/extensions/sql/zetasql/ZetaSqlDialectSpecTest.java#L3843
 because of the default value.


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

To unsubscribe, e-mail: [email protected]

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


Reply via email to