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/09/21 07:56:18 UTC

[GitHub] [shardingsphere] popo706 commented on issue #6454: org.apache.shardingsphere.sql.parser.sql.segment.dml.item.ExpressionProjectionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.segment.dml.column.ColumnSegment

popo706 commented on issue #6454:
URL: https://github.com/apache/shardingsphere/issues/6454#issuecomment-695961290


   same issue,the following is the sql that shardingsphere failed to parse,
   1、select q.id from question q where q.id in ?1 and (((1 - q.correctAnsweredNum/q.answeredNum) between ?2 and ?3 and q.answeredNum > 0) or 0 between ?2 and ?3 and q.answeredNum = 0)
   2、select *
   from paper_template pt where (pt.id is not null) and pt.enabled=? and pt.resId=? 
   and (exists (select 1 from paper_template_part ptp inner join paper_template_part_vs_qus ptpvq on ptp.id=ptpvq.paperTemplatePartId 
   where pt.id=ptp.paperTemplateId and ptpvq.qusId=?) 
   or exists (select 1 from paper_template_part ptp inner join qus_rule rules4_ on ptp.id=rules4_.paperTemplatePartId cross join qus_package qp 
   where pt.id=ptp.paperTemplateId and rules4_.qusPackageId=qp.id 
   and (? in (select pqr.qusId from qus_package_qus_rec pqr where qp.id=pqr.qusPackageId))))
   
   The first sql may be the common reason between “between .. and .."  and other operators
   the second sqm may be the exists operators.


----------------------------------------------------------------
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