[
https://issues.apache.org/jira/browse/ASTERIXDB-1828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906251#comment-15906251
]
Michael J. Carey commented on ASTERIXDB-1828:
---------------------------------------------
Thanks, Till, for the patch that made this SO much better! Our error messages
look generally great now (cleanliness wise and also content-wise.) There is
still one case, where quotes are actually involved, where we could perhaps
improve this in terms of escaping and quotes - not sure:
QUERY: 1+"foo"";
ERROR: Lexical error at line 1, column 10. Encountered: <EOF> after :
"\";" [ParseException]
> Ugly error message for bad quote characters!
> --------------------------------------------
>
> Key: ASTERIXDB-1828
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-1828
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: AsterixDB, Compiler, Error Reporting, Translator -
> SQL++, Web Interface
> Environment: Mac OSX
> Reporter: Michael J. Carey
> Assignee: Ian Maxon
>
> This sequence of steps:
> {noformat}
> DROP DATAVERSE TinySocial2 IF EXISTS;
> CREATE DATAVERSE TinySocial2;
> USE TinySocial2;
> CREATE TYPE GleambookMessageType AS {
> messageId: int,
> authorId: int,
> inResponseTo: int?,
> senderLocation: point?,
> message: string
> };
> CREATE DATASET GleambookMessages(GleambookMessageType)
> PRIMARY KEY messageId;
> INSERT INTO GleambookMessages ([
>
> {"messageId":1,"authorId":3,"inResponseTo”:2,”senderLocation":point("47.16,77.75"),"message":"
> love sprint its shortcut-menu is awesome:)”},
>
> {"messageId":2,"authorId":1,"inResponseTo":4,"senderLocation":point("41.66,80.87"),"message":"
> dislike iphone its touch-screen is horrible"}
> ]);
> {noformat}
> Yields this poor user experience due to all the quote escaping gobbledy gook:
> {noformat}
> Syntax error: In line 19 >>
> {"messageId":2,"authorId":1,"inResponseTo":4,"senderLocation":point("41.66,80.87"),"message":"
> dislike iphone its touch-screen is horrible"}<< Encountered
> <IDENTIFIER> "messageId" at column 11. [CompilationException]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)