Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimization of DISTINCT SQL. #2715

Closed
2 of 5 tasks
tristaZero opened this issue Jul 17, 2019 · 0 comments · Fixed by #2800 or #2848
Closed
2 of 5 tasks

Optimization of DISTINCT SQL. #2715

tristaZero opened this issue Jul 17, 2019 · 0 comments · Fixed by #2800 or #2848

Comments

@tristaZero
Copy link
Contributor

tristaZero commented Jul 17, 2019

Optimization of DISTINCT SQL.

  • Fix bug: can not executeselect distinct t_order.order_id from t_order;
  • Support to use select distinct t_order.*, t_order_item.order_id from t_order, t_order_item where t_order.order_id = t_order_item.order_id

when there is * in sql, we need to get exact columns from shardingMetadata.

  • Add integrated test cases of distinct SQL to cover SQLS mentioned above.
  • Instead of columnLabelAndIndexMap, use QueryResultMetaData for DistinctQueryResult
  • Instead of TreeMap, we should consider to use HashMultimap for QueryResultMetaData
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants