You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Mihai Budiu (Jira)" <ji...@apache.org> on 2025/04/25 18:14:00 UTC
[jira] [Comment Edited] (CALCITE-6986) Parser rejects a SQL program containing just whitespace
[ https://issues.apache.org/jira/browse/CALCITE-6986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17947398#comment-17947398 ]
Mihai Budiu edited comment on CALCITE-6986 at 4/25/25 6:13 PM:
---------------------------------------------------------------
It is a valid bug, but the test case should be this one:
{code:java}
sql(" ").list().ok(); {code}
was (Author: JIRAUSER295926):
If is a valid bug, but the test case should be this one:
{code:java}
sql(" ").list().ok(); {code}
> Parser rejects a SQL program containing just whitespace
> -------------------------------------------------------
>
> Key: CALCITE-6986
> URL: https://issues.apache.org/jira/browse/CALCITE-6986
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.39.0
> Reporter: Mihai Budiu
> Priority: Minor
>
> The following SqlParserTest returns a SqlParseException:
> {code}
> sql(" ").ok("");
> {code}
> Stack trace:
> {code}
> at org.apache.calcite.sql.parser.impl.SqlParserImpl.generateParseException(SqlParserImpl.java:44127)
> at org.apache.calcite.sql.parser.impl.SqlParserImpl.jj_consume_token(SqlParserImpl.java:43938)
> at org.apache.calcite.sql.parser.impl.SqlParserImpl.SqlStmt(SqlParserImpl.java:4127)
> at org.apache.calcite.sql.parser.impl.SqlParserImpl.SqlStmtEof(SqlParserImpl.java:4139)
> at org.apache.calcite.sql.parser.impl.SqlParserImpl.parseSqlStmtEof(SqlParserImpl.java:209)
> at org.apache.calcite.sql.parser.SqlParser.parseQuery(SqlParser.java:172)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)