[
https://issues.apache.org/jira/browse/ORC-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16023195#comment-16023195
]
ASF GitHub Bot commented on ORC-198:
------------------------------------
GitHub user codingogre opened a pull request:
https://github.com/apache/orc/pull/127
Fix for ORC-198
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/codingogre/orc ORC-198
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/orc/pull/127.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #127
----
commit aeb6a23d645e0dfde508248f2609771cf455a3c2
Author: Shawn Hooton <[email protected]>
Date: 2017-05-24T14:53:59Z
Fix for ORC-198
----
> Decimal types created with convert command generates IllegalArgumentException
> for valid documents
> -------------------------------------------------------------------------------------------------
>
> 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)