Refactor the option for selecting materialization format.