You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "archyly (via GitHub)" <gi...@apache.org> on 2023/02/01 04:34:09 UTC
[GitHub] [shardingsphere] archyly opened a new issue, #23886: Can not get index from column label ``
archyly opened a new issue, #23886:
URL: https://github.com/apache/shardingsphere/issues/23886
This problem seems to have been solved in the new version #22614
but in **Sqlserver** its reproduce.
ShardingSphere version :5.3.1
`Caused by: java.sql.SQLFeatureNotSupportedException: Can not get index from column label ''.
at org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet.lambda$getIndexFromColumnLabelAndIndexMap$0(ShardingSphereResultSet.java:393)
at org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions.checkState(ShardingSpherePreconditions.java:41)
at org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet.getIndexFromColumnLabelAndIndexMap(ShardingSphereResultSet.java:393)
at org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSet.getLong(ShardingSphereResultSet.java:135)
at com.zaxxer.hikari.pool.HikariProxyResultSet.getLong(HikariProxyResultSet.java)
at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.ibatis.logging.jdbc.ResultSetLogger.invoke(ResultSetLogger.java:69)
at com.sun.proxy.$Proxy286.getLong(Unknown Source)
at org.apache.ibatis.type.LongTypeHandler.getNullableResult(LongTypeHandler.java:37)
at org.apache.ibatis.type.LongTypeHandler.getNullableResult(LongTypeHandler.java:26)
at org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:85)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.createPrimitiveResultObject(DefaultResultSetHandler.java:834)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.createResultObject(DefaultResultSetHandler.java:663)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.createResultObject(DefaultResultSetHandler.java:642)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:404)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForSimpleResultMap(DefaultResultSetHandler.java:361)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:335)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:308)
at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:201)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:63)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
at com.github.pagehelper.util.ExecutorUtil.executeAutoCount(ExecutorUtil.java:169)
at com.github.pagehelper.PageInterceptor.count(PageInterceptor.java:197)
at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:140)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
at com.sun.proxy.$Proxy284.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425)
`
shardingsphere config:
`mode:
type: Standalone
repository:
type: JDBC
dataSources:
shardingmaster:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbcUrl: jdbc:sqlserver://192.168.128.100:1433;databaseName=test
username: test
password: 'test'
props:
sql-show: true
rules:
- !SHARDING
tables:
test1:
actualDataNodes: shardingmaster.test1_$->{2022..2023}
tableStrategy:
standard:
shardingColumn: created_date
shardingAlgorithmName: year-mod
test2:
actualDataNodes: shardingmaster.test2_$->{2022..2023}
tableStrategy:
standard:
shardingColumn: created_date
shardingAlgorithmName: year-mod
shardingAlgorithms:
year-mod:
type: INTERVAL
props:
datetime-pattern: 'yyyy-MM-dd HH:mm:ss'
datetime-upper: '2040-12-01 00:00:00'
datetime-lower: '2022-01-01 00:00:00'
sharding-suffix-pattern: 'yyyy'
datetime-interval-amount: 1
datetime-interval-unit: 'YEARS'`
--
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
[GitHub] [shardingsphere] Blackcbears commented on issue #23886: SQLServer Paging statements cause exception “Can not get index from column label ``”
Posted by "Blackcbears (via GitHub)" <gi...@apache.org>.
Blackcbears commented on issue #23886:
URL: https://github.com/apache/shardingsphere/issues/23886#issuecomment-1465264986
<img width="1685" alt="image" src="https://user-images.githubusercontent.com/16510311/224564139-c54f5efb-47f0-4ded-b8cf-085f3d2c2a5b.png">
`SELECT * FROM t_order ORDER BY order_id OFFSET 0 ROW FETCH NEXT ? ROWS ONLY`
<img width="1613" alt="image" src="https://user-images.githubusercontent.com/16510311/224564178-a460cafc-b788-4c8a-a064-5cb987b93359.png">
`SELECT * FROM t_order ORDER BY order_id OFFSET ? ROW FETCH NEXT ? ROWS ONLY`
--
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
[GitHub] [shardingsphere] Blackcbears commented on issue #23886: SQLServer Paging statements cause exception “Can not get index from column label ``”
Posted by "Blackcbears (via GitHub)" <gi...@apache.org>.
Blackcbears commented on issue #23886:
URL: https://github.com/apache/shardingsphere/issues/23886#issuecomment-1465263094
https://github.com/apache/shardingsphere/issues/17973#issuecomment-1212790893
maybe this is the answer
--
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
[GitHub] [shardingsphere] wangjunfeng-wjf commented on issue #23886: Can not get index from column label ``
Posted by "wangjunfeng-wjf (via GitHub)" <gi...@apache.org>.
wangjunfeng-wjf commented on issue #23886:
URL: https://github.com/apache/shardingsphere/issues/23886#issuecomment-1411760635
The same problem,Help me!!!!!
--
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
[GitHub] [shardingsphere] xiaomizhou2 commented on issue #23886: SQLServer Paging statements cause exception “Can not get index from column label ``”
Posted by "xiaomizhou2 (via GitHub)" <gi...@apache.org>.
xiaomizhou2 commented on issue #23886:
URL: https://github.com/apache/shardingsphere/issues/23886#issuecomment-1455507068
help me!!!
--
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
[GitHub] [shardingsphere] strongduanmu commented on issue #23886: SQLServer Paging statements cause exception “Can not get index from column label ``”
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #23886:
URL: https://github.com/apache/shardingsphere/issues/23886#issuecomment-1465049934
Hi @Blackcbears, can you try to submit a pr to fix this 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
[GitHub] [shardingsphere] Blackcbears commented on issue #23886: SQLServer Paging statements cause exception “Can not get index from column label ``”
Posted by "Blackcbears (via GitHub)" <gi...@apache.org>.
Blackcbears commented on issue #23886:
URL: https://github.com/apache/shardingsphere/issues/23886#issuecomment-1495333914
@archyly try add alias
for example:`SELECT COUNT(0) as number FROM t_order`
--
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
[GitHub] [shardingsphere] archyly commented on issue #23886: SQLServer Paging statements cause exception “Can not get index from column label ``”
Posted by "archyly (via GitHub)" <gi...@apache.org>.
archyly commented on issue #23886:
URL: https://github.com/apache/shardingsphere/issues/23886#issuecomment-1489891700
@Blackcbears Part of the problem can be solved in the solution😂
--
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
[GitHub] [shardingsphere] Blackcbears commented on issue #23886: SQLServer Paging statements cause exception “Can not get index from column label ``”
Posted by "Blackcbears (via GitHub)" <gi...@apache.org>.
Blackcbears commented on issue #23886:
URL: https://github.com/apache/shardingsphere/issues/23886#issuecomment-1463867510
I tested all the 5.x's, and they all had this problem,May be LimitPaginationContextEngine error.
If I have 3 parameters,such offsetSegment == 2 and rowCountSegment == 3
--
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