Given we're doing this in the core api/transform code now, this probably 
warrants a more generalizable approach. On first iteration, the logical type 
classes (in `o.a.k.connect.data`) were sufficient, but it seems they may not 
quite expose enough info. In particular, other than the `fromLogical` return 
type and `toLogical` parameter type, they may not make it clear enough what the 
conversion to primitive type is. Also, they probably aren't sufficiently 
isolated.

We shouldn't block getting this in since `Values` currently tries to do its 
best to determine the correct type, though even that is subject to failure 
modes (e.g. @rhauch just because a timestamp falls on a day or within the first 
day after 0AD doesn't mean they actually are that type -- we should really be 
passing through schema info to determine that). Given lack of that info 
provided to currently public APIs, I don't think there are real compatibility 
issues -- in the future we'd want a more correct alternative we'd provide a 
separate multi-argument version that includes schema info and fallback to the 
single-argument version.

[ Full content available at: https://github.com/apache/kafka/pull/4820 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to