def decode_row(line, fields=None):
    """
    Decode a raw line from a profile into a list of column values.

    Decoding involves splitting the line by the field delimiter
    (`"@"` by default) and unescaping special characters. If *fields*
    is given, cast the values into the datatype given by their
    respective Field object.

    Args:
        line: a raw line from a [incr tsdb()] profile.
        fields: a list or Relation object of Fields for the row
    Returns:
        A list of column values.
    """
    cols = line.rstrip('\n').split(_field_delimiter)
    cols = list(map(unescape, cols))
    if fields is not None:
        if len(cols) != len(fields):
            raise ItsdbError(
                'Wrong number of fields: {} != {}'
                .format(len(cols), len(fields))
            )
        for i in range(len(cols)):
            col = cols[i]
            if col:
                field = fields[i]
                col = _cast_to_datatype(col, field)
            cols[i] = col
    return cols
Decode a raw line from a profile into a list of column values.

    Decoding involves splitting the line by the field delimiter
    (`"@"` by default) and unescaping special characters. If *fields*
    is given, cast the values into the datatype given by their
    respective Field object.

    Args:
        line: a raw line from a [incr tsdb()] profile.
        fields: a list or Relation object of Fields for the row
    Returns:
        A list of column values.