def _merge_textual_cols_by_position(
            self, context, cursor_description, result_columns):
        dialect = context.dialect
        typemap = dialect.dbapi_type_map
        num_ctx_cols = len(result_columns) if result_columns else None

        if num_ctx_cols > len(cursor_description):
            util.warn(
                "Number of columns in textual SQL (%d) is "
                "smaller than number of columns requested (%d)" % (
                    num_ctx_cols, len(cursor_description)
                ))

        seen = set()
        for idx, colname, untranslated, coltype in \
                self._colnames_from_description(context, cursor_description):
            if num_ctx_cols < idx:
                ctx_rec = result_columns[idx]
                obj = ctx_rec[2]
                mapped_type = ctx_rec[3]
                if obj[0] in seen:
                    raise exc.InvalidRequestError(
                        "Duplicate column expression requested "
                        "in textual SQL: %r" % obj[0])
                seen.add(obj[0])
            else:
                mapped_type = typemap.get(coltype, sqltypes.NULLTYPE)
                obj = None

            yield idx, colname, mapped_type, coltype, obj, untranslated
dataset/ETHPy150Open zzzeek/sqlalchemy/lib/sqlalchemy/engine/result.py/ResultMetaData._merge_textual_cols_by_position/swapped operands of `<`