strongduanmu commented on code in PR #23703:
URL: https://github.com/apache/shardingsphere/pull/23703#discussion_r1133347629


##########
infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/decider/engine/SQLFederationDeciderEngine.java:
##########
@@ -62,6 +62,9 @@ public SQLFederationDeciderContext decide(final QueryContext 
queryContext, final
         SQLFederationDeciderContext result = new SQLFederationDeciderContext();
         SQLStatementContext<?> sqlStatementContext = 
queryContext.getSqlStatementContext();
         // TODO move this logic to SQLFederationDecider implement class when 
we remove sqlFederationEnabled
+        if (queryContext.getSql().contains("WHEN")) {

Review Comment:
   Why add this judgement?



##########
test/e2e/suite/src/test/resources/cases/dql/dataset/db/select_sys_data_for_pg.xml:
##########
@@ -22,22 +22,19 @@
         <column name="Type" />
         <column name="Owner" />
     </metadata>
-    <row values="public | t_broadcast_table | table | mock user" />
-    <row values="public | t_country | table | mock user" />
-    <row values="public | t_merchant | table | mock user" />
-    <row values="public | t_order | table | mock user" />
-    <row values="public | t_order_aggregation_view | view | mock user" 
mayNotExist="true" />
-    <row values="public | t_order_federate | table | mock user" />
-    <row values="public | t_order_federate_sharding | table | mock user" />
-    <row values="public | t_order_item | table | mock user" />
-    <row values="public | t_order_item_federate | table | mock user" />
-    <row values="public | t_order_item_federate_sharding | table | mock user" 
/>
-    <row values="public | t_order_item_join_view | view | mock user" 
mayNotExist="true" />
-    <row values="public | t_order_subquery_view | view | mock user" 
mayNotExist="true" />
-    <row values="public | t_order_union_view | view | mock user" 
mayNotExist="true" />
-    <row values="public | t_product | table | mock user" />
-    <row values="public | t_product_category | table | mock user" />
-    <row values="public | t_product_detail | table | mock user" />
-    <row values="public | t_single_table | table | mock user" />
-    <row values="public | t_user | table | mock user" />
+    <row values="public | t_broadcast_table | table | postgres" />

Review Comment:
   Please support PostgreSQL \d statements with sql federation. If the current 
scenario is table sharding, the table name returned is incorrect.
   



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to