Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-1369] [types] Add support for Subclasses, Interfaces, Abstract Classes #316

Closed
wants to merge 1 commit into from

Conversation

fhueske
Copy link
Contributor

@fhueske fhueske commented Jan 16, 2015

This PR rebased PR #236 to the current master.
Some tests were failing and I had a closer look. The original PR handled interfaces and abstract classes without member variables as POJO types. However, POJO types without members cannot be handled correctly and do also not have members that can be referenced as keys or fields.
I changed the logic such that interfaces and abstract classes without members are handled as GenericTypes.

I'm not so familiar with the TypeExtractor, so it would be good if someone else could have a quick look.

… Classes.

- Abstract classes with fields are handled as POJO types.
- Interfaces and abstract classes without fields are handled as generic types.

This closes apache#236
This closes apache#316
@twalthr
Copy link
Contributor

twalthr commented Jan 17, 2015

I will take a look at it.

@twalthr
Copy link
Contributor

twalthr commented Jan 20, 2015

Looks good. You should add generics or least <?> to TypeSerializer in the PojoSerializer. My IDE shows me lots of warnings.

@aljoscha
Copy link
Contributor

It's almost the same, except for the change to handle Interfaces and Abstract Classes with GenericTypeInfo, correct?

The part that changes the KryoSerializer must be adapted because of my recently merged PR that allows registering types and serializers at Kryo.

@fhueske
Copy link
Contributor Author

fhueske commented Jan 26, 2015

Yes, Pojo types with no internal fields would screw up the flat field addressing of the optimizer.

aljoscha added a commit to aljoscha/flink that referenced this pull request Jan 29, 2015
… Classes.

- Abstract classes with fields are handled as POJO types.
- Interfaces and abstract classes without fields are handled as generic types.

This closes apache#236
This closes apache#316
aljoscha added a commit to aljoscha/flink that referenced this pull request Jan 29, 2015
… Classes.

- Abstract classes with fields are handled as POJO types.
- Interfaces and abstract classes without fields are handled as generic types.

This closes apache#236
This closes apache#316
@fhueske
Copy link
Contributor Author

fhueske commented Feb 2, 2015

@aljoscha took this PR and extended it. He'll open corresponding PRs.

@fhueske fhueske closed this Feb 2, 2015
aljoscha added a commit to aljoscha/flink that referenced this pull request Feb 9, 2015
… Classes.

- Abstract classes with fields are handled as POJO types.
- Interfaces and abstract classes without fields are handled as generic types.

This closes apache#236
This closes apache#316
aljoscha added a commit to aljoscha/flink that referenced this pull request Feb 10, 2015
… Classes.

- Abstract classes with fields are handled as POJO types.
- Interfaces and abstract classes without fields are handled as generic types.

This closes apache#236
This closes apache#316
aljoscha added a commit to aljoscha/flink that referenced this pull request Feb 10, 2015
… Classes.

- Abstract classes with fields are handled as POJO types.
- Interfaces and abstract classes without fields are handled as generic types.

This closes apache#236
This closes apache#316
@fhueske fhueske deleted the aljoscha-subclass-types branch February 10, 2015 15:51
marthavk pushed a commit to marthavk/flink that referenced this pull request Jun 9, 2015
… Classes.

- Abstract classes with fields are handled as POJO types.
- Interfaces and abstract classes without fields are handled as generic types.

This closes apache#236
This closes apache#316
zhijiangW pushed a commit to zhijiangW/flink that referenced this pull request Apr 13, 2020
…PI. (apache#316)

Co-authored-by: Markos Sfikas <markos@data-artisans.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants