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

When aliases in SELECT ITEMS correspond to the real column names of GROUP BY or ORDER BY, there is no need to generate derived columns #646

Closed
terrymanu opened this issue Mar 16, 2018 · 2 comments
Assignees

Comments

@terrymanu
Copy link
Member

for example:
The SQL like

SELECT o.user_id uid FROM t_order o GROUP BY o.user_id ORDER BY o.user_id

should not add derived column, sharding-jdbc should match alias and item.

@terrymanu
Copy link
Member Author

reported by #645

terrymanu added a commit that referenced this issue Mar 16, 2018
@terrymanu
Copy link
Member Author

terrymanu commented Mar 16, 2018

fixed at 3.0.0.M1

@terrymanu terrymanu self-assigned this Aug 8, 2018
@terrymanu terrymanu changed the title Don't add derived column for group by and order by if item and select ailas match Don't add derived column for GROUP BY and ORDER by if item and select ailas match Aug 8, 2018
@terrymanu terrymanu changed the title Don't add derived column for GROUP BY and ORDER by if item and select ailas match Don't add derived column for GROUP BY and ORDER BY if item and SELECT ailas match Aug 8, 2018
@terrymanu terrymanu changed the title Don't add derived column for GROUP BY and ORDER BY if item and SELECT ailas match Don't add derived column for GROUP BY and ORDER BY if their item and SELECT ailas is matched Aug 8, 2018
@terrymanu terrymanu changed the title Don't add derived column for GROUP BY and ORDER BY if their item and SELECT ailas is matched Don't add derived column for GROUP BY and ORDER BY if their item and SELECT ailas is correspond Aug 8, 2018
@terrymanu terrymanu changed the title Don't add derived column for GROUP BY and ORDER BY if their item and SELECT ailas is correspond When aliases in SELECT ITEMS correspond to the real column names of GROUP BY or ORDER BY, there is no need to generate derived columns Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant