[
https://issues.apache.org/jira/browse/FLINK-20297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17243025#comment-17243025
]
Guowei Ma edited comment on FLINK-20297 at 12/3/20, 8:57 AM:
-------------------------------------------------------------
Sorry for replying so late. [~dwysakowicz]
There are some cases that we could not extend `SerializerTestBase`. For example
when we write a `UnitSerializerTest extends SerializerTestBase` the compiler
would report following error:
{code:java}
Error:(18, 26) overriding method getTestData in class SerializerTestBase of
type ()Array[Unit];
method getTestData has incompatible type
override protected def getTestData: Array[Unit] = null
{code}
I am not sure the specific reason. But maybe the not object type(any subtype of
`AnyValue`) could not use as T[], which causes the problem.
was (Author: maguowei):
Sorry for replying so late. [~dwysakowicz]
There are some cases that we could not extend `SerializerTestBase`. For example
when we could write a `UnitSerializerTest extends SerializerTestBase` the
compiler would report following error:
{code:java}
Error:(18, 26) overriding method getTestData in class SerializerTestBase of
type ()Array[Unit];
method getTestData has incompatible type
override protected def getTestData: Array[Unit] = null
{code}
I am not sure the specific reason. But maybe the not object type(any subtype of
`AnyValue`) could not use as T[], which causes the problem.
> Make `SerializerTestBase::getTestData` return List<T>
> -----------------------------------------------------
>
> Key: FLINK-20297
> URL: https://issues.apache.org/jira/browse/FLINK-20297
> Project: Flink
> Issue Type: Improvement
> Components: API / Type Serialization System
> Reporter: Guowei Ma
> Assignee: Guowei Ma
> Priority: Minor
> Labels: pull-request-available
>
> Currently `SerializerTestBase::getTestData` return T[], which can not be
> override by the Scala. It means that developer could not add scala serializer
> test based on `SerializerTestBase`
> So I would propose to change the `SerializerTestBase::getTestData` to return
> List<T>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)