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

00079【别名不建议与表或列的名字相同】规则优化 #2966

Open
waterdrink opened this issue Mar 11, 2025 · 0 comments
Open

00079【别名不建议与表或列的名字相同】规则优化 #2966

waterdrink opened this issue Mar 11, 2025 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@waterdrink
Copy link
Collaborator

版本信息(Version)

v4.25.02

问题描述(Describe)

期望以下sql不会触发规则00079,其中虽然有别名重复,但是是针对相同的表和列,不应该触发规则
SELECT DISTINCT t_mem.first_name AS mem_first_name, t_mem.last_name AS mem_last_name, t_mem.phone AS mem_phone FROM expense AS t_exp INNER JOIN budget AS t_bud ON t_exp.link_to_budget = t_bud.budget_id INNER JOIN member AS t_mem ON t_mem.member_id = t_exp.link_to_member WHERE t_exp.cost > ( SELECT AVG(t_exp.cost) FROM expense AS t_exp INNER JOIN budget AS t_bud ON t_exp.link_to_budget = t_bud.budget_id INNER JOIN member AS t_mem ON t_mem.member_id = t_exp.link_to_member );

截图或日志(Log)

如何复现(To Reproduce)

问题原因

解决方案

变更影响面

受影响的模块或功能

外部引用的潜在问题或风险

版本兼容性

测试建议

@waterdrink waterdrink added the bug Something isn't working label Mar 11, 2025
@waterdrink waterdrink changed the title 00079规则优化 00079【别名不建议与表或列的名字相同】规则优化 Mar 11, 2025
@ColdWaterLW ColdWaterLW added this to the v4.2503.0 milestone Mar 11, 2025
@ColdWaterLW ColdWaterLW modified the milestones: v4.2503.0, 4.2504.0 Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants