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/03/26 11:43:20 UTC
[GitHub] [incubator-shardingsphere] phoema opened a new issue #4963: Single
phoema opened a new issue #4963: Single
URL: https://github.com/apache/incubator-shardingsphere/issues/4963
## Bug Report
V5.0.0-RC1
SELECT COUNT(1) FROM ( SELECT assignee, flow_def_id, task_def_key, count(*) AS total FROM v_flow_history_dis WHERE (task_end_time BETWEEN ? AND ? AND rownum = ? AND case_id IS NOT NULL) GROUP BY assignee, flow_def_id, task_def_key ORDER BY assignee ASC, flow_def_id ASC, task_def_key ASC ) TOTAL
this sql is a single table query
but it can not parse when I make a hitmanger
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] phoema commented on issue #4963: Single
table query with subquery can not parse with sharding
Posted by GitBox <gi...@apache.org>.
phoema commented on issue #4963: Single table query with subquery can not parse with sharding
URL: https://github.com/apache/incubator-shardingsphere/issues/4963#issuecomment-604386731
can I write some other sqls when it does not work well and link 4696?
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4963:
Single table query with subquery can not parse with sharding
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #4963: Single table query with subquery can not parse with sharding
URL: https://github.com/apache/incubator-shardingsphere/issues/4963#issuecomment-604518853
Pending for subquery
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] Boomkeeper commented on issue #4963:
Single table query with subquery can not parse with sharding
Posted by GitBox <gi...@apache.org>.
Boomkeeper commented on issue #4963: Single table query with subquery can not parse with sharding
URL: https://github.com/apache/incubator-shardingsphere/issues/4963#issuecomment-607602897
**Is there a temporary solution or emergency solution please?**
I have encountered a same problem about 'subquery' recently,and the process of my task also delayed.
something here maybe helpful:
**version**
> <dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
<version>4.0.1</version>
</dependency>
**SQL**
> SELECT COUNT(1) FROM (
SELECT id, pin, status, created_time, created_by, delete_flag
FROM t_table_123
WHERE delete_flag = 1
AND pin IN (?)
) TOTAL
**configuration**
> spring.shardingsphere.encrypt.tables.t_table_123.columns.pin.encryptor=default_encryptor
spring.shardingsphere.encrypt.tables.t_table_123.columns.pin.plainColumn=pin
spring.shardingsphere.encrypt.tables.t_table_123.columns.pin.cipherColumn=pin_encrypt
**exception**
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -3
at java.lang.String.substring(String.java:1967)
at org.apache.shardingsphere.underlying.rewrite.sql.impl.AbstractSQLBuilder.getConjunctionText(AbstractSQLBuilder.java:58)
at org.apache.shardingsphere.underlying.rewrite.sql.impl.AbstractSQLBuilder.toSQL(AbstractSQLBuilder.java:50)
at org.apache.shardingsphere.underlying.rewrite.engine.impl.DefaultSQLRewriteEngine.rewrite(DefaultSQLRewriteEngine.java:34)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.EncryptPreparedStatement.getSQLUnit(EncryptPreparedStatement.java:171)
at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.EncryptPreparedStatement.execute(EncryptPreparedStatement.java:138)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:67)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
... 41 more
So, what can I do now to avoid exception?
Thanks.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on issue #4963:
Single table query can not parse with sharding
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4963: Single table query can not parse with sharding
URL: https://github.com/apache/incubator-shardingsphere/issues/4963#issuecomment-604385221
@phoema
Change the title for friendly search, please.
Subquery is not supported well now. See https://github.com/apache/incubator-shardingsphere/issues/4696
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking edited a comment on issue
#4963: Single table query can not parse with sharding
Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #4963: Single table query can not parse with sharding
URL: https://github.com/apache/incubator-shardingsphere/issues/4963#issuecomment-604385221
@phoema
Change the title for friendly search, please.
Subquery support is in progress now. See https://github.com/apache/incubator-shardingsphere/issues/4696
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [shardingsphere] kimmking commented on issue #4963: Single table query with subquery can not parse with sharding
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4963:
URL: https://github.com/apache/shardingsphere/issues/4963#issuecomment-692076303
It will be supported in version 5.x.
----------------------------------------------------------------
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 #4963: Single table query with subquery can not parse with sharding
Posted by GitBox <gi...@apache.org>.
kimmking closed issue #4963:
URL: https://github.com/apache/shardingsphere/issues/4963
----------------------------------------------------------------
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] phoema commented on issue #4963: Single table query with subquery can not parse with sharding
Posted by GitBox <gi...@apache.org>.
phoema commented on issue #4963:
URL: https://github.com/apache/shardingsphere/issues/4963#issuecomment-670279888
When will the issue can be processed?
----------------------------------------------------------------
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