How do I replace the SQL query of a view?
Well, nothing is stoping you from building your own SelectQuery object and replacing the existing one. Overriding the query plugin is also an option. In this case it would be best to know WHY you're trying to replace the whole query. It makes very little sense to me.

Also, you're using alpha1? Why? That code is four and a half months old. Before attempting anything else, please update to -dev.