未验证 提交 1b1cbb1c 编写于 作者: J Juan Pan(Trista) 提交者: GitHub

Add rewrite SQL test for query with joining two qualified columns. (#4530)

上级 1564c630
......@@ -322,4 +322,9 @@
<input sql="SELECT t_account.account_id, t_account.password, t_account.amount AS a, status AS s FROM t_account WHERE t_account.account_id = 1 AND t_account.password = 'aaa' AND t_account.amount = 1000 AND t_account.status = 'OK'" />
<output sql="SELECT t_account_1.account_id, t_account_1.password, t_account_1.amount AS a, status AS s FROM t_account_1 WHERE t_account_1.account_id = 1 AND t_account_1.password = 'aaa' AND t_account_1.amount = 1000 AND t_account_1.status = 'OK'" />
</rewrite-assertion>
<rewrite-assertion id="select_with_join_table_with_qualified_columns">
<input sql="SELECT * FROM t_account, t_account_detail WHERE t_account.account_id = 1 AND t_account.account_id = t_account_detail.account_id" />
<output sql="SELECT * FROM t_account_1, t_account_detail_1 WHERE t_account_1.account_id = 1 AND t_account_1.account_id = t_account_detail_1.account_id" />
</rewrite-assertion>
</rewrite-assertions>
......@@ -37,7 +37,7 @@ shardingRule:
actualDataNodes: db.t_account_detail_${0..1}
tableStrategy:
inline:
shardingColumn: order_id
shardingColumn: account_id
algorithmExpression: t_account_detail_${account_id % 2}
bindingTables:
- t_account, t_account_detail
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册