You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/09/24 08:07:13 UTC

[GitHub] [shardingsphere] leblancvn opened a new issue #7584: Custom slicing rules

leblancvn opened a new issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584


   When I customize the partition, I can't determine whether the parameter condition is delete or query. I need this condition because I need to operate different tables according to query or delete.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn removed a comment on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn removed a comment on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-699572639


   > I don't know your case.
   I want the same query condition to delete and query to return different tables.
   example:
   DELETE
   FROM
   	order_info_201903,
   	order_info_20190301
   WHERE
   	create_time BETWEEN '2019-03-01 00:00:00' and '2019-03-01 23:59:59';
   
   
   select * from 
   	order_info_20190301
   WHERE
   	create_time BETWEEN '2019-03-01 00:00:00' and '2019-03-01 23:59:59';


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-698205969


   I divide the database and table according to the time field, and then divide the table by day and month. The tables of the same order day and month are stored. When I query, I only query the database of days. But if I delete the data, I need to delete the data of day and month.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-699598512


   > ShardingSphere can't support multi-tables-delete statement in one sql.
   > You can split to 2 sqls.
   
   I only use pseudo code. I mean the same query condition. I want to return two tables for deletion statement, and only one table for query statement. In dosharding method, I want to judge whether the condition comes from deletion statement or query statement.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-698206368


   > Can you show an example?
   
   I divide the database and table according to the time field, and then divide the table by day and month. The tables of the same order day and month are stored. When I query, I only query the database of days. But if I delete the data, I need to delete the data of day and month.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn removed a comment on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn removed a comment on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-698205969


   I divide the database and table according to the time field, and then divide the table by day and month. The tables of the same order day and month are stored. When I query, I only query the database of days. But if I delete the data, I need to delete the data of day and month.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn removed a comment on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn removed a comment on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-698205969


   I divide the database and table according to the time field, and then divide the table by day and month. The tables of the same order day and month are stored. When I query, I only query the database of days. But if I delete the data, I need to delete the data of day and month.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-699572639


   > I don't know your case.
   I want the same query condition to delete and query to return different tables.
   example:
   DELETE
   FROM
   	order_info_201903,
   	order_info_20190301
   WHERE
   	create_time BETWEEN '2019-03-01 00:00:00' and '2019-03-01 23:59:59';
   
   
   select * from 
   	order_info_20190301
   WHERE
   	create_time BETWEEN '2019-03-01 00:00:00' and '2019-03-01 23:59:59';


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking closed issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
kimmking closed issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-698347972


   I don't know your case.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-698201415






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-699599069


   @kimmking In the dosharding method of the complexkeysshardingalgorithm class, can we judge whether the parameter in the where condition of the SQL statement comes from delete or select


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-698221957


   > Can you show an example?
   
   My scenario is that the database tables returned during query are inconsistent with those returned during deletion.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-699572705


   > I don't know your case.
   
   I want the same query condition to delete and query to return different tables.
   example
   DELETE
   FROM
   	order_info_201903,
   	order_info_20190301
   WHERE
   	create_time BETWEEN '2019-03-01 00:00:00' and '2019-03-01 23:59:59';
   
   select * from 
   	order_info_20190301
   WHERE
   	create_time BETWEEN '2019-03-01 00:00:00' and '2019-03-01 23:59:59';


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-699590461


   ShardingSphere can't support multi-tables-delete statement in one sql.
   You can split to 2 sqls.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-698201415


   Can you show an example?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] leblancvn commented on issue #7584: Custom slicing rules

Posted by GitBox <gi...@apache.org>.
leblancvn commented on issue #7584:
URL: https://github.com/apache/shardingsphere/issues/7584#issuecomment-698205969






----------------------------------------------------------------
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:
users@infra.apache.org