You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "BourneD (via GitHub)" <gi...@apache.org> on 2025/06/16 11:35:00 UTC
[I] fail to execute SQL with derived temporary tables. [shardingsphere]
BourneD opened a new issue, #35730:
URL: https://github.com/apache/shardingsphere/issues/35730
shardingsphere-jdbc 5.5.2
SQL execution like this:
` val result = jdbcTemplate.execute("SELECT id, name, score FROM table_a INNER JOIN (VALUES ('tester_6', 'tester_7')) AS table_temp(fake_name) ON name = fake_name AND id = 6")
`
Error message:
`org.apache.shardingsphere.infra.exception.kernel.metadata.ColumnNotFoundException: Unknown column 'fake_name' in 'on clause'.
at org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.ColumnSegmentBinder.lambda$findInputColumnSegment$3(ColumnSegmentBinder.java:183) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.exception.core.ShardingSpherePreconditions.checkState(ShardingSpherePreconditions.java:44) ~[shardingsphere-infra-exception-core-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.ColumnSegmentBinder.findInputColumnSegment(ColumnSegmentBinder.java:182) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.ColumnSegmentBinder.bind(ColumnSegmentBinder.java:85) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:84) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:51) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:66) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:66) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.segment.dml.from.type.JoinTableSegmentBinder.bind(JoinTableSegmentBinder.java:76) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.segment.dml.from.TableSegmentBinder.bind(TableSegmentBinder.java:60) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.statement.dml.SelectStatementBinder.lambda$bind$1(SelectStatementBinder.java:64) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at java.base/java.util.Optional.map(Optional.java:260) ~[na:na]
at org.apache.shardingsphere.infra.binder.engine.statement.dml.SelectStatementBinder.bind(SelectStatementBinder.java:64) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.type.DMLStatementBindEngine.bind(DMLStatementBindEngine.java:61) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bindSQLStatement(SQLBindEngine.java:68) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]
at org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bind(SQLBindEngine.java:58) ~[shardingsphere-infra-binder-5.5.2.jar:5.5.2]`
--
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
Re: [I] fail to execute SQL with derived temporary tables. [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu closed issue #35730: fail to execute SQL with derived temporary tables.
URL: https://github.com/apache/shardingsphere/issues/35730
--
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
Re: [I] fail to execute SQL with derived temporary tables. [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #35730:
URL: https://github.com/apache/shardingsphere/issues/35730#issuecomment-4043649864
Hi @BourneD, thank you for your feedback. I have fixed this bug in https://github.com/apache/shardingsphere/pull/38320, you can try with master branch.
--
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