Skip to content

Console: Semicolon in comment terminates comment #5457

Description

@gramian

ArcadeDB Server v26.7.3 (build f2f3d880597d1d2310d61267e08ff5485504b4b5/1784309086198/UNKNOWN)

Running on Linux 7.0.0-28-generic - OpenJDK 64-Bit Server VM 25.0.3

In the console, a double-dash-comment is terminated by a semicolon. This is unexpected.

Example:

SELECT 1  -- A working comment

SELECT 2  -- A comment with a semicolon ; errors here

error message:

ERROR:
com.arcadedb.exception.CommandSQLParsingException: SQL syntax error at line 1, column 0: no viable alternative at input 'errors'
errors
^
	at com.arcadedb.query.sql.antlr.SQLErrorListener.syntaxError(SQLErrorListener.java:79)
	at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
	at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544)
	at org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:310)
	at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:136)
	at com.arcadedb.query.sql.grammar.SQLParser.statement(SQLParser.java:2572)
	at com.arcadedb.query.sql.grammar.SQLParser.parse(SQLParser.java:339)
	at com.arcadedb.query.sql.antlr.SQLAntlrParser.parse(SQLAntlrParser.java:98)
	at com.arcadedb.query.sql.parser.StatementCache.parse(StatementCache.java:86)
	at com.arcadedb.query.sql.parser.StatementCache.get(StatementCache.java:69)
	at com.arcadedb.query.sql.SQLQueryEngine.parse(SQLQueryEngine.java:264)
	at com.arcadedb.query.sql.SQLQueryEngine.command(SQLQueryEngine.java:108)
	at com.arcadedb.query.QueryEngine.command(QueryEngine.java:92)
	at com.arcadedb.database.LocalDatabase.command(LocalDatabase.java:1626)
	at com.arcadedb.console.Console.executeSQL(Console.java:632)
	at com.arcadedb.console.Console.execute(Console.java:293)
	at com.arcadedb.console.Console.parse(Console.java:787)
	at com.arcadedb.console.Console.interactiveMode(Console.java:149)
	at com.arcadedb.console.Console.execute(Console.java:206)
	at com.arcadedb.console.Console.main(Console.java:166)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions