Class ExtendedOptionIterator

java.lang.Object
org.apache.drill.exec.store.sys.ExtendedOptionIterator
All Implemented Interfaces:
Iterator<Object>

public class ExtendedOptionIterator extends Object implements Iterator<Object>
Extends the original Option iterator. The idea is to hide the implementation details and present the user with the rows which have values set at the top level of hierarchy and exclude the values set at lower levels. This is done by examining the scope and the precedence order of scope is session - system - default. All the values are represented as String instead of having multiple columns and the data type is provided as kind to preserve type information about the option. The query output is as follows - name,kind,type,val,optionScope planner.slice_target,BIGINT,SESSION,20,SESSION planner.width.max_per_node,BIGINT,SYSTEM,0,BOOT planner.affinity_factor,FLOAT,SYSTEM,1.7,SYSTEM In the above example, the query output contains single row for each option and we can infer that slice target is set at the session level and max width per node is set at the BOOT level and affinity factor is set at the SYSTEM level. The options set in the top level of hierarchy always takes precedence and they are returned in the query output. For example if the option is set at both SESSION level and SYSTEM level the value set at SESSION level takes precedence and query output has only the value set at SESSION level.