Skip to content

Commit

Permalink
Merge pull request #2797 from tuohai666/dev
Browse files Browse the repository at this point in the history
#2777, change select_distinct test case from H2 to MySQL
  • Loading branch information
terrymanu authored Aug 1, 2019
2 parents 884466c + bb36d4f commit 297215e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

<dataset>
<metadata>
<column name="COUNT(DISTINCT &quot;order_id&quot;)" />
<column name="SUM(DISTINCT &quot;order_id&quot;)" />
<column name="COUNT(DISTINCT order_id)" />
<column name="SUM(DISTINCT order_id)" />
</metadata>
<row values="2, 2001" />
</dataset>
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
<sql-case id="select_distinct_with_sum" value="SELECT SUM(DISTINCT order_id) s FROM t_order WHERE order_id &lt; 1100" />
<sql-case id="select_distinct_with_count" value="SELECT COUNT(DISTINCT order_id) c FROM t_order WHERE order_id &lt; 1100" />
<sql-case id="select_distinct_with_avg" value="SELECT AVG(DISTINCT order_id) FROM t_order WHERE order_id &lt; 1100" db-types="MySQL" />
<sql-case id="select_distinct_with_count_sum" value="SELECT COUNT(DISTINCT order_id), SUM(DISTINCT order_id) FROM t_order WHERE order_id &lt; 1100" />
<!--TODO The metadata of MySQL is different from which of H2. For now, we could only specify one db-types from MySQL or H2. We need to support different expected data in one case.-->
<sql-case id="select_distinct_with_count_sum" value="SELECT COUNT(DISTINCT order_id), SUM(DISTINCT order_id) FROM t_order WHERE order_id &lt; 1100" db-types="MySQL" />
<sql-case id="select_distinct_with_single_count_group_by" value="SELECT order_id, COUNT(DISTINCT order_id) c FROM t_order WHERE order_id &lt; 1100 GROUP BY order_id ORDER BY order_id" />
<sql-case id="select_distinct_with_count_group_by" value="SELECT COUNT(DISTINCT order_id) c, order_id FROM t_order GROUP BY order_id ORDER BY order_id" />
<sql-case id="select_distinct_function" value="SELECT DISTINCT(item_id) FROM t_order_item ORDER BY item_id" />
Expand Down

0 comments on commit 297215e

Please sign in to comment.