You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "qiuweilu (via GitHub)" <gi...@apache.org> on 2023/10/26 06:34:24 UTC

[I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

qiuweilu opened a new issue, #28872:
URL: https://github.com/apache/shardingsphere/issues/28872

   ```
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-jdbc-core</artifactId>
               <version>5.4.1</version>
           </dependency>
   ```
   
   ```
   rules:
     - !SINGLE
       tables:
         - "*.*"
     - !SHARDING
       tables:
         part_cmnt:
           actualDataNodes: ds_0.part_cmnt_${0..9}
           tableStrategy:
             standard:
               shardingColumn: part_fkid
               shardingAlgorithmName: t_cmnt_inline
   
   
       shardingAlgorithms:
         t_cmnt_inline:
           type: INLINE
           props:
             algorithm-expression: part_cmnt_${part_fkid % 10}
   ```
   
   ```
       <select id="searchCmntList" parameterType="com.foxwish.dao.entity.ext.PartCmntExt" resultMap="BaseResultMap">
           select * from part_cmnt_1
       </select>
   ```
   
   nested exception is org.apache.ibatis.executor.ExecutorException: Error preparing statement.  Cause: org.apache.shardingsphere.infra.exception.TableNotExistsException: Table or view `part_cmnt_1` does not exist.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1784770144

   [Hint ](https://shardingsphere.apache.org/document/current/en/user-manual/common-config/sql-hint/) may solve your problem. 


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1786463043

   > @RaigorJiang /* SHARDINGSPHERE_HINT: t_order.SHARDING_DATABASE_VALUE=1, t_order.SHARDING_TABLE_VALUE=1 */
   > 
   > How to dynamically set variables
   
   It is just a string and can be generated by any way


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "qiuweilu (via GitHub)" <gi...@apache.org>.
qiuweilu commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1786325597

   @RaigorJiang 
   /* SHARDINGSPHERE_HINT: t_order.SHARDING_DATABASE_VALUE=1, t_order.SHARDING_TABLE_VALUE=1 */ 
   
   How to dynamically set variables


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1786535370

   > 5.4.2 Can it be implemented to skip when the table name does not match the routing policy, or precise table partitioning for complex queries
   
   No, I don't know how to implement


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "qiuweilu (via GitHub)" <gi...@apache.org>.
qiuweilu commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1786794223

   @RaigorJiang 
   
   
   Invalidation in complex nested queries.
   
   such as
   ```
   select a.* from 
   (
        /* SHARDINGSPHERE_HINT: B.SHARDING_DATABASE_VALUE=0, B.SHARDING_TABLE_VALUE=1 */
         select b.* from B
   ) a 
   left join C on a.id = C.id
   left join D on a.id = D.id 
   ```
   
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "zhaojinchao95 (via GitHub)" <gi...@apache.org>.
zhaojinchao95 commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1781221248

   Refer to #28848


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1834466481

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1782576949

   @qiuweilu @zhaojinchao95 
   
   Logical table name should be used in SQL statements, you can try `select * from part_cmnt`
   
   <img width="684" alt="image" src="https://github.com/apache/shardingsphere/assets/5668787/dd00f6b6-a57e-4eb3-b1ed-4908fc0ab4c5">
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "qiuweilu (via GitHub)" <gi...@apache.org>.
qiuweilu commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1783669396

   @RaigorJiang 
   In certain complex scenarios, it is necessary to manually specify the table name; 
   otherwise, it will execute M*N queries.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1835381799

   > @RaigorJiang
   > 
   > Invalidation in complex nested queries.
   > 
   > such as
   > 
   > ```
   > select a.* from 
   > (
   >      /* SHARDINGSPHERE_HINT: B.SHARDING_DATABASE_VALUE=0, B.SHARDING_TABLE_VALUE=1 */
   >       select b.* from B
   > ) a 
   > left join C on a.id = C.id
   > left join D on a.id = D.id 
   > ```
   > 
   > complex nested queries like this have invalid table splitting strategies
   
   It seems that only header comments are supported now.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1873029790

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1784363967

   You can use sharding key or hint to control routing instead of using non-logical table names


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "qiuweilu (via GitHub)" <gi...@apache.org>.
qiuweilu commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1784369529

   @RaigorJiang 
   
   When dealing with complex queries, especially in nested scenarios, if the partition key is specified and cannot execute accurately, it will result in executing M * N queries.
   
   
   https://github.com/apache/shardingsphere/issues/28397


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "qiuweilu (via GitHub)" <gi...@apache.org>.
qiuweilu commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1784368190

   @RaigorJiang 


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "qiuweilu (via GitHub)" <gi...@apache.org>.
qiuweilu commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1786507724

   @RaigorJiang 
   
   5.4.2 Can it be implemented to skip when the table name does not match the routing policy or precise table partitioning for complex queries
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "qiuweilu (via GitHub)" <gi...@apache.org>.
qiuweilu commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1786325251

   @RaigorJiang 


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "qiuweilu (via GitHub)" <gi...@apache.org>.
qiuweilu commented on issue #28872:
URL: https://github.com/apache/shardingsphere/issues/28872#issuecomment-1786503367

   @RaigorJiang 
   5.4.2 Can it be implemented to skip when the table name does not match the routing policy


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Table or view `part_cmnt_1` does not exist. [shardingsphere]

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #28872: Table or view `part_cmnt_1` does not exist.
URL: https://github.com/apache/shardingsphere/issues/28872


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org