Refactor the comparison logic in sqlparser a little.