rsingh0015 opened a new issue, #34456:
URL: https://github.com/apache/shardingsphere/issues/34456
## Question
ShardingSphere-jdbc: 5.5.2
YAML
`dataSources:
ds0:
driverClassName: org.postgresql.Driver
jdbcUrl: jdbc:postgresql://postgres:5432/rug?currentSchema=test_schema
username: UN
password: PWD
schema: test_schema
maxPoolSize: 2
minPoolSize: 2
ds1:
driverClassName: org.postgresql.Driver
jdbcUrl: jdbc:postgresql://postgres-2:5432/rug?currentSchema=test_schema
username: UN
password: PWD
schema: test_schema
maxPoolSize: 2
minPoolSize: 2
rules:
- !SHARDING
tables:
table_one:
actualDataNodes: ds${0..1}.table_one
table_two:
actualDataNodes: ds${0..1}.table_two
shardingAlgorithms:
database_inline:
props:
algorithm-expression: ds${ if (cycle_code as Integer >= 1 &&
cycle_code as Integer < 58) {return 1} else {return 0}}
props:
sql-show: true
Exception
`Caused by:
org.apache.shardingsphere.infra.exception.kernel.metadata.TableNotFoundException:
Table or view 'table_one' does not exist.
2025-01-23 12:21:01 at
org.apache.shardingsphere.infra.binder.engine.segment.dml.from.type.SimpleTableSegmentBinder.lambda$checkTableExists$12(SimpleTableSegmentBinder.java:178)
2025-01-23 12:21:01 at
org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions.checkState(ShardingSpherePreconditions.java:44)
2025-01-23 12:21:01 at
org.apache.shardingsphere.infra.binder.engine.segment.dml.from.type.SimpleTableSegmentBinder.checkTableExists(SimpleTableSegmentBinder.java:178)
2025-01-23 12:21:01 at
org.apache.shardingsphere.infra.binder.engine.segment.dml.from.type.SimpleTableSegmentBinder.bind(SimpleTableSegmentBinder.java:90)
2025-01-23 12:21:01 at
org.apache.shardingsphere.infra.binder.engine.segment.dml.from.TableSegmentBinder.bind(TableSegmentBinder.java:57)
2025-01-23 12:21:01 at
org.apache.shardingsphere.infra.binder.engine.statement.dml.SelectStatementBinder.lambda$bind$1(SelectStatementBinder.java:64)
2025-01-23 12:21:01 at
java.base/java.util.Optional.map(Optional.java:260)
2025-01-23 12:21:01 at
org.apache.shardingsphere.infra.binder.engine.statement.dml.SelectStatementBinder.bind(SelectStatementBinder.java:64)
2025-01-23 12:21:01 at
org.apache.shardingsphere.infra.binder.engine.type.DMLStatementBindEngine.bind(DMLStatementBindEngine.java:61)
2025-01-23 12:21:01 at
org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bindSQLStatement(SQLBindEngine.java:68)
2025-01-23 12:21:01 at
org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bind(SQLBindEngine.java:58)
2025-01-23 12:21:01 at
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:143)
2025-01-23 12:21:01 at
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:115)
2025-01-23 12:21:01 at
org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:108)
2025-01-23 12:21:01 at
org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:153)
2025-01-23 12:21:01 at
org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:183)`
--
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:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]