Shawn Hooton created ORC-198:
--------------------------------
Summary: Exception with
Key: ORC-198
URL: https://issues.apache.org/jira/browse/ORC-198
Project: ORC
Issue Type: Bug
Components: Java
Affects Versions: 1.5.0
Reporter: Shawn Hooton
Attachments: example-v1.json
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
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)