when 'only_full_group_by' is set in sql_mode, raise error for non-aggregated column in query without GROUP BY.
mysql> create table t(a bigint, b bigint, c bigint); Query OK, 0 rows affected (0.02 sec)
mysql> select a, max(b) from t;
ERROR 1140 (42000): In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'dc_test.t.a'; this is incompatible with sql_mode=only_full_group_by
tidb diff result with mysql when mix use union and union-all fix#6731
- rename `selectStmt.UnionDistinct` to `selectStmt.IsAfterUnionDistinct`
- add explain test
- remove useless `unionStmt.Distinct` and `selectList.Distinct`
- refactor use golang slice, remove dup code
- return WrongNumColumnInSelect error and add test case