Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2213

JSON parsing error message doesn't give file name or context of error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 0.9.0
    • Storage - JSON
    • None

    Description

      The error message resulting from trying to read this ill-formed JSON (from a local file):

      { "key":"abc" "a1":1, }

      doesn't say anything about where the error was:

      org.apache.drill.exec.rpc.RpcException: RemoteRpcException: Failure while running fragment., Unexpected character ('"' (code 34)): was expecting comma to separate OBJECT entries

      At absolute minimum, it should include the name of the file or a quote of the text surrounding the error.

      It should include:

      • the name of the file
      • the line and column within the file, and/or a byte (or character) offset
      • some of the text surrounding the error
      • (the "Unexpected ... expecting ..." part it already includes.

      (Note: The "code" in "code 34" is ambiguous. "Code point" or "character number" would be better.

      Actually, the report of the character should include the standard (or just conventional?) Unicode hex notation ("U+0022"). (Including the decimal value too is fine, but that should probably be labeled as decimal, perhaps as ... "U+0022 (34 decimal)".)

      Attachments

        Issue Links

          Activity

            People

              adeneche Abdel Hakim Deneche
              dsbos Daniel Barclay
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: