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 2022/02/25 02:52:46 UTC
[GitHub] [shardingsphere] xsong123 opened a new issue #15622: sql contains '@' , paser error
xsong123 opened a new issue #15622:
URL: https://github.com/apache/shardingsphere/issues/15622
shardingsphere version 5.0.0
mysql version 5.7
sql as below:
SELECT
ddt.DefaultDate default_date,
ddt.DefaultDateBalance default_date_prin_bal,
CASE WHEN ddt.DefaultType = 'A' THEN '00'
WHEN ddt.DefaultType = 'B' THEN '01'
WHEN ddt.DefaultType = 'D' THEN '02'
WHEN ddt.DefaultType = 'E' THEN '03'
ELSE ddt.DefaultType
END default_type,
ddt.FirstDisposalDate disp_start_date,
@num := IF(@key = ddt.ASSETCODE, @num + 1, 1) rn,
@key := ddt.ASSETCODE assetcode
FROM
AssetDefaultDisposalTrust_fb2107202348 ddt,
(SELECT @KEY := '', @num := 0) t1
WHERE
ddt.productcode = 'XMDM202107202348'
AND ddt.datadate <= str_to_date (
'2021-11-25 0:00:00',
'yyyy-MM-dd hh24:mi:ss'
)
paser error:
Caused by: org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have an error in your SQL syntax
at org.apache.shardingsphere.sql.parser.core.database.parser.SQLParserExecutor.twoPhaseParse(SQLParserExecutor.java:68)
at org.apache.shardingsphere.sql.parser.core.database.parser.SQLParserExecutor.parse(SQLParserExecutor.java:49)
at org.apache.shardingsphere.sql.parser.api.SQLParserEngine.parse(SQLParserEngine.java:51)
at org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:47)
at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:40)
at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:29)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
... 65 more
--
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 #15622: sql contains '@' , paser error
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #15622:
URL: https://github.com/apache/shardingsphere/issues/15622#issuecomment-1050686368
@xsong123 Thank you for your feedback, I will investigate 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] tuichenchuxin closed issue #15622: sql contains '@' , paser error
Posted by GitBox <gi...@apache.org>.
tuichenchuxin closed issue #15622:
URL: https://github.com/apache/shardingsphere/issues/15622
--
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