drill
drill copied to clipboard
DRILL-4491: FormatPluginOptionsDescriptor requires FormatPluginConfig…
… fields to be public
Is there a way to ask Jackson to look at a POJO and give you what it considers to be the serializable fields? This isn't quite the right fix because it is valid to have private members in a class and only have some of the serialized and deserialized by Jackson based on gettters/setters. This would expose the non-serializable fields as options.
Until I looked at the code, I was under assumption that we are using Jackson to extract the serializable properties. We can, and should, definitely go that route.
The way code currently works is that it iterate through allthe table options and see if there is a Java field present in the corresponding FormatPluginConfig class. If it does find one, and this is why I say it is a bug in the current implementation, it makes is accessible (setAccesible(true)) implying that it is expected to work with non-public fields and sets the value to the one passed as parameter.