How to use the pymapd._parsers._extract_col_vals function in pymapd

To help you get started, we’ve selected a few pymapd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github omnisci / pymapd / pymapd / cursor.py View on Github external
"""
    Build a results set of python objects.

    Parameters
    ----------
    data: QueryResultSet

    Returns
    -------
    results: Iterator[tuple]
    """

    if data.row_set.columns:
        nrows = len(data.row_set.columns[0].nulls)
        ncols = len(data.row_set.row_desc)
        columns = [_extract_col_vals(desc, col)
                   for desc, col in zip(data.row_set.row_desc,
                                        data.row_set.columns)]
        for i in range(nrows):
            yield tuple(columns[j][i] for j in range(ncols))