Properly set result type in QueryResult in any case the data structure is modified