[ https://issues.apache.org/jira/browse/CALCITE-4776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17415410#comment-17415410 ]
Stamatis Zampetakis commented on CALCITE-4776: ---------------------------------------------- [~zhujiwen] If you are trying to cast 'ab' to CHAR(4) the syntax you are using is not the correct one. > SqlParseException:WEIGHT_STRING('ab' AS CHAR(4)) > -------------------------------------------------- > > Key: CALCITE-4776 > URL: https://issues.apache.org/jira/browse/CALCITE-4776 > Project: Calcite > Issue Type: Bug > Components: server > Affects Versions: 1.27.0 > Reporter: zhujiwen > Priority: Blocker > > String sql = "SELECT WEIGHT_STRING('ab' AS CHAR(4))"; > SqlParser sqlParser = SqlParser.create(sql, config); > > org.apache.calcite.sql.parser.SqlParseException: Encountered "AS" at line *, > column *. -- This message was sent by Atlassian Jira (v8.3.4#803005)