[ 
https://issues.apache.org/jira/browse/ORC-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15964513#comment-15964513
 ] 

Christian Tramnitz commented on ORC-150:
----------------------------------------

It seems there is a problem with schema detection when floats are used. A 
sample json like
{noformat}
{"float":5.2}
{noformat}
will result in:
{noformat}
$ java -jar orc-tools-1.4.0-SNAPSHOT-uber.jar convert sample_message.json -o 
sample.orc
Scanning sample_message.json for schema
Exception in thread "main" java.lang.IllegalArgumentException: precision 2 is 
out of range 1 .. 10
        at 
org.apache.orc.TypeDescription.withPrecision(TypeDescription.java:410)
        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)
{noformat}

> Add tool to convert from JSON to ORC
> ------------------------------------
>
>                 Key: ORC-150
>                 URL: https://issues.apache.org/jira/browse/ORC-150
>             Project: ORC
>          Issue Type: New Feature
>            Reporter: Owen O'Malley
>            Assignee: Owen O'Malley
>             Fix For: 1.4.0
>
>
> We should have a tool to convert from JSON data to ORC. Something like
> % java -jar orc-tools-*uber.jar create "struct<x:int,y:string>" *.json



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to