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 2021/02/03 08:02:34 UTC

[GitHub] [shardingsphere] wzdlagrange opened a new issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

wzdlagrange opened a new issue #9294:
URL: https://github.com/apache/shardingsphere/issues/9294


   ## In 4.1.1, non-sharding-table SQL  do not supported nested subquery,
   I'm sorry for the bad reading experience. I translated the English with Google and made some adjustments.
   
   this nested subquery has nothing to do with the table I want to sharing.
   For example, if the table to be sharding is "log" ,
   and a SQL String not contain "log",
   like 
   select 
   	* 
   from (select
   		...
   		from 
   		(select 
   			* 
   		from user 
   		union 
   		select 
   			* 
   		from account
   		)t left join........
   	 ) temp where......
   when I run the SQL , I will get the error message "Can not find owner from table",
   related code: ProjectionsContextEngine.find(), line 197, throw new IllegalStateException("Can not find owner from table.")
   
   This SQL does not contain the table to be sharding. Why is it parsed? 
   Similar to "SQLString.contains("log")?doSharding():doDefault()",
   Does it have such a function? I didn't find it.
   I think the SQL that are not sharding do not need to be processed by sharding-jdbc.


----------------------------------------------------------------
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] wzdlagrange edited a comment on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

Posted by GitBox <gi...@apache.org>.
wzdlagrange edited a comment on issue #9294:
URL: https://github.com/apache/shardingsphere/issues/9294#issuecomment-773946888


   > `Type` means this table is a single table, broadcast table, sharding table or binding tables.
   -----
   //It does not have to be "contains()", it can also be "Pattern.matcher()"
   if(SQLString.contains(shardedTableName)){  
   return doSharding();  
   }else{  
   return doDefault();  
   }
   
   If sharding-jdbc do what I said, what's the bad effect?
   ----------------------------------
   our project needs to sharding only one table, then we make the project dependencys sharding-jdbc.
   As a result, all SQL meet the requirements of sharding-jdbc.
   to sharding  one table , all SQL that contains subqurey need to be modified, which is very expensive.
   
   


----------------------------------------------------------------
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] wzdlagrange edited a comment on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

Posted by GitBox <gi...@apache.org>.
wzdlagrange edited a comment on issue #9294:
URL: https://github.com/apache/shardingsphere/issues/9294#issuecomment-774630463


   Thank you.I get it.
   I'll try.


----------------------------------------------------------------
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] tristaZero commented on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

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


   > MySQLAuthenticationHandlerTest
   
   Hi I suggest you try 5.0.0-alpha. Parsing is always in the first phase, since we need to recognize which type of table it is by the parsed result.


----------------------------------------------------------------
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] beyondsoros commented on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

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


   I have tested the subqueries of the example,not work in version 4.1.1.  Your reference, Duplicate with #8841


----------------------------------------------------------------
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] wzdlagrange edited a comment on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

Posted by GitBox <gi...@apache.org>.
wzdlagrange edited a comment on issue #9294:
URL: https://github.com/apache/shardingsphere/issues/9294#issuecomment-772410586


   > I have tested the subqueries of the example,not work in version 4.1.1. Your reference, Duplicate with #8841
   
   the subqueries is not contains sharding-table,
   sharding-sphere parse it,finds that it does not need to be sharded, and executes it as it is.
   Why didn't he parse it in the first place?
   Check whether the SQL statement contains a sharded table and then determine whether to parse the table.
   Similar to :
   if(SQLString.contains(shardedTableName)){
   	return doSharding();
   }else{
   	return doDefault();
   }
   
   If there are multiple sharding tables, contains each table once.
   Maybe to be compatible with spaces or line breaks, use regular expressions or other methods.
   I want to know why not。


----------------------------------------------------------------
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] wzdlagrange commented on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

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


   Okay, I get it. I'll try.


----------------------------------------------------------------
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] wzdlagrange commented on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

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


   > I have tested the subqueries of the example,not work in version 4.1.1. Your reference, Duplicate with #8841
   
   the subqueries is not contains sharding-table,
   sharding-sphere parse it,finds that it does not need to be partitioned, and executes it as it is.
   Why didn't he parse it in the first place?
   Check whether the SQL statement contains a sharded table and then determine whether to parse the table.
   Similar to :
   if(SQLString.contains(shardedTableName)){
   	return doSharding();
   }else{
   	return doDefault();
   }
   
   If there are multiple sharding tables, contains each table once.
   Maybe to be compatible with spaces or line breaks, use regular expressions or other methods.
   I want to know why not。


----------------------------------------------------------------
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] wzdlagrange commented on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

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


   > `Type` means this table is a single table, broadcast table, sharding table or binding tables.
   -----
   if(SQLString.contains(shardedTableName)){//It does not have to be "contains()", it can also be "Pattern.matcher()"
   return doSharding();
   }else{
   return doDefault();
   }
   If sharding-jdbc do what I said, what's the bad effect?
   ----------------------------------
   our project needs to sharding only one table, then we make the project dependencys sharding-jdbc.
   As a result, all SQL meet the requirements of sharding-jdbc.
   to sharding  one table , all SQL that contains subqurey need to be modified, which is very expensive.
   
   


----------------------------------------------------------------
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] wzdlagrange commented on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

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


   > > MySQLAuthenticationHandlerTest
   > 
   > Hi I suggest you try 5.0.0-alpha. Parsing is always in the first phase, since we need to recognize which type of table it is by the parsed result.
   
   emmm.....
   recognize which type of table type...
    What does the "type" mean?
   I don't understand.  


----------------------------------------------------------------
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] tristaZero commented on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

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


   `Type` means this table is a single table, broadcast table, sharding table or binding tables.


----------------------------------------------------------------
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] tristaZero closed issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

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


   


----------------------------------------------------------------
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] tristaZero commented on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

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


   Hi @wzdlagrange ,
   
   I suggest you try 5.0.0-alpha in your case. 5.0.0-alpha helps users manage these none-sharding tables. Still, SQL parsing is the process of handing any SQLs (Just for judging table type) but there is no rewriting or something.
   
   From 5.x version, ShardingSphere will focus on helping users manage all the tables. For instance, many of the none-sharing tables will be automatically loaded. Consequently, users utilize it in the way they use a database.


----------------------------------------------------------------
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] tristaZero commented on issue #9294: In 4.1.1, non-sharding-table SQL do not supported nested subquery,

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


   `Type` means this table is a single table, broadcast table, sharding table or binding tables.


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