flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gyula Fóra <gyf...@apache.org>
Subject Function input type validation
Date Sun, 08 Nov 2015 20:28:53 GMT
Hey All,

I am wondering what is the reason why Function input types are validated?

This might become an issue if the user wants to write his own TypeInfo for
a type that flink also handles natively.

Let's say I want to implement my own TupleTypeinfo that handles null
values, and I pass this typeinfo in the returns call of an operation. This
will most likely fail when the next operation validates the input although
I think it shouldn't.

But the funny thing about this is that this can actually be easily
circumvented as the validation function calls: actualType.equals(expected
type), so you can trick it by making your custom type's equal method return
true.

Thanks,
Gyula

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message