Convert column definition String to Dialect's Type
335196
public static Type toType(String columnDef) {
		if ("BIGINT".equalsIgnoreCase(columnDef))
			return Type.BIGINT;
		if ("BINARY".equalsIgnoreCase(columnDef))
			return Type.BINARY;
		if ("BIT".equalsIgnoreCase(columnDef))
			return Type.BIT;
		if ("BLOB".equalsIgnoreCase(columnDef))
			return Type.BLOB;
		if ("BOOLEAN".equalsIgnoreCase(columnDef))
			return Type.BOOLEAN;
		if ("CHAR".equalsIgnoreCase(columnDef))
			return Type.CHAR;
		if ("CLOB".equalsIgnoreCase(columnDef))
			return Type.CLOB;
		if ("DATE".equalsIgnoreCase(columnDef))
			return Type.DATE;
		if ("DECIMAL".equalsIgnoreCase(columnDef))
			return Type.DECIMAL;
		if ("DOUBLE".equalsIgnoreCase(columnDef))
			return Type.DOUBLE;
		if ("FLOAT".equalsIgnoreCase(columnDef))
			return Type.FLOAT;
		if ("INTEGER".equalsIgnoreCase(columnDef))
			return Type.INTEGER;
		if ("JAVA_OBJECT".equalsIgnoreCase(columnDef))
			return Type.JAVA_OBJECT;
		if ("LONGNVARCHAR".equalsIgnoreCase(columnDef))
			return Type.LONGNVARCHAR;
		if ("LONGVARBINARY".equalsIgnoreCase(columnDef))
			return Type.LONGVARBINARY;
		if ("LONGVARCHAR".equalsIgnoreCase(columnDef))
			return Type.LONGVARCHAR;
		if ("NCHAR".equalsIgnoreCase(columnDef))
			return Type.NCHAR;
		if ("NCLOB".equalsIgnoreCase(columnDef))
			return Type.NCLOB;
		if ("NUMERIC".equalsIgnoreCase(columnDef))
			return Type.NUMERIC;
		if ("NVARCHAR".equalsIgnoreCase(columnDef))
			return Type.NVARCHAR;
		if ("OTHER".equalsIgnoreCase(columnDef))
			return Type.OTHER;
		if ("REAL".equalsIgnoreCase(columnDef))
			return Type.REAL;
		if ("SMALLINT".equalsIgnoreCase(columnDef))
			return Type.SMALLINT;
		if ("TIME".equalsIgnoreCase(columnDef))
			return Type.TIME;
		if ("TIMESTAMP".equalsIgnoreCase(columnDef))
			return Type.TIMESTAMP;
		if ("TINYINT".equalsIgnoreCase(columnDef))
			return Type.TINYINT;
		if ("VARBINARY".equalsIgnoreCase(columnDef))
			return Type.VARBINARY;
		if ("VARCHAR".equalsIgnoreCase(columnDef))
			return Type.VARCHAR;
		// @formatter:on
		throw new DialectException("'" + columnDef + "' is not a legal SQL column definition name");
	}
1101072
def get_column_def(self):
        
        static = "static" if self.static else ""
        db_type = self.db_type.format(self.value_type.db_type)
        return '{} {} {}'.format(self.cql, db_type, static)
661445
def get_convert_dict(fmt):
    """"""
    convdef = {}
    for literal_text, field_name, format_spec, conversion in formatter.parse(fmt):
        if field_name is None:
            continue
        # XXX: Do I need to include 'conversion'?
        convdef[field_name] = format_spec
    return convdef
11545
public static byte schemaToColumnType(String s) {
        switch (s.toLowerCase()) {
            case "boolean":
            case "smallint":
            case "tinyint":
            case "bigint":  // FIXME: make sure this is fixed by Tomas.
            case "int":
            case "float":
            case "double":
            case "decimal":
                return Vec.T_NUM;
            case "timestamp":
            case "date":
                return Vec.T_TIME;
            case "enum":
                return Vec.T_CAT;
            case "string":
            case "varchar":
//      case "binary":  // Removed binary column type support for now
            case "char":
                return Vec.T_STR;
            default:
                throw new IllegalArgumentException("Unsupported Orc schema type: " + s);
        }
    }
1038171
def _col_type_set(self, col, df):
        
        type_set = set()
        if df[col].dtype == np.dtype(object):
            unindexed_col = list(df[col])
            for i in range(0, len(df[col])):
                if unindexed_col[i] == np.nan:
                    continue
                else:
                    type_set.add(type(unindexed_col[i]))
            return type_set
        else:
            type_set.add(df[col].dtype)
            return type_set
109251
def types(self):
        """"""
        res = []
        for column in self.column_definitions:
            tmp = column.get('type', None)
            res.append(ModelCompiler.get_column_type(tmp)) if tmp else False
        res = list(set(res))
        return res
1217251
def column(self, col):
        
        if type(col) is str:
            for c in self._cols:
                if c.name == col:
                    return c
        else:
            return self._cols[col]
638637
def _convert_types(self, filename: str, df: pd.DataFrame) -> None:
        
        if df.empty:
            return

        converters = self._config.nodes.get(filename, {}).get("converters", {})
        for col, converter in converters.items():
            if col in df.columns:
                df[col] = converter(df[col])
217597
def _cast_to_type(self, value):
        
        if isinstance(value, str) or value is None:
            return value
        return str(value)
1054898
def convert_field_value(type_, value):
    """"""
    if value == ".":
        return None
    elif type_ in ("Character", "String"):
        if "%" in value:
            for k, v in record.UNESCAPE_MAPPING:
                value = value.replace(k, v)
        return value
    else:
        try:
            return _CONVERTERS[type_](value)
        except ValueError:
            warnings.warn(
                ("{} cannot be converted to {}, keeping as " "string.").format(value, type_),
                CannotConvertValue,
            )
            return value
221240
def translate(self, dialect):
        """"""
        new_resultset = copy(self)
        new_resultset.dialect = dialect

        for result in new_resultset:
            for dimensionvalue in result.dimensionvalues:
                dimensionvalue.value = dimensionvalue.translate(dialect)
        return new_resultset
741380
@Override
	public int getColumnType(int column) throws RemoteException {
		String fldname = getColumnName(column);
		return schema.type(fldname).getSqlType();
	}
1063071
def _prep_datum(self, datum, dialect, col, needs_conversion):
        """"""
        if datum is None or (needs_conversion and not str(datum).strip()):
            return 'NULL'
        pytype = self.columns[col]['pytype']

        if needs_conversion:
            if pytype == datetime.datetime:
                datum = dateutil.parser.parse(datum)
            elif pytype == bool:
                datum = th.coerce_to_specific(datum)
                if dialect.startswith('sqlite'):
                    datum = 1 if datum else 0
            else:
                datum = pytype(str(datum))

        if isinstance(datum, datetime.datetime) or isinstance(datum, datetime.date):
            if dialect in self._datetime_format:
                return datum.strftime(self._datetime_format[dialect])
            else:
                return "'%s'" % datum
        elif hasattr(datum, 'lower'):
            # simple SQL injection protection, sort of... ?
            return "'%s'" % datum.replace("'", "''")
        else:
            return datum
1147220
def get_datatype(cls,
                     db: DATABASE_SUPPORTER_FWD_REF,
                     table: str,
                     column: str) -> str:
        """"""
        raise RuntimeError(_MSG_NO_FLAVOUR)
1269987
def _get_dbal_column_type(self, type_):
        
        type_ = type_.lower()

        if type_ == "big_integer":
            type_ = "bigint"
        elif type == "small_integer":
            type_ = "smallint"
        elif type_ in ["medium_text", "long_text"]:
            type_ = "text"

        return type_
594935
function (column) {
            if (column.fixed) {
                return ["char(", column.size || 255, ")"].join("");
            } else if (column.text === false || column.size) {
                return ["varchar(", column.size || 255, ")"].join("");
            } else {
                return 'text';
            }

        }
849907
static SQLTransform getUtilTransform(TypeName type) {
		String typeName = type.toString();

		// Integer.class.getCanonicalName().equals(typeName)
		if (Date.class.getCanonicalName().equals(typeName)) {
			return new DateSQLTransform();
		}
		if (Locale.class.getCanonicalName().equals(typeName)) {
			return new LocaleSQLTransform();
		}
		if (Currency.class.getCanonicalName().equals(typeName)) {
			return new CurrencySQLTransform();
		}
		if (Calendar.class.getCanonicalName().equals(typeName)) {
			return new CalendarSQLTransform();
		}
		if (TimeZone.class.getCanonicalName().equals(typeName)) {
			return new TimeZoneSQLTransform();
		}
		return null;
	}