snuspl / pluto

MIST: High-performance IoT Stream Processing
Apache License 2.0
17 stars 3 forks source link

API: Support strong type checking for union operator #245

Open sanha opened 8 years ago

sanha commented 8 years ago

For union operator, two streams to be unified must have same type. The problem is, they contains their output data type as a Java generic.

At now, we provide a weak level of dynamic type checking using Java reflection system. However, it is very weak because it can only distinguish between shallow type like Integer and String. If the generics that these streams have are like Tuple2<String, Integer> and Tuple2<String, String>, our weak type checker will pass them.

Therefore, we need to implement strong type checking code for union operator.

This issue is related with #63

sanha commented 8 years ago

TypeToken of Google guava might be helpfull No, it doesn't work.