Description
Using the command (sample payload attached):
java -jar orc-tools-1.5.0-SNAPSHOT-uber.jar convert ~/example-v1.json
throws exception:
Scanning /home/shh/example-v1.json for schema
Exception in thread "main" java.lang.IllegalArgumentException: precision 8 is out of range 1 .. 10
at org.apache.orc.TypeDescription.withPrecision(TypeDescription.java:418)
at org.apache.orc.tools.json.NumericType.getSchema(NumericType.java:105)
at org.apache.orc.tools.json.StructType.getSchema(StructType.java:110)
at org.apache.orc.tools.json.JsonSchemaFinder.getSchema(JsonSchemaFinder.java:257)
at org.apache.orc.tools.convert.ConvertTool.computeSchema(ConvertTool.java:48)
at org.apache.orc.tools.convert.ConvertTool.main(ConvertTool.java:58)
at org.apache.orc.tools.Driver.main(Driver.java:112)
Because org/apache/orc/tools/json/NumericType,getSchema() method incorrectly calls .withPrecision() before .withScale()
Pull request incoming
Attachments
Attachments
Issue Links
- links to