提交 2d18486a 编写于 作者: G guangyun1013

Modify error expect data.

上级 1728b275
<dataset>
<t_order_item order_by_derived_0="190801" order_id="1908" rownum_="1" user_id="19" status="init_slave" />
<t_order_item order_by_derived_0="190800" order_id="1908" rownum_="2" user_id="19" status="init_slave" />
<t_order_item order_id="1900" rownum_="3" user_id="19" status="init" />
<t_order_item order_id="1900" rownum_="4" user_id="19" status="init" />
</dataset>
<dataset>
<t_order_item order_by_derived_0="190901" rownum_="1" order_id="1909" user_id="19" status="init_slave" />
<t_order_item order_by_derived_0="190900" rownum_="2" order_id="1909" user_id="19" status="init_slave" />
<t_order_item rownum_="1" order_id="1901" user_id="19" status="init" />
<t_order_item rownum_="2" order_id="1901" user_id="19" status="init" />
</dataset>
<dataset>
<t_order_item ORDER_BY_DERIVED_0="190901" ORDER_ID="1909" ROWNUM_="1" STATUS="init" USER_ID="19" />
<t_order_item ORDER_BY_DERIVED_0="190900" ORDER_ID="1909" ROWNUM_="2" STATUS="init" USER_ID="19" />
</dataset>
......@@ -31,7 +31,6 @@
<table-tokens>
<table-token begin-position="49" original-literals="t_order" />
</table-tokens>
<order-by-token begin-position-of-statement="73" begin-position-of-prepared-statement="73"/>
<aggregation-select-items>
<aggregation-select-item inner-expression="(order_id)" aggregation-type="SUM" alias="orders_sum" />
</aggregation-select-items>
......@@ -49,7 +48,6 @@
<table-tokens>
<table-token begin-position="53" original-literals="t_order" />
</table-tokens>
<order-by-token begin-position-of-statement="77" begin-position-of-prepared-statement="77"/>
<aggregation-select-items>
<aggregation-select-item inner-expression="(order_id)" aggregation-type="COUNT" alias="orders_count" />
</aggregation-select-items>
......@@ -67,7 +65,6 @@
<table-tokens>
<table-token begin-position="51" original-literals="t_order" />
</table-tokens>
<order-by-token begin-position-of-statement="75" begin-position-of-prepared-statement="75"/>
<aggregation-select-items>
<aggregation-select-item inner-expression="(order_id)" aggregation-type="MAX" alias="max_order_id" />
</aggregation-select-items>
......@@ -85,7 +82,6 @@
<table-tokens>
<table-token begin-position="51" original-literals="t_order" />
</table-tokens>
<order-by-token begin-position-of-statement="75" begin-position-of-prepared-statement="75"/>
<aggregation-select-items>
<aggregation-select-item inner-expression="(order_id)" aggregation-type="MIN" alias="min_order_id"/>
</aggregation-select-items>
......@@ -109,7 +105,6 @@
<item>SUM(order_id) AS AVG_DERIVED_SUM_0 </item>
</items>
</items-token>
<order-by-token begin-position-of-statement="73" begin-position-of-prepared-statement="73"/>
<aggregation-select-items>
<aggregation-select-item inner-expression="(order_id)" aggregation-type="AVG" alias="orders_avg">
<derived-column inner-expression="(order_id)" aggregation-type="COUNT" alias="AVG_DERIVED_COUNT_0" />
......@@ -184,7 +179,6 @@
<table-token begin-position="47" original-literals="t_order" />
<table-token begin-position="62" original-literals="t_order_item" />
</table-tokens>
<order-by-token begin-position-of-statement="206" begin-position-of-prepared-statement="205" />
<conditions>
<condition column-name="user_id" table-name="t_order" operator="IN">
<value index="0" literal="1" type="int" />
......@@ -212,8 +206,8 @@
<table-tokens>
<table-token begin-position="20" original-literals="t_order" />
</table-tokens>
<order-by-token begin-position-of-statement="45" begin-position-of-prepared-statement="45"/>
<row-count-token row-count="5" begin-position="51" />
<order-by-token begin-position-of-statement="45" begin-position-of-prepared-statement="45" />
<group-by-columns>
<group-by-column name="user_id" order-by-type="ASC" />
</group-by-columns>
......
<?xml version="1.0" encoding="UTF-8"?>
<sqls>
<sql id="assertSelectDateFuncWithGroupBy" value="SELECT date_format(c_date, '%%y-%%m-%%d') as c_date, count(*) as c_number FROM `t_order_item` WHERE order_id in (%s, %s) GROUP BY date_format(c_date, '%%y-%%m-%%d')" type="MySQL"/>
<sql id="assertSelectSumWithGroupBy" value="SELECT SUM(order_id) AS orders_sum, user_id FROM t_order GROUP BY user_id" />
<sql id="assertSelectCountWithGroupBy" value="SELECT COUNT(order_id) AS orders_count, user_id FROM t_order GROUP BY user_id" />
<sql id="assertSelectMaxWithGroupBy" value="SELECT MAX(order_id) AS max_order_id, user_id FROM t_order GROUP BY user_id" />
<sql id="assertSelectMinWithGroupBy" value="SELECT MIN(order_id) AS min_order_id, user_id FROM t_order GROUP BY user_id" />
<sql id="assertSelectAvgWithGroupBy" value="SELECT AVG(order_id) AS orders_avg, user_id FROM t_order GROUP BY user_id" />
<sql id="assertSelectSumWithGroupBy" value="SELECT SUM(order_id) AS orders_sum, user_id FROM t_order GROUP BY user_id ORDER BY user_id" />
<sql id="assertSelectCountWithGroupBy" value="SELECT COUNT(order_id) AS orders_count, user_id FROM t_order GROUP BY user_id ORDER BY user_id" />
<sql id="assertSelectMaxWithGroupBy" value="SELECT MAX(order_id) AS max_order_id, user_id FROM t_order GROUP BY user_id ORDER BY user_id" />
<sql id="assertSelectMinWithGroupBy" value="SELECT MIN(order_id) AS min_order_id, user_id FROM t_order GROUP BY user_id ORDER BY user_id" />
<sql id="assertSelectAvgWithGroupBy" value="SELECT AVG(order_id) AS orders_avg, user_id FROM t_order GROUP BY user_id ORDER BY user_id" />
<sql id="assertSelectOrderByDescWithGroupBy" value="SELECT SUM(order_id) AS orders_sum, user_id FROM t_order GROUP BY user_id ORDER BY orders_sum DESC" />
<sql id="assertSelectCountWithoutGroupedColumn" value="SELECT count(*) as items_count FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id IN (%s, %s) AND o.order_id BETWEEN %s AND %s GROUP BY o.user_id" />
<sql id="assertSelectCountWithGroupByBindingTable" value="SELECT count(*) as items_count, o.user_id FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id IN (%s, %s) AND o.order_id BETWEEN %s AND %s GROUP BY o.user_id" />
<sql id="assertSelectCountWithGroupByBindingTable" value="SELECT count(*) as items_count, o.user_id FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id IN (%s, %s) AND o.order_id BETWEEN %s AND %s GROUP BY o.user_id ORDER BY o.user_id" />
<sql id="assertSelectWithGroupByAndLimit" value="SELECT user_id FROM t_order GROUP BY user_id LIMIT %s" type="H2,MySQL,PostgreSQL" />
<sql id="assertSelectWithGroupByAndOrderByAndLimit" value="SELECT user_id, SUM(order_id) FROM t_order GROUP BY user_id ORDER BY SUM(order_id) LIMIT %s" type="H2,MySQL,PostgreSQL" />
<sql id="assertSelectGroupByWithAliasIsKeyword" value="SELECT SUM(order_id) AS orders_sum, user_id as `key` FROM t_order GROUP BY `key`" type="MySQL" />
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册