Tracy0725 opened a new issue, #38712:
URL: https://github.com/apache/shardingsphere/issues/38712
## Bug Report
### Which version of ShardingSphere did you use?
shardingSphere JDBC 5.5.3 + springboot + oracle 19c
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
shardingSphere JDBC
### SQL
SELECT
area.org_id,
bu.id AS buId,
area.id AS workAreaId
FROM
hos_org_emp_post emp
LEFT JOIN hos_org_business_unit bu ON
bu.id = emp.bu_id
LEFT JOIN hos_org_post post ON
post.id = emp.post_id
LEFT JOIN hos_org_work_area area ON
area.id = bu.wa_id
LEFT JOIN hos_org_person person ON
person.person_id = emp.pa_person_id
WHERE
bu.is_deleted = 0
AND emp.is_deleted = 0
AND emp.status = 1
AND area.is_deleted = 0
AND post.is_deleted = 0
AND person.is_deleted = 0
AND (bu.end_date IS NULL
OR CURRENT_DATE <= bu.end_date)
AND (bu.start_date IS NULL
OR CURRENT_DATE >= bu.start_date)
AND (emp.end_date IS NULL
OR CURRENT_DATE <= emp.end_date)
AND (emp.start_date IS NULL
OR CURRENT_DATE >= emp.start_date)
AND (area.end_date IS NULL
OR CURRENT_DATE <= area.end_date)
AND (area.start_date IS NULL
OR CURRENT_DATE >= area.start_date)
AND (person.end_date IS NULL
OR CURRENT_DATE <= person.end_date)
AND (person.start_date IS NULL
OR CURRENT_DATE >= person.start_date)
AND (post.end_date IS NULL
OR CURRENT_DATE <= post.end_date)
AND (post.start_date IS NULL
OR CURRENT_DATE >= post.start_date)
AND bu.is_activity = 1
AND emp.is_activity = 1
AND area.is_activity = 1
AND post.is_activity = 1
AND person.is_activity = 1
AND emp.pa_person_id ='1'
AND emp.bu_id IN ('1')
ORDER BY
emp.seq_no,
emp.create_date ASC,
emp.create_time ASC,
emp.id DESC
### error
Caused by:
org.apache.shardingsphere.infra.exception.kernel.metadata.ColumnNotFoundException:
Unknown column 'CURRENT_DATE' in 'where clause'.
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.ColumnSegmentBinder.lambda$getColumnSegmentInfo$2(ColumnSegmentBinder.java:169)
at
org.apache.shardingsphere.infra.exception.ShardingSpherePreconditions.checkState(ShardingSpherePreconditions.java:44)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.ColumnSegmentBinder.getColumnSegmentInfo(ColumnSegmentBinder.java:168)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.ColumnSegmentBinder.bind(ColumnSegmentBinder.java:88)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:103)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:51)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:51)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.type.BinaryOperationExpressionBinder.bind(BinaryOperationExpressionBinder.java:50)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.expression.ExpressionSegmentBinder.bind(ExpressionSegmentBinder.java:82)
at
org.apache.shardingsphere.infra.binder.engine.segment.dml.predicate.WhereSegmentBinder.bind(WhereSegmentBinder.java:49)
at
org.apache.shardingsphere.infra.binder.engine.statement.dml.SelectStatementBinder.lambda$bind$2(SelectStatementBinder.java:74)
at java.util.Optional.map(Optional.java:215)
at
org.apache.shardingsphere.infra.binder.engine.statement.dml.SelectStatementBinder.bind(SelectStatementBinder.java:74)
at
org.apache.shardingsphere.infra.binder.engine.type.DMLStatementBindEngine.bind(DMLStatementBindEngine.java:45)
at
org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bindSQLStatement(SQLBindEngine.java:73)
at
org.apache.shardingsphere.infra.binder.engine.SQLBindEngine.bind(SQLBindEngine.java:59)
at
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:144)
at
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.<init>(ShardingSpherePreparedStatement.java:115)
at
org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:108)
at
com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:377)
at sun.reflect.GeneratedMethodAccessor61.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.ConnectionLogger.invoke(ConnectionLogger.java:55)
at com.sun.proxy.$Proxy145.prepareStatement(Unknown Source)
at
org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:86)
at
org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88)
... 363 common frames omitted
--
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]