Github user Ben-Zvi commented on a diff in the pull request: https://github.com/apache/drill/pull/1045#discussion_r163419338 --- Diff: contrib/storage-kafka/src/main/java/org/apache/drill/exec/store/kafka/KafkaRecordReader.java --- @@ -66,13 +66,12 @@ public KafkaRecordReader(KafkaSubScan.KafkaSubScanSpec subScanSpec, List<SchemaPath> projectedColumns, FragmentContext context, KafkaStoragePlugin plugin) { setColumns(projectedColumns); - this.enableAllTextMode = context.getOptions().getOption(ExecConstants.KAFKA_ALL_TEXT_MODE).bool_val; - this.readNumbersAsDouble = context.getOptions() - .getOption(ExecConstants.KAFKA_READER_READ_NUMBERS_AS_DOUBLE).bool_val; - OptionManager options = context.getOptions(); - this.unionEnabled = options.getOption(ExecConstants.ENABLE_UNION_TYPE); - this.kafkaMsgReader = options.getOption(ExecConstants.KAFKA_RECORD_READER).string_val; - this.kafkaPollTimeOut = options.getOption(ExecConstants.KAFKA_POLL_TIMEOUT).num_val; + final OptionSet optionSet = context.getOptionSet(); + this.enableAllTextMode = optionSet.getOption(ExecConstants.KAFKA_ALL_TEXT_MODE).bool_val; + this.readNumbersAsDouble = optionSet.getOption(ExecConstants.KAFKA_READER_READ_NUMBERS_AS_DOUBLE).bool_val; + this.unionEnabled = optionSet.getOption(ExecConstants.ENABLE_UNION_TYPE); + this.kafkaMsgReader = optionSet.getOption(ExecConstants.KAFKA_RECORD_READER).string_val; + this.kafkaPollTimeOut = optionSet.getOption(ExecConstants.KAFKA_POLL_TIMEOUT).num_val; --- End diff -- Should we "complete" the cleanup - go over the code and convert all the getOption(..) to the getTYPE(..) ones ? Also for standardizing -- should all the name definitions, like {code} public static final String ENABLE_UNION_TYPE_KEY = "exec.enable_union_type"; {code} be changed as needed to have the suffix **_KEY** ?
---