def execute(self, quals, columns):

        log_to_postgres('Query Columns:  %s' % columns, DEBUG)
        log_to_postgres('Query Filters:  %s' % quals, DEBUG)

        myQuery = r.table(self.table)\
                   .pluck(self.columns.keys())

        for qual in quals:

            try:
                operatorFunction = getOperatorFunction(qual.operator)
            except unknownOperatorException, e:
                log_to_postgres(e, ERROR)

            myQuery = myQuery.filter(operatorFunction(r.row[qual.field_name], qual.value))

        rethinkResults = self._run_rethinkdb_action(action=myQuery)

        # By default, Multicorn seralizes dictionary types into something for hstore column types.
        # That looks something like this:   "key => value"
        # What we really want is this:  "{key:value}"
        # so we serialize it here.  (This is git issue #1 for this repo, and issue #86 in the Multicorn repo.)

        for resultRow in rethinkResults:

            # I don't think we can mutate the row in the rethinkResults cursor directly.
            # It needs to be copied out of the cursor to be reliably mutable.
            row = OrderedDict()
            for resultColumn in resultRow.keys():

                if type(resultRow[resultColumn]) is dict:

                    row[resultColumn] = json.dumps(resultRow[resultColumn])

                else:

                    row[resultColumn] = resultRow[resultColumn]

            yield row


    # SQL INSERT:
dataset/ETHPy150Open rotten/rethinkdb-multicorn-postgresql-fdw/rethinkdb_fdw/rethinkdb_fdw.py/RethinkDBFDW.execute/original