lwtdev commented on a change in pull request #8604:
URL: https://github.com/apache/shardingsphere/pull/8604#discussion_r543856366



##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/main/resources/sql/supported/dml/select.xml
##########
@@ -46,9 +47,9 @@
     <sql-case id="select_keyword_table_name_with_square_brackets" 
value="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id 
AND o.order_id = i.order_id JOIN [select] c ON o.status = c.status WHERE 
o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? AND c.status = ? ORDER BY 
i.item_id" db-types="SQLServer" />
     <sql-case id="select_alias_as_keyword" value="SELECT length.item_id 
password FROM t_order_item length where length.item_id = ? " 
db-types="MySQL,H2,SQLServer,Oracle" />
     <sql-case id="select_with_force_index_join" value="SELECT i.* FROM t_order 
o FORCE INDEX(order_index) JOIN t_order_item i ON o.order_id=i.order_id WHERE 
o.order_id = ?" db-types="MySQL" />
-    <sql-case id="select_equal_with_geography" value="SELECT * FROM t_order 
WHERE rule = ?::jsonb AND 
start_point=ST_GeographyFromText('SRID=4326;POINT('||?||' '||?||')') AND 
user_id = ? AND order_id = ?" db-types="PostgreSQL" />
-    <sql-case id="select_in_with_geography" value="SELECT * FROM t_order WHERE 
rule IN (?::jsonb, ?::jsonb) AND 
start_point=ST_GeographyFromText('SRID=4326;POINT('||?||' '||?||')') AND 
user_id = ? AND order_id = ?" db-types="PostgreSQL" />
-    <sql-case id="select_between_with_geography" value="SELECT * FROM t_order 
WHERE rule BETWEEN ?::jsonb AND ?::jsonb AND 
start_point=ST_GeographyFromText('SRID=4326;POINT('||?||' '||?||')') AND 
order_id = ?" db-types="PostgreSQL" />
+    <sql-case id="select_equal_with_geography" value="SELECT * FROM t_order 
WHERE rule = '{&quot;rule2&quot;:&quot;null2&quot;}'::jsonb AND 
start_point=ST_GeographyFromText('SRID=4326;POINT('||100||' '||200||')') AND 
user_id = ? AND order_id = ?" db-types="PostgreSQL" />
+    <sql-case id="select_in_with_geography" value="SELECT * FROM t_order WHERE 
rule IN ('{&quot;rule2&quot;:&quot;null2&quot;}'::jsonb, 
'{&quot;rule3&quot;:&quot;null3&quot;}'::jsonb) AND 
start_point=ST_GeographyFromText('SRID=4326;POINT('||100||' '||200||')') AND 
user_id = ? AND order_id = ?" db-types="PostgreSQL" />
+    <sql-case id="select_between_with_geography" value="SELECT * FROM t_order 
WHERE rule BETWEEN '{&quot;rule2&quot;:&quot;null2&quot;}'::jsonb AND 
'{&quot;rule3&quot;:&quot;null3&quot;}'::jsonb AND 
start_point=ST_GeographyFromText('SRID=4326;POINT('||100||' '||200||')') AND 
order_id = ?" db-types="PostgreSQL" />

Review comment:
       > @lwtdev Like this, it will reduce the coverage of test cases. can you 
use other methods?
   
   Actually, I check the parse result of the sql,  '?'  was be parsed  as a 
common expression. 
   But, it is reasonable to not reduce the coverage of 
`PostgreSQLDMLStatementSQLVisitor.java`, I will check the reasons.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to