fix Vertica empty table query