drill icon indicating copy to clipboard operation
drill copied to clipboard

DRILL-4491: FormatPluginOptionsDescriptor requires FormatPluginConfig…

Open adityakishore opened this issue 9 years ago • 2 comments

… fields to be public

adityakishore avatar Mar 09 '16 00:03 adityakishore

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.

jaltekruse avatar Mar 09 '16 01:03 jaltekruse

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.

adityakishore avatar Mar 09 '16 03:03 adityakishore