提交 f2896033 编写于 作者: T tuohai666

remove select_sub_query_with_single_table

上级 876f734d
......@@ -17,30 +17,6 @@
-->
<parser-result-sets>
<parser-result sql-case-id="select_sub_query_with_single_table" parameters="1, 2">
<tables>
<table name="t_order" alias="o" />
</tables>
<tokens>
<table-token start-index="33" table-name="t_order" length="7" />
</tokens>
<sharding-conditions>
<and-condition>
<condition column-name="order_id" table-name="t_order" operator="IN">
<value index="0" literal="1" type="int" />
<value index="1" literal="2" type="int" />
</condition>
</and-condition>
</sharding-conditions>
<select-items start-index="24" stop-index="26">
<shorthand-select-items>
<shorthand-select-item start-index="24" stop-index="26" text="o.*">
<table-segment start-index="24" stop-index="24" name="o" />
</shorthand-select-item>
</shorthand-select-items>
</select-items>
</parser-result>
<!-- TODO cannot pass,add later
<parser-result sql-case-id="select_sub_query_with_multiple_tables" parameters="1, 2">
<tables>
......
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<dataset>
<metadata>
<column name="order_id" />
<column name="user_id" />
<column name="status" />
</metadata>
<row values="1000, 10, init" />
<row values="1001, 10, init" />
</dataset>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<dataset>
<metadata>
<column name="order_id" />
<column name="user_id" />
<column name="status" />
</metadata>
<row values="1000, 10, init_slave" />
<row values="1001, 10, init_slave" />
</dataset>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<dataset>
<metadata>
<column name="order_id" />
<column name="user_id" />
<column name="status" />
</metadata>
<row values="1000, 10, init_slave" />
<row values="1001, 10, init_slave" />
</dataset>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<dataset>
<metadata>
<column name="order_id" />
<column name="user_id" />
<column name="status" />
</metadata>
<row values="1000, 10, init" />
<row values="1001, 10, init" />
</dataset>
......@@ -378,10 +378,6 @@
<assertion parameters="1000:int" expected-data-file="select_inner_join.xml" />
</dql-test-case>
<dql-test-case sql-case-id="select_sub_query_with_single_table">
<assertion parameters="1000:int, 1001:int" expected-data-file="select_sub_query_with_single_table.xml" />
</dql-test-case>
<!--<dql-test-case sql-case-id="select_sub_query_with_multiple_tables">-->
<!--<assertion parameters="1000:int, 1001:int" expected-data-file="select_sub_query_with_multiple_tables.xml" />-->
<!--</dql-test-case>-->
......
......@@ -17,10 +17,9 @@
-->
<sql-cases>
<sql-case id="select_sub_query_with_single_table" value="SELECT t.* FROM (SELECT o.* FROM t_order o WHERE o.order_id IN (?, ?)) t ORDER BY t.order_id" db-types="MySQL,PostgreSQL,SQLServer,Oracle" />
<!-- TODO cannot pass,add later
<!-- TODO cannot pass,add later
<sql-case id="select_sub_query_with_multiple_tables" value="SELECT t.* FROM (SELECT i.* FROM t_order o, t_order_item i WHERE o.order_id = i.order_id and o.order_id IN (?, ?)) t ORDER BY t.item_id" db-types="SQLServer,Oracle" />
-->
<sql-case id="select_sub_query_with_order_by" value="SELECT COUNT(1) as orders_count FROM (SELECT * FROM t_order ORDER BY order_id desc) t" db-types="MySQL,PostgreSQL,Oracle" />
<sql-case id="select_sub_query_with_group_by" value="SELECT COUNT(1) as order_items_count FROM (SELECT order_id FROM t_order_item GROUP BY order_id) t" db-types="MySQL,PostgreSQL,Oracle" />
<sql-case id="select_sub_query_with_order_by" value="SELECT COUNT(1) as orders_count FROM (SELECT * FROM t_order ORDER BY order_id desc) t" db-types="H2,MySQL,PostgreSQL,Oracle" />
<sql-case id="select_sub_query_with_group_by" value="SELECT COUNT(1) as order_items_count FROM (SELECT order_id FROM t_order_item GROUP BY order_id) t" db-types="H2,MySQL,PostgreSQL,Oracle" />
</sql-cases>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册