Attached is the patch to fix the following for filter dialog:
OK button should be disabled for Filter dialog when filter string is empty. Filter dialog should be opened using context menu View Data -> Filtered Rows or shortcut toolbar.
On validation error dialog should not be closed.
User should be able to clear the filter string from the Query Tool.
Validation error should be thrown when filter dialog opened from Query Tool and provide some wrong filter string.