Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.7.0
-
None
Description
I made a mistake in t.json file (extra colon in the last row):
{ "a1": 0 , "b1": "a"} { "a1": 1 , "b1": "b"} { "a1": 2 , "b1": "c"} { "a1":: 3 , "b1": "c"}
Error message below pretty much tells me everything that went wrong.
0: jdbc:drill:schema=dfs> select a1 from `t.json` where a1 is not null; Query failed: Query stopped., Unexpected character (':' (code 58)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: org.apache.drill.exec.vector.complex.fn.JsonReader@53c10ede; line: 3, column: 9] [ 64182782-ebba-4c6a-a963-005b8cb48339 on atsqa4-133.qa.lab:31010 ]
However, if a result of query above is an input to any other operator, I get this error message:
0: jdbc:drill:schema=dfs> select a1 from `t.json` where a1 is not null group by a1; Query failed: Query failed: Failure while running fragment., You tried to do a batch data read operation when you were in a state of STOP. You can only do this type of operation when you are in a state of OK or OK_NEW_SCHEMA. [ 955aac65-5e43-4430-baf6-ed6bb8a020d9 on atsqa4-133.qa.lab:31010 ] [ 955aac65-5e43-4430-baf6-ed6bb8a020d9 on atsqa4-133.qa.lab:31010 ] Error: exception while executing query: Failure while executing query. (state=,code=0)
Very painful for the user if query is really complex.
The same behavior if file does not exist.
Attachments
Issue Links
- Is contained by
-
DRILL-2476 Handle IterOutcome.STOP in buildSchema()
- Resolved
- is related to
-
DRILL-2430 Improve Error Propagation (Umbrella)
- Open
- relates to
-
DRILL-2206 Error message must be updated when querying a JSON file with arrays in first level
- Open