Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-1828

Ugly error message for bad quote characters!

    XMLWordPrintableJSON

    Details

    • Flags:
      Important

      Description

      This sequence of steps:

          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"}
          ]);
      

      Yields this poor user experience due to all the quote escaping gobbledy gook:

      Syntax error: In line 19 >>        {&quot;messageId&quot;:2,&quot;authorId&quot;:1,&quot;inResponseTo&quot;:4,&quot;senderLocation&quot;:point(&quot;41.66,80.87&quot;),&quot;message&quot;:&quot; dislike iphone its touch-screen is horrible&quot;}<< Encountered <IDENTIFIER> &quot;messageId&quot; at column 11.  [CompilationException]
      

        Attachments

          Activity

            People

            • Assignee:
              dtabass Michael J. Carey
              Reporter:
              dtabass Michael J. Carey
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: