----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33289/#review80818 -----------------------------------------------------------
exec/java-exec/src/test/java/org/apache/drill/exec/store/json/TestJsonRecordReader.java <https://reviews.apache.org/r/33289/#comment130929> you can also do something like this: ``` } catch(UserException e) { Assert.assertEquals(DrillPBError.ErrorType.UNSUPPORTED_OPERATION, e.getOrCreatePBError(false).getErrorType()); } ``` This way, even if we decide to change the error message for Unsupported Errors, this test will still succeed. I should probably add a getErrorType() to UserException. - abdelhakim deneche On April 20, 2015, 8:44 p.m., Parth Chandra wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/33289/ > ----------------------------------------------------------- > > (Updated April 20, 2015, 8:44 p.m.) > > > Review request for drill, abdelhakim deneche and Jason Altekruse. > > > Repository: drill-git > > > Description > ------- > > DRILL-2350: Improve exception handling and error messages in JSON reader. > > Errors reported from the JSON reader will now look like the following: > > Query failed: UNSUPPORTED_OPERATION ERROR: In a list of type FLOAT8, > encountered a value of type BIGINT. Drill does not support lists of different > types. > > File: /Users/pchandra/work/data/test/DRILL-2350.json > Record: 1 > Line: 2 > Column: 23 > Field: loc > > [c4b33cca-0a52-4126-a300-2ab91d0ed9d1 on localhost:31010] > > > Diffs > ----- > > exec/java-exec/src/main/codegen/includes/vv_imports.ftl 371d8d0 > exec/java-exec/src/main/codegen/templates/ListWriters.java 29708d7 > > exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/JSONRecordReader.java > b41de31 > > exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/JsonProcessor.java > b310818 > > exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/reader/BaseJsonProcessor.java > 718bb09 > > exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/fn/JsonReader.java > c196fd2 > > exec/java-exec/src/test/java/org/apache/drill/exec/store/json/TestJsonRecordReader.java > 8b09e80 > exec/java-exec/src/test/resources/jsoninput/DRILL-2350.json PRE-CREATION > > Diff: https://reviews.apache.org/r/33289/diff/ > > > Testing > ------- > > All unit tests. > > > Thanks, > > Parth Chandra > >
