Get a column by name from the selectable.

    Args:
        column_name: str, name of the column to retrieve.
        node: SqlNode, the node the column is being retrieved for.
        context: CompilationContext, compilation specific metadata.

    Returns:
        column, the SQLAlchemy column if found. Raises an AssertionError otherwise.

def get_column(column_name, node, context):
    """Get a column by name from the selectable.

    Args:
        column_name: str, name of the column to retrieve.
        node: SqlNode, the node the column is being retrieved for.
        context: CompilationContext, compilation specific metadata.

    Returns:
        column, the SQLAlchemy column if found. Raises an AssertionError otherwise.
    """
    column = try_get_column(column_name, node, context)
    if column is None:
        selectable = get_node_selectable(node, context)
        raise AssertionError(
            u'Column "{}" not found in selectable "{}". Columns present are {}. '
            u'Context is {}.'.format(column_name, selectable.original,
                                     [col.name for col in selectable.c], context))
    return column