def get_field_cast_expr(field, data_type):
    """
    generates cast expression based on data_type for the field

    :param field: field name
    :param data_type: data type of the field
    :return:  col string
    """
    bigquery_int_float = {'integer': 'INT64', 'float': 'FLOAT64'}

    if data_type not in ['integer', 'float']:
        col = f'CAST({field} AS {data_type.upper()}) AS {field}'
    else:
        col = f'CAST({field} AS {bigquery_int_float[data_type]}) AS {field}'

    return col