To start off, I have to warn you that making modifications to the code makes this not a supported feature.
If you could describe your database structure, the query that is applied by DataAssist and the query you modified, I can try to point you in the right direction.