Minor performance suggestion: you could wait to assign columnName and aliasName only if the table name matched.