You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Daniel (JIRA)" <ji...@apache.org> on 2018/03/07 01:37:00 UTC

[jira] [Comment Edited] (ORC-236) orc-tools JsonReader does not support uniontype in schema

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

Daniel edited comment on ORC-236 at 3/7/18 1:36 AM:
----------------------------------------------------

Is this issue resolved? What's the workaround, if not?


was (Author: wordlydan):
Is this issue been resolved? What's the workaround, if not?

> orc-tools JsonReader does not support uniontype in schema
> ---------------------------------------------------------
>
>                 Key: ORC-236
>                 URL: https://issues.apache.org/jira/browse/ORC-236
>             Project: ORC
>          Issue Type: Bug
>            Reporter: Anthony Hsu
>            Priority: Major
>
> To repro:
> {noformat}
> $ cat sample.json
> {"foo":1}
> $ java -jar ~/lib/orc-tools-1.4.0-uber.jar convert -s "struct<foo:uniontype<int,string>>" -o output.orc sample.json
> log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
> Processing sample.json
> Exception in thread "main" java.lang.IllegalArgumentException: Unhandled type uniontype<int,string>
> 	at org.apache.orc.tools.convert.JsonReader.createConverter(JsonReader.java:233)
> 	at org.apache.orc.tools.convert.JsonReader.<init>(JsonReader.java:260)
> 	at org.apache.orc.tools.convert.ConvertTool.main(ConvertTool.java:67)
> 	at org.apache.orc.tools.Driver.main(Driver.java:112)
> {noformat}
> Seems like [JsonReader.createConverter|https://github.com/apache/orc/blob/635833d13ff4a5c6a4ea3d73bc41af3efaf816cd/java/tools/src/java/org/apache/orc/tools/convert/JsonReader.java#L224] does not support [UNION|https://github.com/apache/orc/blob/master/java/core/src/java/org/apache/orc/TypeDescription.java#L116].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)