def _get_col_type_dict(self):
schema = []<EOL>if isinstance(self.schema, string_types):<EOL><INDENT>schema = json.loads(self.schema)<EOL><DEDENT>elif isinstance(self.schema, list):<EOL><INDENT>schema = self.schema<EOL><DEDENT>elif self.schema is not None:<EOL><INDENT>self.log.warn('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>col_type_dict = {}<EOL>try:<EOL><INDENT>col_type_dict = {col['<STR_LIT:name>']: col['<STR_LIT:type>'] for col in schema}<EOL><DEDENT>except KeyError:<EOL><INDENT>self.log.warn('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>return col_type_dict<EOL>
Return a dict of column name and column type based on self.schema if not None.